public class FieldDefinition extends RecordPackWrapper implements FieldTypes
FieldDefinition
object can be used it to access a specific field of a layout.FieldTypeAudio, FieldTypeBinary, FieldTypeBool, FieldTypeDate, FieldTypeDouble, FieldTypeEnum, FieldTypeInteger, FieldTypeLong, FieldTypePicture, FieldTypeString, FieldTypeTable, VALUE_INTERPRETATION_ASSETREFERENCE, VALUE_INTERPRETATION_DATA_SIZE, VALUE_INTERPRETATION_DATE_ONLY, VALUE_INTERPRETATION_DATE_TIME, VALUE_INTERPRETATION_DEFAULT, VALUE_INTERPRETATION_LENGTH_IN_INCH, VALUE_INTERPRETATION_RESOLUTION, VALUE_INTERPRETATION_STRING_ENUM_LABEL, VALUE_INTERPRETATION_STRING_ENUM_MULTIPLE_VALUES, VALUE_INTERPRETATION_STRING_ENUM_RATING, VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY, VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY_MULTIPLE_VALUES, VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY_SINGLE_VALUE, VALUE_INTERPRETATION_STRING_USER_UID, VALUE_INTERPRETATION_TIME_ONLY
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
JPack |
getAdditionalFieldProperties()
Returns the pack that provides the additional field properties.
|
ItemCollection |
getAllVocabulariesItemCollection()
Returns an
ItemCollection containing all items of the $Vocabulary catalog. |
java.lang.String |
getCanonicalFieldReference(boolean includeRootTable)
Returns a field reference for this field which is a combination of this fields table with the field
GUID appended. |
GUID |
getCanonicalFieldUID()
This returns the GUID that can be used when referencing this field in external structures like record view sets or print templates.
|
CumulusSession |
getCumulusSession()
Returns the current
CumulusSession object. |
java.lang.String |
getDescription()
Return the description text for the current language.
|
java.lang.String |
getDescription(int languageID)
Return the description text for the given language.
|
boolean |
getFieldLinkingForAddingUseAllInputValues()
Returns whether this field should be linked to all filter values when adding records.
|
boolean |
getFieldLinkingForUpdatingUseAllInputValues()
Returns whether this field should be linked to all filter values when updating records.
|
boolean |
getFieldLinkingUseAllMatchingFields()
Returns whether all newly installed filters should be automatically linked to this field.
|
java.lang.String |
getFieldReference(boolean includeRootTable,
boolean canonical)
Returns a field reference for this field which is a combination of this fields table with the field
GUID appended. |
int |
getFieldType()
Returns the type of the field.
|
GUID |
getFieldUID()
Returns the field
GUID . |
int |
getFlags()
Returns the additional field flag.
|
java.lang.String |
getFormula()
Returns the formula for this field.
|
int |
getIndexing()
Returns the flag determining the indexing configuration.
|
java.lang.String |
getInitialValue()
Returns the "Initial Value" of the field.
|
Layout |
getLayout()
Returns the layout that created this field definition.
|
GUID |
getMultipleLanguagesBaseFieldGUID()
Returns for a multi language field the base field GUID.
|
int |
getMultipleLanguagesFieldLanguage()
Returns for a multi language field the fields content language.
|
MultipleLanguagesFieldType |
getMultipleLanguagesFieldType()
Returns the multi language field type.
|
GUID |
getMultipleLanguagesMappedFieldGUID()
Returns for a multi language field the mapped field GUID.
|
java.lang.String |
getName()
Returns the name of the field using the default language ID.
|
java.lang.String |
getName(int languageID)
Returns the name of the field in the given language ID.
|
java.lang.String |
getName(int languageID,
boolean showParentTables,
boolean includeRootTable)
Returns the name of the field in the given language ID and optionally prefixes the name with the parent table names.
|
boolean |
getRestrictVocabularyItems()
Returns whether this vocabulary field is restricted.
|
int |
getShortID()
Returns the internal ID of the field.
|
java.util.Set<java.lang.Integer> |
getSortIndexLanguages()
Returns for a field of type string a set of language IDs with specific sorting.
|
java.lang.String |
getStringEnumDescription(int enumID)
Returns the textual string enum description for the current language.
|
java.lang.String |
getStringEnumDescription(int enumID,
int languageID)
Returns the textual string enum description for the specified language.
|
java.util.List<java.lang.Integer> |
getStringEnumIDs()
Returns for a field of type string enum the list of string enum IDs in sorted order for the current language.
|
java.util.List<java.lang.Integer> |
getStringEnumIDs(int languageID)
Returns for a field of type string enum the list of string enum IDs in sorted order for the specified language.
|
java.lang.String |
getStringEnumName(int enumID)
Returns the textual string enum representation for the current language.
|
java.lang.String |
getStringEnumName(int enumID,
int languageID)
Returns the textual string enum representation for the specified language.
|
boolean |
getUseFieldLinkingForAdding()
Returns whether this field should be linked to filters when adding records.
|
boolean |
getUseFieldLinkingForSaving()
Returns whether this field should be linked to filters when saving records.
|
boolean |
getUseFieldLinkingForUpdating()
Returns whether this field should be linked to filters when updating records.
|
boolean |
getUseInitialValue()
Returns the "Use Initial Value" state of the field.
|
int |
getValueInterpretation()
Returns the value interpretation for this field.
|
FieldValueMode |
getValueMode()
Returns the
value mode for this field. |
java.lang.String |
getValueTableName()
Returns for a field definition of type table the internal table name of the sub table.
|
ItemCollection |
getVocabularyItemCollection()
Returns an empty
ItemCollection of the $Vocabulary catalog that has set the defined query (see getVocabularyQuery() ) as filter. |
java.lang.String |
getVocabularyQuery()
Returns the query string defined for the field of value interpretation
FieldTypes.VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY_MULTIPLE_VALUES or FieldTypes.VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY_SINGLE_VALUE . |
int |
hashCode() |
boolean |
isContentIndexed()
Returns whether this field is content indexed.
|
boolean |
isContentIndexedNoWordBreak()
Returns whether this field is content indexed without breaking words.
|
boolean |
isEditable()
Returns whether this field should be editable when providing some user interface to a user.
|
boolean |
isMandatory()
Returns whether this field is mandatory.
|
boolean |
isSortIndexed()
Returns whether this field is sort indexed.
|
boolean |
isVisibleInFindWindow()
Returns whether this field is shown in the clients find window.
|
boolean |
isVisibleInSortPopup()
Returns whether this field is shown in the clients sorting field popup.
|
boolean |
isWordIndexed()
Returns whether this field is word indexed.
|
java.lang.String |
toString()
Returns this fields name.
|
boolean |
useRegionalSettings()
Returns whether this field value should be shown using the regional setting.
|
java.lang.String |
validate(int indexType)
Validates the given index of this field and returns an error message.
|
toXMLString
public GUID getFieldUID()
GUID
.GUID
.public GUID getCanonicalFieldUID()
public java.lang.String getCanonicalFieldReference(boolean includeRootTable)
GUID
appended. The root table name Cumulus.TABLE_NAME_ASSET_RECORDS
or Cumulus.TABLE_NAME_CATEGORIES
can optionally be omitted. This is useful when creating sub-table queries
where the root table name must not be used for a sub-table field reference.includeRootTable
- if true
the root table name Cumulus.TABLE_NAME_ASSET_RECORDS
or Cumulus.TABLE_NAME_CATEGORIES
is
included, otherwise omittedpublic java.lang.String getFieldReference(boolean includeRootTable, boolean canonical)
GUID
appended. The root table name Cumulus.TABLE_NAME_ASSET_RECORDS
or Cumulus.TABLE_NAME_CATEGORIES
can optionally be omitted. This is useful when creating sub-table queries
where the root table name must not be used for a sub-table field reference.includeRootTable
- if true
the root table name Cumulus.TABLE_NAME_ASSET_RECORDS
or Cumulus.TABLE_NAME_CATEGORIES
is
included, otherwise omittedcanonical
- if true
the returned reference uses canonical UIDs instead of the real UIDspublic int getShortID()
GUID
to access the fields of a layout.public int getFieldType()
public int getValueInterpretation()
FieldTypes.VALUE_INTERPRETATION_DEFAULT
FieldTypes.VALUE_INTERPRETATION_ASSETREFERENCE
FieldTypes.VALUE_INTERPRETATION_DATA_SIZE
FieldTypes.VALUE_INTERPRETATION_DATE_ONLY
FieldTypes.VALUE_INTERPRETATION_LENGTH_IN_INCH
FieldTypes.VALUE_INTERPRETATION_RESOLUTION
FieldTypes.VALUE_INTERPRETATION_TIME_ONLY
public int getIndexing()
isSortIndexed()
etc. instead.public int getFlags()
isMandatory()
etc. instead.public boolean isSortIndexed()
public boolean isContentIndexed()
public boolean isContentIndexedNoWordBreak()
isContentIndexed()
returned
true.public boolean isWordIndexed()
public boolean isMandatory()
public boolean isVisibleInSortPopup()
public boolean isVisibleInFindWindow()
public boolean useRegionalSettings()
true
if the field value should be shown using the regional settingpublic java.lang.String getName()
FieldDefinition myFieldDefinition = myLayout.getFieldDefinitions().getFieldDefinitionByID(GUID.UID_REC_RECORD_NAME); String sFieldName = myFieldDefinition.getName();
public java.lang.String getName(int languageID)
languageID
- the language ID for which the field name is to be returned.public java.lang.String getName(int languageID, boolean showParentTables, boolean includeRootTable)
languageID
- the language ID for which the field name is to be returned.showParentTables
- specifies whether the resulting String should also contain the parent table namesincludeRootTable
- whether to display the Records or Categories root table in the returned namepublic java.lang.String getDescription()
public java.lang.String getDescription(int languageID)
languageID
- description for given languagepublic boolean isEditable()
public FieldValueMode getValueMode()
value mode
for this field.value mode
for this fieldpublic java.lang.String getFormula()
public java.lang.String getInitialValue()
getUseInitialValue()
is true
and no other field linking is active for this
field, the initial value is used when cataloging (adding) and/or updating records.public java.util.List<java.lang.Integer> getStringEnumIDs() throws InvalidArgumentException
InvalidArgumentException
- in case of a field type mismatchpublic java.util.List<java.lang.Integer> getStringEnumIDs(int languageID) throws InvalidArgumentException
languageID
- language ID to get the sorted string enum IDs forInvalidArgumentException
- in case of a field type mismatchpublic java.lang.String getStringEnumName(int enumID) throws InvalidArgumentException
enumID
- ID of the enum to get the textual representation forInvalidArgumentException
- in case of an invalid IDpublic java.lang.String getStringEnumName(int enumID, int languageID) throws InvalidArgumentException
enumID
- ID of the enum to get the textual representation forlanguageID
- ID of the wanted languageInvalidArgumentException
- in case of an invalid IDpublic java.lang.String getStringEnumDescription(int enumID) throws InvalidArgumentException
enumID
- ID of the enum to get the description forInvalidArgumentException
- in case of an invalid IDpublic java.lang.String getStringEnumDescription(int enumID, int languageID) throws InvalidArgumentException
enumID
- ID of the enum to get the description forlanguageID
- ID of the wanted languageInvalidArgumentException
- in case of an invalid IDpublic Layout getLayout()
public CumulusSession getCumulusSession()
CumulusSession
object.CumulusSession
object.public boolean getUseFieldLinkingForAdding()
public boolean getFieldLinkingForAddingUseAllInputValues()
getUseFieldLinkingForAdding()
.public boolean getUseFieldLinkingForUpdating()
public boolean getFieldLinkingForUpdatingUseAllInputValues()
getUseFieldLinkingForUpdating()
.public boolean getUseFieldLinkingForSaving()
public boolean getFieldLinkingUseAllMatchingFields()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getValueTableName()
public boolean getUseInitialValue()
true
and no other field linking is active for this field, the value defined under getInitialValue()
is taken when adding and/or updating records. Note: If the FieldDefinition
object is taken from the Categories
table, this method is not available for the following basic category fields: public JPack getAdditionalFieldProperties()
public java.lang.String toString()
toString
in class java.lang.Object
public MultipleLanguagesFieldType getMultipleLanguagesFieldType()
public int getMultipleLanguagesFieldLanguage()
LanguageManager.LANGUAGE_NONE
if this is not a multi language fieldpublic GUID getMultipleLanguagesMappedFieldGUID()
MultipleLanguagesFieldType | GUID |
NO_MULTIPLE_LANGUAGE | GUID of this field |
BASE_FIELD | virtual field GUID representing this field in the specified base language |
CHILD_FIELD | field GUID of the base field of this child language field |
public GUID getMultipleLanguagesBaseFieldGUID()
MultipleLanguagesFieldType | GUID |
NO_MULTIPLE_LANGUAGE | GUID of this field |
BASE_FIELD | GUID of this field |
CHILD_FIELD | field GUID of the base field of this child language field |
public ItemCollection getAllVocabulariesItemCollection()
ItemCollection
containing all items of the $Vocabulary catalog. This collection can't be used to search for items. Instead it can be
used to access all vocabulary items.public ItemCollection getVocabularyItemCollection()
ItemCollection
of the $Vocabulary catalog that has set the defined query (see getVocabularyQuery()
) as filter.public boolean getRestrictVocabularyItems()
true
if this field is restrictedpublic java.lang.String getVocabularyQuery()
FieldTypes.VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY_MULTIPLE_VALUES
or FieldTypes.VALUE_INTERPRETATION_STRING_ENUM_VOCABULARY_SINGLE_VALUE
.public java.util.Set<java.lang.Integer> getSortIndexLanguages()
public java.lang.String validate(int indexType)
indexType
- index to validatewww.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.