org.apache.metamodel.salesforce
Class SalesforceDataContext

java.lang.Object
  extended by org.apache.metamodel.AbstractDataContext
      extended by org.apache.metamodel.QueryPostprocessDataContext
          extended by org.apache.metamodel.salesforce.SalesforceDataContext
All Implemented Interfaces:
HasReadTypeConverters, DataContext, UpdateableDataContext

public class SalesforceDataContext
extends QueryPostprocessDataContext
implements UpdateableDataContext

A datacontext that uses the Salesforce API. Metadata about schema structure is explored using 'describe' SOAP web services. Queries are fired using the SOQL dialect of SQL, see SOQL reference.


Field Summary
static String SOQL_DATE_FORMAT_IN
           
static String SOQL_DATE_FORMAT_OUT
           
static String SOQL_DATE_TIME_FORMAT_IN
           
static String SOQL_DATE_TIME_FORMAT_OUT
           
static String SOQL_TIME_FORMAT_IN
           
static String SOQL_TIME_FORMAT_OUT
           
static TimeZone SOQL_TIMEZONE
           
 
Fields inherited from class org.apache.metamodel.QueryPostprocessDataContext
INFORMATION_SCHEMA_NAME
 
Constructor Summary
SalesforceDataContext(String username, String password, String securityToken)
           
SalesforceDataContext(String endpoint, String username, String password, String securityToken)
           
 
Method Summary
protected  Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed)
           
 DataSet executeQuery(Query query)
           
 void executeUpdate(UpdateScript update)
           
protected  Schema getMainSchema()
           
protected  String getMainSchemaName()
           
protected  DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
           
protected static void rewriteFilterItem(StringBuilder sb, FilterItem filterItem)
           
 
Methods inherited from class org.apache.metamodel.QueryPostprocessDataContext
addConverter, executePrimaryKeyLookupQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable
 
Methods inherited from class org.apache.metamodel.AbstractDataContext
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, parseQuery, query, refreshSchemas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.metamodel.DataContext
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemas
 

Field Detail

SOQL_TIMEZONE

public static final TimeZone SOQL_TIMEZONE

SOQL_DATE_FORMAT_IN

public static final String SOQL_DATE_FORMAT_IN
See Also:
Constant Field Values

SOQL_DATE_FORMAT_OUT

public static final String SOQL_DATE_FORMAT_OUT
See Also:
Constant Field Values

SOQL_DATE_TIME_FORMAT_IN

public static final String SOQL_DATE_TIME_FORMAT_IN
See Also:
Constant Field Values

SOQL_DATE_TIME_FORMAT_OUT

public static final String SOQL_DATE_TIME_FORMAT_OUT
See Also:
Constant Field Values

SOQL_TIME_FORMAT_IN

public static final String SOQL_TIME_FORMAT_IN
See Also:
Constant Field Values

SOQL_TIME_FORMAT_OUT

public static final String SOQL_TIME_FORMAT_OUT
See Also:
Constant Field Values
Constructor Detail

SalesforceDataContext

public SalesforceDataContext(String endpoint,
                             String username,
                             String password,
                             String securityToken)

SalesforceDataContext

public SalesforceDataContext(String username,
                             String password,
                             String securityToken)
Method Detail

getMainSchema

protected Schema getMainSchema()
                        throws MetaModelException
Specified by:
getMainSchema in class QueryPostprocessDataContext
Throws:
MetaModelException

getMainSchemaName

protected String getMainSchemaName()
                            throws MetaModelException
Specified by:
getMainSchemaName in class QueryPostprocessDataContext
Throws:
MetaModelException

executeQuery

public DataSet executeQuery(Query query)
Specified by:
executeQuery in interface DataContext
Overrides:
executeQuery in class QueryPostprocessDataContext

executeCountQuery

protected Number executeCountQuery(Table table,
                                   List<FilterItem> whereItems,
                                   boolean functionApproximationAllowed)
Overrides:
executeCountQuery in class QueryPostprocessDataContext

rewriteFilterItem

protected static void rewriteFilterItem(StringBuilder sb,
                                        FilterItem filterItem)
                                 throws UnsupportedOperationException
Throws:
UnsupportedOperationException

materializeMainSchemaTable

protected DataSet materializeMainSchemaTable(Table table,
                                             Column[] columns,
                                             int maxRows)
Specified by:
materializeMainSchemaTable in class QueryPostprocessDataContext

executeUpdate

public void executeUpdate(UpdateScript update)
Specified by:
executeUpdate in interface UpdateableDataContext


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.