|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.df.api.ddl.DFFields
public final class DFFields
Utility methods for DFField.
| Method Summary | |
|---|---|
static DFField |
createBinaryField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
Create new binary standard field. |
static DFField |
createBooleanField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
Create new boolean standard field. |
static DFField |
createDateField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
Create new date field with default column type. |
static DFField |
createFloatField(DFEntity entity,
String fieldName,
String columnName,
int size,
int scale,
DFEnvironmentRW env)
Create new float standard field with default column type. |
static DFField |
createIntegerField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
Create new integer standard field. |
static DFField |
createTextField(DFEntity entity,
String fieldName,
String columnName,
int size,
DFEnvironmentRW env)
Create new text standard field with default column type (VARCHAR). |
static Collection<? extends DFField> |
findDependentFields(Collection<? extends DFField> fields)
Finds calculated fields (means fields with DFFieldCalcCapability
that use the fields passed in. |
static List<? extends DFField> |
getCategoryFields(DFEntity entity)
Return fields belonging to the given entity which are appropriate to be used as a category field. |
static List<? extends DFField> |
getCategoryFields(List<? extends DFField> fields)
Take the given fields and returns only those which are appropriate to be used as a category field. |
static boolean |
isBinary(DFField field)
Test if this field is of Binary type. |
static boolean |
isBoolean(DFField field)
Test if this field is of Boolean type. |
static boolean |
isCalculated(DFField field)
Test if this field is Calculated field. |
static boolean |
isChemicalTerms(DFField field)
Test if this field is Chemical terms field. |
static boolean |
isDate(DFField field)
Test if this field is of Date type. |
static boolean |
isDynamicURL(DFField field)
Test if this field is of Dynamic URL type. |
static boolean |
isEditableValue(DFField field)
Check whether or not data for the field in entity can be edited. |
static boolean |
isFloat(DFField field)
Test if this field is of Float type. |
static boolean |
isID(DFField field)
Tests whether the given field is an ID field within its owning entity. |
static boolean |
isInteger(DFField field)
Test if this field is of Integer type. |
static boolean |
isRelationField(DFField field)
Check if column of field represents foreign key. |
static boolean |
isStandard(DFField field)
Test if this field is Standard field. |
static boolean |
isStaticURL(DFField field)
Test if this field is of Static URL type. |
static boolean |
isStructure(DFField field)
Test if this field is of Structure type. |
static boolean |
isText(DFField field)
Test if this field is of Text type. |
static boolean |
isURL(DFField field)
Test if this field is of URL type. |
static List<String> |
toNames(List<? extends DFField> fields)
Function mapping fields to their names. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isID(DFField field)
field - field to be checked
public static List<String> toNames(List<? extends DFField> fields)
fields - fields to map
public static List<? extends DFField> getCategoryFields(DFEntity entity)
entity - the entity
public static List<? extends DFField> getCategoryFields(List<? extends DFField> fields)
fields and returns only those which are appropriate to be used as a category field. That
is integer, text, boolean, etc. fields.
fields - fields from which to select category fields
public static DFField createIntegerField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
entity - Target entity.fieldName - Name of new field.columnName - Name of column for the new field.env - Locked environment.
public static DFField createBooleanField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
entity - Target entity.fieldName - Name of new field.columnName - Name of column for the new field.env - Locked environment.
public static DFField createFloatField(DFEntity entity,
String fieldName,
String columnName,
int size,
int scale,
DFEnvironmentRW env)
entity - Target entity.fieldName - Name of new field.columnName - Name of column for the new field.size - if value is -1 default value will be usedscale - if value is -1 default value will be usedenv - Locked environment.
public static DFField createTextField(DFEntity entity,
String fieldName,
String columnName,
int size,
DFEnvironmentRW env)
entity - Target entity.fieldName - Name of new field.columnName - Name of column for the new field.size - of column, if value is -1 default value will be usedenv - Locked environment.
public static DFField createDateField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
entity - Target entity.fieldName - Name of new field.columnName - Name of column for the new field.env - Locked environment.
public static DFField createBinaryField(DFEntity entity,
String fieldName,
String columnName,
DFEnvironmentRW env)
entity - Target entity.fieldName - Name of new field.columnName - Name of column for the new field.env - Locked environment.
public static boolean isInteger(DFField field)
field - Field to be tested
DFFieldIntegerCapabilitypublic static boolean isFloat(DFField field)
field - Field to be tested
DFFieldFloatCapabilitypublic static boolean isText(DFField field)
field - Field to be tested
DFFieldTextCapabilitypublic static boolean isBoolean(DFField field)
field - Field to be tested
DFFieldBooleanCapabilitypublic static boolean isDate(DFField field)
field - Field to be tested
DFFieldDateCapabilitypublic static boolean isStructure(DFField field)
field - Field to be tested
DFFieldStructureCapabilitypublic static boolean isBinary(DFField field)
field - Field to be tested
DFFieldBinaryCapabilitypublic static boolean isURL(DFField field)
isDynamicURL(com.im.df.api.ddl.DFField) and {
field - Field to be tested
DFFieldURLCapability - it means it true for both:
dynamic and static columnpublic static boolean isDynamicURL(DFField field)
field - Field to be tested
DFFieldURLCapability and
also has DFFieldCalcCapability.public static boolean isStaticURL(DFField field)
field - Field to be tested
DFFieldURLCapability and
doesn't have DFFieldCalcCapability.public static boolean isCalculated(DFField field)
field - Field to be tested
DFFieldCalculatedCapabilitypublic static boolean isChemicalTerms(DFField field)
field - Field to be tested
DFFieldChemicalTermsCapabilitypublic static boolean isStandard(DFField field)
field - Field to be tested
DBFieldCapability and
is not isCalculated(com.im.df.api.ddl.DFField)
is not isChemicalTerms(com.im.df.api.ddl.DFField)public static Collection<? extends DFField> findDependentFields(Collection<? extends DFField> fields)
DFFieldCalcCapability
that use the fields passed in.
fields - The fields to find dependencies for.
public static boolean isEditableValue(DFField field)
field - input field.
public static boolean isRelationField(DFField field)
field - input field.
|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||