Class DBEntityDataProviderImpl

  • All Implemented Interfaces:
    com.im.df.api.dml.DFEntityDataProvider

    public class DBEntityDataProviderImpl
    extends Object
    implements com.im.df.api.dml.DFEntityDataProvider
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addDFEntityDataListener​(com.im.df.api.support.DFEntityDataListener listener)  
      int deleteIds​(List ids, com.im.commons.progress.DFEnvironmentRW env)  
      void fireUpdateAll()  
      String generateStatistics()  
      Map<Comparable<?>,​Map<String,​Object>> getData​(List<? extends Comparable<?>> ids, com.im.commons.progress.DFEnvironmentRO env)  
      Map<Comparable<?>,​Map<String,​Object>> getData​(List<? extends Comparable<?>> ids, Set<? extends com.im.df.api.ddl.DFField> fields, com.im.commons.progress.DFEnvironmentRO env)  
      com.im.df.api.ddl.DFEntity getEntity()  
      com.im.commons.progress.DFLockable getLockable()  
      int getRowCount​(com.im.commons.progress.DFEnvironmentRO env)  
      com.im.df.api.dml.DFSchemaDataProvider getSchemaDataProvider()  
      Map<Comparable<?>,​Map<String,​Object>> getWrappedData​(List<? extends Comparable<?>> ids, com.im.commons.progress.DFEnvironmentRO env)  
      List<com.im.df.api.support.DFUpdateInfo> insert​(List<Map<String,​Object>> values, Map<String,​Object> insertOptions, com.im.commons.progress.DFEnvironmentRW env)  
      com.im.df.api.support.DFUpdateInfo insert​(Map<String,​Object> values, Map<String,​Object> insertOptions, com.im.commons.progress.DFEnvironmentRW env)  
      com.im.df.api.support.DFUpdateInfo insertOrFindRow​(Map<String,​Object> values, Map<String,​Object> options, String lookupID, com.im.commons.progress.DFEnvironmentRW rw)
      Inserts a new row, or finds one which already exists.
      List<? extends com.im.df.api.dml.DFRowData> queryForData​(com.im.df.api.dml.DFTermExpression query, List<? extends com.im.df.api.ddl.DFField> fields, com.im.df.api.support.SortDirective sort, com.im.df.api.dml.EarlyResultsConsumer consumer, boolean filterOutNulls, com.im.commons.progress.DFEnvironmentRO env)
      Deprecated.
      List<? extends com.im.df.api.dml.DFRowData> queryForData​(com.im.df.api.dml.DFTermExpression query, List<? extends com.im.df.api.ddl.DFField> fields, com.im.df.api.support.SortDirective sort, com.im.df.api.dml.EarlyResultsConsumer consumer, com.im.commons.progress.DFEnvironmentRO env)  
      List<? extends Comparable<?>> queryForIds​(com.im.df.api.ddl.DFDataTree dataTree, com.im.df.api.dml.DFTermExpression query, com.im.df.api.support.SortDirective sort, com.im.commons.progress.DFEnvironmentRO env)
      Deprecated.
      List<? extends Comparable<?>> queryForIds​(com.im.df.api.dml.DFTermExpression query, com.im.df.api.support.SortDirective sort, com.im.commons.progress.DFEnvironmentRO env)  
      List<? extends Comparable<?>> queryForIds​(com.im.df.api.dml.DFTermExpression query, com.im.df.api.support.SortDirective sort, com.im.df.api.dml.EarlyResultsConsumer consumer, com.im.commons.progress.DFEnvironmentRO env)  
      List<? extends Object> queryForValues​(com.im.df.api.dml.DFTermExpression query, com.im.df.api.ddl.DFField selectField, com.im.df.api.support.SortDirective sort, com.im.commons.progress.DFEnvironmentRO env)  
      void reloadData()  
      void removeDFEntityDataListener​(com.im.df.api.support.DFEntityDataListener listener)  
      List<?> retrieveDistinctValuesForField​(com.im.df.api.ddl.DFField field, com.im.commons.progress.DFEnvironmentRO env)  
      List<?> retrieveDistinctValuesForField​(String fieldId)
      Deprecated.
      List<? extends Comparable<?>> sortIds​(List<? extends Comparable<?>> ids, com.im.df.api.support.SortDirective sort, com.im.commons.progress.DFEnvironmentRO env)  
      Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptions, com.im.commons.progress.DFEnvironmentRW env)  
      Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptions, com.im.commons.progress.DFEnvironmentRW env, boolean fireEvents)  
      Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptors, com.im.df.api.support.DFUndoConfig undoConfig, com.im.commons.progress.DFEnvironmentRW env)
      Deprecated.
      Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptors, com.im.df.api.support.DFUndoConfig undoConfig, com.im.commons.progress.DFEnvironmentRW env, boolean fireEvents)
      Deprecated.
      Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptions, com.im.df.api.support.DFUndoManager undoManager, String undoMsg, com.im.commons.progress.DFEnvironmentRW env)  
    • Constructor Detail

      • DBEntityDataProviderImpl

        public DBEntityDataProviderImpl​(com.im.df.api.ddl.DFEntity entity,
                                        com.chemaxon.dif.db.api.schema.DBSchemaImpl schema,
                                        DBSchemaDataProviderImpl sdProvider,
                                        boolean dmlEditorRole)
    • Method Detail

      • getSchemaDataProvider

        public com.im.df.api.dml.DFSchemaDataProvider getSchemaDataProvider()
        Specified by:
        getSchemaDataProvider in interface com.im.df.api.dml.DFEntityDataProvider
      • getEntity

        public com.im.df.api.ddl.DFEntity getEntity()
        Specified by:
        getEntity in interface com.im.df.api.dml.DFEntityDataProvider
      • getLockable

        public com.im.commons.progress.DFLockable getLockable()
        Specified by:
        getLockable in interface com.im.df.api.dml.DFEntityDataProvider
      • getRowCount

        public int getRowCount​(com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        getRowCount in interface com.im.df.api.dml.DFEntityDataProvider
      • queryForIds

        public List<? extends Comparable<?>> queryForIds​(com.im.df.api.dml.DFTermExpression query,
                                                         com.im.df.api.support.SortDirective sort,
                                                         com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        queryForIds in interface com.im.df.api.dml.DFEntityDataProvider
      • queryForIds

        public List<? extends Comparable<?>> queryForIds​(com.im.df.api.dml.DFTermExpression query,
                                                         com.im.df.api.support.SortDirective sort,
                                                         com.im.df.api.dml.EarlyResultsConsumer consumer,
                                                         com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        queryForIds in interface com.im.df.api.dml.DFEntityDataProvider
      • queryForValues

        public List<? extends Object> queryForValues​(com.im.df.api.dml.DFTermExpression query,
                                                     com.im.df.api.ddl.DFField selectField,
                                                     com.im.df.api.support.SortDirective sort,
                                                     com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        queryForValues in interface com.im.df.api.dml.DFEntityDataProvider
      • queryForData

        @Deprecated
        public List<? extends com.im.df.api.dml.DFRowData> queryForData​(com.im.df.api.dml.DFTermExpression query,
                                                                        List<? extends com.im.df.api.ddl.DFField> fields,
                                                                        com.im.df.api.support.SortDirective sort,
                                                                        com.im.df.api.dml.EarlyResultsConsumer consumer,
                                                                        boolean filterOutNulls,
                                                                        com.im.commons.progress.DFEnvironmentRO env)
        Deprecated.
        Specified by:
        queryForData in interface com.im.df.api.dml.DFEntityDataProvider
      • queryForData

        public List<? extends com.im.df.api.dml.DFRowData> queryForData​(com.im.df.api.dml.DFTermExpression query,
                                                                        List<? extends com.im.df.api.ddl.DFField> fields,
                                                                        com.im.df.api.support.SortDirective sort,
                                                                        com.im.df.api.dml.EarlyResultsConsumer consumer,
                                                                        com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        queryForData in interface com.im.df.api.dml.DFEntityDataProvider
      • queryForIds

        @Deprecated
        public List<? extends Comparable<?>> queryForIds​(com.im.df.api.ddl.DFDataTree dataTree,
                                                         com.im.df.api.dml.DFTermExpression query,
                                                         com.im.df.api.support.SortDirective sort,
                                                         com.im.commons.progress.DFEnvironmentRO env)
        Deprecated.
        Specified by:
        queryForIds in interface com.im.df.api.dml.DFEntityDataProvider
      • sortIds

        public List<? extends Comparable<?>> sortIds​(List<? extends Comparable<?>> ids,
                                                     com.im.df.api.support.SortDirective sort,
                                                     com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        sortIds in interface com.im.df.api.dml.DFEntityDataProvider
      • getData

        public Map<Comparable<?>,​Map<String,​Object>> getData​(List<? extends Comparable<?>> ids,
                                                                         com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        getData in interface com.im.df.api.dml.DFEntityDataProvider
      • getData

        public Map<Comparable<?>,​Map<String,​Object>> getData​(List<? extends Comparable<?>> ids,
                                                                         Set<? extends com.im.df.api.ddl.DFField> fields,
                                                                         com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        getData in interface com.im.df.api.dml.DFEntityDataProvider
      • getWrappedData

        public Map<Comparable<?>,​Map<String,​Object>> getWrappedData​(List<? extends Comparable<?>> ids,
                                                                                com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        getWrappedData in interface com.im.df.api.dml.DFEntityDataProvider
      • insert

        public com.im.df.api.support.DFUpdateInfo insert​(Map<String,​Object> values,
                                                         Map<String,​Object> insertOptions,
                                                         com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        insert in interface com.im.df.api.dml.DFEntityDataProvider
      • insert

        public List<com.im.df.api.support.DFUpdateInfo> insert​(List<Map<String,​Object>> values,
                                                               Map<String,​Object> insertOptions,
                                                               com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        insert in interface com.im.df.api.dml.DFEntityDataProvider
      • insertOrFindRow

        public com.im.df.api.support.DFUpdateInfo insertOrFindRow​(Map<String,​Object> values,
                                                                  Map<String,​Object> options,
                                                                  String lookupID,
                                                                  com.im.commons.progress.DFEnvironmentRW rw)
        Inserts a new row, or finds one which already exists. The implementation will search for a row, whose value of DFField identified by 'lookupID' parameter matches the value for that DFField in the 'values' map. If such a row exists, no changes are done and the row's PK is returned. If such a row does NOT exist, it is created and the ID of the newly inserted row is returned as a result.
        Parameters:
        values - The v alues to insert
        options -
        lookupID - The i d of the DFField which serves as the identity lookup key
        rw - The Environment to use for feedback
        Returns:
        PK of the existing or newly created row.
      • deleteIds

        public int deleteIds​(List ids,
                             com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        deleteIds in interface com.im.df.api.dml.DFEntityDataProvider
      • update

        @Deprecated
        public Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptors,
                                                                                                                com.im.df.api.support.DFUndoConfig undoConfig,
                                                                                                                com.im.commons.progress.DFEnvironmentRW env,
                                                                                                                boolean fireEvents)
        Deprecated.
        Specified by:
        update in interface com.im.df.api.dml.DFEntityDataProvider
      • update

        @Deprecated
        public Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptors,
                                                                                                                com.im.df.api.support.DFUndoConfig undoConfig,
                                                                                                                com.im.commons.progress.DFEnvironmentRW env)
        Deprecated.
        Specified by:
        update in interface com.im.df.api.dml.DFEntityDataProvider
      • update

        public Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptions,
                                                                                                                com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        update in interface com.im.df.api.dml.DFEntityDataProvider
      • update

        public Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptions,
                                                                                                                com.im.commons.progress.DFEnvironmentRW env,
                                                                                                                boolean fireEvents)
        Specified by:
        update in interface com.im.df.api.dml.DFEntityDataProvider
      • update

        public Map<com.im.df.api.support.DFUpdateDescription,​com.im.df.api.support.DFUpdateResult> update​(List<com.im.df.api.support.DFUpdateDescription> updateDescriptions,
                                                                                                                com.im.df.api.support.DFUndoManager undoManager,
                                                                                                                String undoMsg,
                                                                                                                com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        update in interface com.im.df.api.dml.DFEntityDataProvider
      • addDFEntityDataListener

        public void addDFEntityDataListener​(com.im.df.api.support.DFEntityDataListener listener)
        Specified by:
        addDFEntityDataListener in interface com.im.df.api.dml.DFEntityDataProvider
      • removeDFEntityDataListener

        public void removeDFEntityDataListener​(com.im.df.api.support.DFEntityDataListener listener)
        Specified by:
        removeDFEntityDataListener in interface com.im.df.api.dml.DFEntityDataProvider
      • reloadData

        public void reloadData()
        Specified by:
        reloadData in interface com.im.df.api.dml.DFEntityDataProvider
      • fireUpdateAll

        public void fireUpdateAll()
      • retrieveDistinctValuesForField

        @Deprecated
        public List<?> retrieveDistinctValuesForField​(String fieldId)
        Deprecated.
        Specified by:
        retrieveDistinctValuesForField in interface com.im.df.api.dml.DFEntityDataProvider
      • retrieveDistinctValuesForField

        public List<?> retrieveDistinctValuesForField​(com.im.df.api.ddl.DFField field,
                                                      com.im.commons.progress.DFEnvironmentRO env)
        Specified by:
        retrieveDistinctValuesForField in interface com.im.df.api.dml.DFEntityDataProvider
      • generateStatistics

        public String generateStatistics()
        Specified by:
        generateStatistics in interface com.im.df.api.dml.DFEntityDataProvider