Class SugarCrmDataContext

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.metamodel.convert.HasReadTypeConverters, org.apache.metamodel.DataContext

    public class SugarCrmDataContext
    extends org.apache.metamodel.QueryPostprocessDataContext
    implements Closeable
    A DataContext that uses the SugarCRM SOAP web services to fetch data from the CRM system.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FETCH_SIZE  
      • Fields inherited from class org.apache.metamodel.QueryPostprocessDataContext

        INFORMATION_SCHEMA_NAME, SYSTEM_PROPERTY_CREATE_DEFAULT_TABLE_ALIAS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected Number executeCountQuery​(org.apache.metamodel.schema.Table table, List<org.apache.metamodel.query.FilterItem> whereItems, boolean functionApproximationAllowed)  
      protected org.apache.metamodel.schema.Schema getMainSchema()  
      protected String getMainSchemaName()  
      protected org.apache.metamodel.data.DataSet materializeMainSchemaTable​(org.apache.metamodel.schema.Table table, List<org.apache.metamodel.schema.Column> columns, int maxRows)  
      • Methods inherited from class org.apache.metamodel.QueryPostprocessDataContext

        addConverter, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTableSelect, materializeTable
      • Methods inherited from class org.apache.metamodel.AbstractDataContext

        compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemas
    • Constructor Detail

      • SugarCrmDataContext

        public SugarCrmDataContext​(String sugarCrmBaseUrl,
                                   String username,
                                   String password,
                                   String applicationName)
        Parameters:
        sugarCrmBaseUrl - the base URL of the SugarCRM system, e.g. http://127.0.0.1:9090/sugarcrm
        username -
        password -
        applicationName -
    • Method Detail

      • getMainSchema

        protected org.apache.metamodel.schema.Schema getMainSchema()
                                                            throws org.apache.metamodel.MetaModelException
        Specified by:
        getMainSchema in class org.apache.metamodel.QueryPostprocessDataContext
        Throws:
        org.apache.metamodel.MetaModelException
      • getMainSchemaName

        protected String getMainSchemaName()
                                    throws org.apache.metamodel.MetaModelException
        Specified by:
        getMainSchemaName in class org.apache.metamodel.QueryPostprocessDataContext
        Throws:
        org.apache.metamodel.MetaModelException
      • executeCountQuery

        protected Number executeCountQuery​(org.apache.metamodel.schema.Table table,
                                           List<org.apache.metamodel.query.FilterItem> whereItems,
                                           boolean functionApproximationAllowed)
        Overrides:
        executeCountQuery in class org.apache.metamodel.QueryPostprocessDataContext
      • materializeMainSchemaTable

        protected org.apache.metamodel.data.DataSet materializeMainSchemaTable​(org.apache.metamodel.schema.Table table,
                                                                               List<org.apache.metamodel.schema.Column> columns,
                                                                               int maxRows)
        Specified by:
        materializeMainSchemaTable in class org.apache.metamodel.QueryPostprocessDataContext