Package com.im.df.api.ddl
Class DFEntities
- java.lang.Object
-
- com.im.df.api.ddl.DFEntities
-
public final class DFEntities extends java.lang.Object
Common utilities related toDFEntity
.- 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 aDFEntity
is a Markush JChem entity.static boolean
isQueryable(DFEntity entity)
Determines whether aDFEntity
is a queryable.static boolean
isStructureEntity(DFEntity entity)
Is this a structure entity?static boolean
isVirtual(DFEntity entity)
Determines whether aDFEntity
is a virtual entity.
-
-
-
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 aDFEntity
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 aDFEntity
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 aDFEntity
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 usesDFNewType
to look up appropriate code that creates the entity. If the DFNewType cannot be found, the method throwsUnsupportedOperationException
. If the new type does not support the required options, it will throwIllegalArgumentException
for the requested entity type.- Parameters:
schema
- The parent schemaentityName
- The name for the new entityenv
- 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 usesDFNewType
to look up appropriate code that creates the entity. If the DFNewType cannot be found, the method throwsUnsupportedOperationException
. If the new type does not support the required options, it will throwIllegalArgumentException
for the requested entity type.- Parameters:
schema
- The parent schemaentityName
- The name for the new entityjchemTableType
- 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 usesDFNewType
to look up appropriate code that creates the entity. If the DFNewType cannot be found, the method throwsUnsupportedOperationException
. If the new type does not support the required options, it will throwIllegalArgumentException
for the requested entity type.- Parameters:
schema
- The parent schemaentityName
- The name for the new entityenv
- The execution environment with a valid DDL lock- Returns:
- The instance of new entity
-
-