Class DFEntities


  • public final class DFEntities
    extends java.lang.Object
    Common utilities related to DFEntity.
    Author:
    Petr Hamernik
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DFEntity createJChemEntity​(DFSchema schema, java.lang.String entityName, int jchemTableType, com.im.commons.progress.DFEnvironmentRW env)
      A convenience method to create a new jchem base entity named `entityName' in a parent Schema.
      static DFEntity createJChemEntity​(DFSchema schema, java.lang.String entityName, com.im.commons.progress.DFEnvironmentRW env)
      A convenience method to create a new jchem base entity named `entityName' in a parent Schema.
      static DFEntity createStandardEntity​(DFSchema schema, java.lang.String entityName, com.im.commons.progress.DFEnvironmentRW env)
      A convenience method to create a new standard database entity named `entityName' in a parent Schema.
      static boolean isJChemEntity​(DFEntity entity)
      Is this entity JChem type?
      static boolean isMarkushJChemEntity​(DFEntity entity)
      Determines whether a DFEntity is a Markush JChem entity.
      static boolean isQueryable​(DFEntity entity)
      Determines whether a DFEntity is a queryable.
      static boolean isStructureEntity​(DFEntity entity)
      Is this a structure entity?
      static boolean isVirtual​(DFEntity entity)
      Determines whether a DFEntity is a virtual entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isStructureEntity

        public static boolean isStructureEntity​(DFEntity entity)
        Is this a structure entity?
        Parameters:
        entity - Entity to be tested
        Returns:
        true for structure entity, false otherwise (typically standard DB table entity)
        Since:
        19.10.0
      • isJChemEntity

        public static boolean isJChemEntity​(DFEntity entity)
        Is this entity JChem type?
        Parameters:
        entity - Entity to be tested
        Returns:
        true for JChem entity, false otherwise (typically standard DB table entity)
      • isMarkushJChemEntity

        public static boolean isMarkushJChemEntity​(DFEntity entity)
        Determines whether a DFEntity is a Markush JChem entity.
        Parameters:
        entity - entity to be tested
        Returns:
        true for JChem Markush libraries entity , false otherwise
        Since:
        6.3
      • isVirtual

        public static boolean isVirtual​(DFEntity entity)
        Determines whether a DFEntity is a virtual entity.
        Parameters:
        entity - entity to be tested
        Returns:
        true for virtual entity, false otherwise
        Since:
        17.1.30
      • isQueryable

        public static boolean isQueryable​(DFEntity entity)
        Determines whether a DFEntity is a queryable. Entity is queryable if at least one of its fields is queryable.
        Parameters:
        entity - entity to be tested
        Returns:
        true for queryable entity, false otherwise
        Since:
        18.30.0
      • createJChemEntity

        public static DFEntity createJChemEntity​(DFSchema schema,
                                                 java.lang.String entityName,
                                                 com.im.commons.progress.DFEnvironmentRW env)
        A convenience method to create a new jchem base entity named `entityName' in a parent Schema. If the name is already used by a different entity, the next available name will be used instead. The method uses DFNewType to look up appropriate code that creates the entity. If the DFNewType cannot be found, the method throws UnsupportedOperationException. If the new type does not support the required options, it will throw IllegalArgumentException for the requested entity type.
        Parameters:
        schema - The parent schema
        entityName - The name for the new entity
        env - The execution environment with a valid DDL lock
        Returns:
        The instance of new entity
      • createJChemEntity

        public static DFEntity createJChemEntity​(DFSchema schema,
                                                 java.lang.String entityName,
                                                 int jchemTableType,
                                                 com.im.commons.progress.DFEnvironmentRW env)
        A convenience method to create a new jchem base entity named `entityName' in a parent Schema. If the name is already used by a different entity, the next available name will be used instead. The method uses DFNewType to look up appropriate code that creates the entity. If the DFNewType cannot be found, the method throws UnsupportedOperationException. If the new type does not support the required options, it will throw IllegalArgumentException for the requested entity type.
        Parameters:
        schema - The parent schema
        entityName - The name for the new entity
        jchemTableType - table type constant (@link TableTypeConstants)
        env - The execution environment with a valid DDL lock
        Returns:
        The instance of new entity
      • createStandardEntity

        public static DFEntity createStandardEntity​(DFSchema schema,
                                                    java.lang.String entityName,
                                                    com.im.commons.progress.DFEnvironmentRW env)
        A convenience method to create a new standard database entity named `entityName' in a parent Schema. If the name is already used by a different entity, the next available name will be used instead. The method uses DFNewType to look up appropriate code that creates the entity. If the DFNewType cannot be found, the method throws UnsupportedOperationException. If the new type does not support the required options, it will throw IllegalArgumentException for the requested entity type.
        Parameters:
        schema - The parent schema
        entityName - The name for the new entity
        env - The execution environment with a valid DDL lock
        Returns:
        The instance of new entity