Class DBEntityAbstractJChemImpl

  • All Implemented Interfaces:
    com.chemaxon.ijc.db.dao.data.generators.DFValueGenerator.Provider, com.im.df.api.capabilities.DBEntityCapability, com.im.df.api.capabilities.JChemEntityCapability, com.im.df.api.capabilities.StructureEntityCapability, com.im.df.api.ddl.DFCapability, com.im.df.api.ddl.DFEntity, com.im.df.api.ddl.DFItem, com.im.df.api.support.PropertiesEditingConfigurable, com.im.df.api.support.PropertiesEditingConfigurable.Extra
    Direct Known Subclasses:
    DBEntityAbstractJChemBaseImpl, DBEntityJChemCartStandardImpl

    public abstract class DBEntityAbstractJChemImpl
    extends com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl
    implements com.im.df.api.capabilities.JChemEntityCapability
    JChem Entity base class implementation. The concrete classes for JChemBase and JChem cartridge tables extend this class.

    When creating the entity, two use cases are supported:

    A. connecting to an *existing* metadata in the storage
    1. Use DBEntityAbstractJChemImpl.createInstance, then
    2. change the entity's attributes as needed
    3. don't forget to set ID field ID!
    4. call #connectExisting(com.im.df.api.support.DFEnvironmentRW)
    B. creating a new artifact (for either new or existing data)
    1. Use DBEntityAbstractJChemImpl.createInstance, then
    2. change the attributes, using init methods
    3. call #createNew(boolean, com.im.df.api.support.DFEnvironmentRW)
    TODO JCC - move all of the JChemBase specific functionality into the DBEntityAbstractJChemBaseImpl subclass, leaving only the pure JChem specific things here (e.g things that are relevant to cartridge indexes on standard tables).
    Author:
    Tim Dudgeon, Svata Dedic
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  DBEntityAbstractJChemImpl.ColValidator  
      • Nested classes/interfaces inherited from class com.chemaxon.dif.db.api.item.DBItemAbstractImpl

        com.chemaxon.dif.db.api.item.DBItemAbstractImpl.AbstractUpdater
      • Nested classes/interfaces inherited from interface com.im.df.api.ddl.DFItem

        com.im.df.api.ddl.DFItem.Handle<T extends com.im.df.api.ddl.DFItem>
      • Nested classes/interfaces inherited from interface com.im.df.api.support.PropertiesEditingConfigurable

        com.im.df.api.support.PropertiesEditingConfigurable.Extra
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEFAULT_ABSOLUTE_STEREO  
      static boolean DEFAULT_DUPLICATE_FILTERING  
      static boolean DEFAULT_EMPTY_STRUCTURES_ALLOWED  
      static boolean DEFAULT_TAUTOMER_DUPLICATE_CHECKING  
      static int VERSION_UNSPECIFIED  
      • Fields inherited from class com.chemaxon.dif.db.api.item.DBItemAbstractImpl

        DEFAULT_CHARSET
      • Fields inherited from interface com.im.df.api.capabilities.DBEntityCapability

        PROP_DEFAULT_SORT, PROP_DOMAIN, PROP_TABLE_NAME
      • Fields inherited from interface com.im.df.api.ddl.DFEntity

        PROP_FIELDS, PROP_LISTS
      • Fields inherited from interface com.im.df.api.ddl.DFItem

        PROP_CAPABILITIES, PROP_DESCRIPTION, PROP_ID, PROP_NAME, PROP_TYPE, PROP_VALID
      • Fields inherited from interface com.im.df.api.capabilities.JChemEntityCapability

        IMPORT_OPTION_SET_CHIRAL_FLAG, PROP_ABSOLUTE_STEREO, PROP_DUPLICATE_FILTERING, PROP_EMPTY_STRUCTURES_ALLOWED, PROP_JCHEM_TABLE_TYPE, PROP_NUMBER_OF_EDGES, PROP_NUMBER_OF_INTS, PROP_NUMBER_OF_ONES, PROP_STANDARDIZER_CONFIG, PROP_STRUCTURE_COLUMN_NAME, PROP_TAUTOMER_DUPLICATE_CHECKING
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected List<com.im.ijcs.api.ddl.dto.PropInfo> buildPropInfos()  
      DBFieldChemicalTerms createChemicalTermsField​(com.im.ijcs.api.ddl.dto.FieldInfo dto, com.im.commons.progress.DFEnvironmentRW env)  
      com.chemaxon.dif.db.util.DBNameUtils.Validator createColumnNameValidator()  
      com.chemaxon.dif.db.api.item.DBItemAbstractImpl.AbstractUpdater createUpdater()  
      protected static boolean determineDuplicateFilteringFromDTO​(com.im.ijcs.api.ddl.dto.EntityInfo dto)  
      protected static boolean determineEmptyStrucutresAllowedFromDTO​(com.im.ijcs.api.ddl.dto.EntityInfo dto)  
      protected void fixFieldEditing​(com.im.df.api.ddl.DFField f, com.im.commons.progress.DFEnvironmentRW env)  
      String getCurrentVersionNumber()  
      chemaxon.jchem.db.JChemSearch.DissimilarityMetrics getDissimilarityMetrics()  
      chemaxon.standardizer.Standardizer getEntityDefaultStandardizer()  
      chemaxon.standardizer.Standardizer getEntityStandardizer()  
      com.im.commons.db.util.SchemaQualifiedName getJChemPropertyTable()  
      com.im.commons.db.ddl.tablesets.AbstractJChemTableSetInfo getJChemTableSetInfo()  
      int getJchemTableType()
      The table type of the JChem table.
      List<chemaxon.descriptors.MolecularDescriptor> getMolecularDescriptors()  
      int getNumberOfEdges()  
      int getNumberOfInts()  
      int getNumberOfOnes()  
      String getStandardizerConfig()
      Getter for property standardizerConfig.
      com.im.df.api.ddl.DFField getStructureField()  
      int getSupportedVersionNumber()
      Get the version of this entity that is supported by this version of IJC.
      void handleChanges​(com.im.ijcs.api.ddl.dto.ItemPersistentInfo nue)  
      void handleUpdateTableSetInfo​(com.im.commons.db.ddl.tablesets.TableSetInfo old, com.im.commons.db.ddl.tablesets.TableSetInfo nue)  
      boolean isAbsoluteStereo()
      Getter for property absoluteStereo.
      boolean isDuplicateFiltering()
      Getter for property duplicateFiltering.
      boolean isEmptyStructuresAllowed()
      Getter for property emptyStructuresAllowed.
      boolean isMandatoryField​(com.im.df.api.ddl.DFField field)  
      boolean isTautomerDuplicateChecking()
      Getter for property duplicateFiltering.
      void setAbsoluteStereo​(boolean absoluteStereo, com.im.commons.progress.DFEnvironmentRW env)
      Setter for property absoluteStereo.
      void setDuplicateFiltering​(boolean duplicateFiltering, com.im.commons.progress.DFEnvironmentRW env)
      Setter for property duplicateFiltering.
      void setEmptyStructuresAllowed​(boolean emptyStructuresAllowed, com.im.commons.progress.DFEnvironmentRW env)
      Setter for property emptyStructuresAllowed.
      void setStandardizerConfig​(String standardizerConfig, com.im.commons.progress.DFEnvironmentRW env)
      Set the standardizer configuration for the JChem table.
      void setTableName​(String tableName, com.im.commons.progress.DFEnvironmentRW env)  
      • Methods inherited from class com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl

        activateItem, addCommaSeparatedPropsForToString, canDrop, claimTableOwnership, createDao, createDefaultValueGenerator, fieldRegistered, findFieldForColumn, fixEditingFlags, getDao, getFieldAccess, getFields, getFirstTableInfo, getHandle, getIdField, getIdFieldId, getJoins, getListAccess, getLists, getNameValidator, getSchema, getSchemaImpl, getSchemaQualifiedName, getTableInfos, getTableManagerTableType, getTableName, getTableSetInfo, getValueGenerator, getValueGeneratorDef, getValueGeneratorFactories, getXmlBean, initTypeDB, initXAttributes, invalidateSubitems, isReadOnly, setName
      • Methods inherited from class com.chemaxon.dif.db.api.item.DBItemAbstractImpl

        addCapabilitiesFromCapabilityProviders, addCapability, addPropertyChangeListener, doGetHandle, ensureValid, equals, findOwner, firePropertyChange, firePropertyChange, getCapabilities, getDescription, getId, getName, getXAttributesImpl, handleOwner, handleUpdateDescription, handleUpdateName, handleXAttrs, hashCode, initXAttributes, invalidate, isActive, isCapabilityProviderAllowed, isDifferent, isPropertyEditable, isValid, removeCapability, removePropertyChangeListener, replaceCapability, setDescription, setPropertyEditable, toString
      • Methods inherited from interface com.im.df.api.ddl.DFItem

        addPropertyChangeListener, getCapabilities, getDescription, getId, getName, getType, isValid, removePropertyChangeListener, setDescription
      • Methods inherited from interface com.im.df.api.capabilities.JChemEntityCapability

        newJChemSearchOptionsFromOld, supportedOperators, supportsNonHits
      • Methods inherited from interface com.im.df.api.support.PropertiesEditingConfigurable

        isPropertyEditable
      • Methods inherited from interface com.im.df.api.support.PropertiesEditingConfigurable.Extra

        setPropertyEditable
      • Methods inherited from interface com.im.df.api.capabilities.StructureEntityCapability

        defaultJChemSearchOptions, supportsOptions
    • Field Detail

      • DEFAULT_ABSOLUTE_STEREO

        public static final boolean DEFAULT_ABSOLUTE_STEREO
        See Also:
        Constant Field Values
      • DEFAULT_DUPLICATE_FILTERING

        public static final boolean DEFAULT_DUPLICATE_FILTERING
        See Also:
        Constant Field Values
      • DEFAULT_TAUTOMER_DUPLICATE_CHECKING

        public static final boolean DEFAULT_TAUTOMER_DUPLICATE_CHECKING
        See Also:
        Constant Field Values
      • DEFAULT_EMPTY_STRUCTURES_ALLOWED

        public static final boolean DEFAULT_EMPTY_STRUCTURES_ALLOWED
        See Also:
        Constant Field Values
    • Method Detail

      • determineEmptyStrucutresAllowedFromDTO

        protected static boolean determineEmptyStrucutresAllowedFromDTO​(com.im.ijcs.api.ddl.dto.EntityInfo dto)
      • determineDuplicateFilteringFromDTO

        protected static boolean determineDuplicateFilteringFromDTO​(com.im.ijcs.api.ddl.dto.EntityInfo dto)
      • fixFieldEditing

        protected final void fixFieldEditing​(com.im.df.api.ddl.DFField f,
                                             com.im.commons.progress.DFEnvironmentRW env)
        Overrides:
        fixFieldEditing in class com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl
      • isMandatoryField

        public final boolean isMandatoryField​(com.im.df.api.ddl.DFField field)
        Overrides:
        isMandatoryField in class com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl
      • setTableName

        public void setTableName​(String tableName,
                                 com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        setTableName in interface com.im.df.api.capabilities.DBEntityCapability
      • getStructureField

        public final com.im.df.api.ddl.DFField getStructureField()
        Specified by:
        getStructureField in interface com.im.df.api.capabilities.JChemEntityCapability
      • getNumberOfInts

        public final int getNumberOfInts()
        Specified by:
        getNumberOfInts in interface com.im.df.api.capabilities.JChemEntityCapability
      • getNumberOfOnes

        public final int getNumberOfOnes()
        Specified by:
        getNumberOfOnes in interface com.im.df.api.capabilities.JChemEntityCapability
      • getNumberOfEdges

        public final int getNumberOfEdges()
        Specified by:
        getNumberOfEdges in interface com.im.df.api.capabilities.JChemEntityCapability
      • isAbsoluteStereo

        public final boolean isAbsoluteStereo()
        Getter for property absoluteStereo.
        Specified by:
        isAbsoluteStereo in interface com.im.df.api.capabilities.JChemEntityCapability
        Returns:
        Value of property absoluteStereo.
      • getJchemTableType

        public final int getJchemTableType()
        The table type of the JChem table.
        Specified by:
        getJchemTableType in interface com.im.df.api.capabilities.StructureEntityCapability
        Returns:
        The table type as defined by one of the TableTypeConstants.TABLE_TYPE_* constants.
      • setAbsoluteStereo

        public final void setAbsoluteStereo​(boolean absoluteStereo,
                                            com.im.commons.progress.DFEnvironmentRW env)
        Setter for property absoluteStereo.
        Specified by:
        setAbsoluteStereo in interface com.im.df.api.capabilities.JChemEntityCapability
        Parameters:
        absoluteStereo - New value of property absoluteStereo.
        env - The read/write environment.
      • getJChemPropertyTable

        public final com.im.commons.db.util.SchemaQualifiedName getJChemPropertyTable()
        Specified by:
        getJChemPropertyTable in interface com.im.df.api.capabilities.JChemEntityCapability
      • isDuplicateFiltering

        public final boolean isDuplicateFiltering()
        Getter for property duplicateFiltering.
        Specified by:
        isDuplicateFiltering in interface com.im.df.api.capabilities.JChemEntityCapability
        Returns:
        Value of property duplicateFiltering.
      • isTautomerDuplicateChecking

        public final boolean isTautomerDuplicateChecking()
        Getter for property duplicateFiltering.
        Specified by:
        isTautomerDuplicateChecking in interface com.im.df.api.capabilities.JChemEntityCapability
        Returns:
        Value of property duplicateFiltering.
      • setDuplicateFiltering

        public final void setDuplicateFiltering​(boolean duplicateFiltering,
                                                com.im.commons.progress.DFEnvironmentRW env)
        Setter for property duplicateFiltering.
        Specified by:
        setDuplicateFiltering in interface com.im.df.api.capabilities.JChemEntityCapability
        Parameters:
        duplicateFiltering - New value of property duplicateFiltering.
        env - The read/write environment.
      • isEmptyStructuresAllowed

        public final boolean isEmptyStructuresAllowed()
        Getter for property emptyStructuresAllowed.
        Specified by:
        isEmptyStructuresAllowed in interface com.im.df.api.capabilities.StructureEntityCapability
        Returns:
        Value of property emptyStructuresAllowed.
      • setEmptyStructuresAllowed

        public final void setEmptyStructuresAllowed​(boolean emptyStructuresAllowed,
                                                    com.im.commons.progress.DFEnvironmentRW env)
        Setter for property emptyStructuresAllowed.
        Specified by:
        setEmptyStructuresAllowed in interface com.im.df.api.capabilities.JChemEntityCapability
        Parameters:
        emptyStructuresAllowed - New value of property emptyStructuresAllowed.
        env - The read/write environment.
      • getStandardizerConfig

        public final String getStandardizerConfig()
        Getter for property standardizerConfig.
        Specified by:
        getStandardizerConfig in interface com.im.df.api.capabilities.JChemEntityCapability
        Returns:
        Value of property standardizerConfig.
      • getEntityStandardizer

        public final chemaxon.standardizer.Standardizer getEntityStandardizer()
        Specified by:
        getEntityStandardizer in interface com.im.df.api.capabilities.JChemEntityCapability
      • getEntityDefaultStandardizer

        public final chemaxon.standardizer.Standardizer getEntityDefaultStandardizer()
        Specified by:
        getEntityDefaultStandardizer in interface com.im.df.api.capabilities.JChemEntityCapability
      • setStandardizerConfig

        public final void setStandardizerConfig​(String standardizerConfig,
                                                com.im.commons.progress.DFEnvironmentRW env)
        Set the standardizer configuration for the JChem table.
        Specified by:
        setStandardizerConfig in interface com.im.df.api.capabilities.JChemEntityCapability
        Parameters:
        standardizerConfig - New value of property standardizerConfig.
        env - The read/write environment.
      • getCurrentVersionNumber

        public final String getCurrentVersionNumber()
        Specified by:
        getCurrentVersionNumber in interface com.im.df.api.capabilities.JChemEntityCapability
      • getSupportedVersionNumber

        public final int getSupportedVersionNumber()
        Get the version of this entity that is supported by this version of IJC.
        Specified by:
        getSupportedVersionNumber in interface com.im.df.api.capabilities.JChemEntityCapability
        Returns:
        The version number from the JChem property table
      • createColumnNameValidator

        public com.chemaxon.dif.db.util.DBNameUtils.Validator createColumnNameValidator()
        Overrides:
        createColumnNameValidator in class com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl
      • getMolecularDescriptors

        public final List<chemaxon.descriptors.MolecularDescriptor> getMolecularDescriptors()
        Specified by:
        getMolecularDescriptors in interface com.im.df.api.capabilities.JChemEntityCapability
      • getDissimilarityMetrics

        public final chemaxon.jchem.db.JChemSearch.DissimilarityMetrics getDissimilarityMetrics()
        Specified by:
        getDissimilarityMetrics in interface com.im.df.api.capabilities.JChemEntityCapability
      • getJChemTableSetInfo

        public final com.im.commons.db.ddl.tablesets.AbstractJChemTableSetInfo getJChemTableSetInfo()
      • createChemicalTermsField

        public DBFieldChemicalTerms createChemicalTermsField​(com.im.ijcs.api.ddl.dto.FieldInfo dto,
                                                             com.im.commons.progress.DFEnvironmentRW env)
      • createUpdater

        public final com.chemaxon.dif.db.api.item.DBItemAbstractImpl.AbstractUpdater createUpdater()
        Specified by:
        createUpdater in class com.chemaxon.dif.db.api.item.DBItemAbstractImpl
      • buildPropInfos

        protected final List<com.im.ijcs.api.ddl.dto.PropInfo> buildPropInfos()
        Overrides:
        buildPropInfos in class com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl
      • handleChanges

        public void handleChanges​(com.im.ijcs.api.ddl.dto.ItemPersistentInfo nue)
        Overrides:
        handleChanges in class com.chemaxon.dif.db.api.item.DBItemAbstractImpl
      • handleUpdateTableSetInfo

        public void handleUpdateTableSetInfo​(com.im.commons.db.ddl.tablesets.TableSetInfo old,
                                             com.im.commons.db.ddl.tablesets.TableSetInfo nue)
        Overrides:
        handleUpdateTableSetInfo in class com.chemaxon.dif.db.api.entity.DBEntityAbstractImpl