public class AttributeDefinition extends SchemaObjectDefinition
Attribute
,
ClassObjectDefinition
,
Serialized FormLibraryObjectDefinition.EnumToIntegerCode, LibraryObjectDefinition.LookupByName
Modifier and Type | Field and Description |
---|---|
static String |
COMMON_NAME_SYSTEMOPTION_NAME
The name of the system option that contains the common name to
associate with the Attribute being created.
|
static String |
DEFINITIONSETTINGPOLICY_SYSTEMOPTION_NAME
The name of the system option containing the policy of applying a setting
in a LibraryObjectDefinition for an Attribute in the
applySettings method in LibraryObjectDefinition classes. |
static String |
DROP_COLUMN_SYSTEMOPTION_NAME
The name of the system option whose boolean AttributeValue controls
whether, in removing an attribute from a ClassObject, that attribute's
column in the base table is dropped or marked unused.
|
static String |
EXISTING_COLUMN_SYSTEMOPTION_NAME
The name of the system option whose string AtributeValue is the name of
an existing column in the base table for this attribute's ClassObject.
|
static String |
EXISTING_INDEX_SYSTEMOPTION_NAME
The name of the system option whose string AttributeValue is the name
of the index on the attribute's column in the ClassObject's base table.
|
static String |
MULTIVALUE_TABLE_SUFFIX_SYSTEMOPTION_NAME
The name of the system option whose string is the
table name suffix used to derive the table name for the map or array values
used for the Attribute being defined.
|
static String |
STANDARD_SIMPLEPROPERTY_ARRAY_SYSTEMOPTION_NAME
The name of the system option containing an indication as to
whether the Attribute implements "standard SimpleProperty array"
semantics.
|
m_CategoryDefs
m_Attributes, m_ClassObjectName, m_ClassObjectValue, m_ContentSpecifications, m_DefinitionLists, m_Definitions, m_EnclosedDefinition, m_Id, m_Options, m_ReadOnly, m_ReferenceAttributes, m_Session, m_SystemOptions
Constructor and Description |
---|
AttributeDefinition(LibrarySessionInterface session)
Construct a definition explicitly capturing the
session.
|
AttributeDefinition(LibrarySessionInterface session,
String className)
Construct a definition, explicitly capturing the
session and setting the initial classobject.
|
Modifier and Type | Method and Description |
---|---|
String |
getCommonName()
Get the common name.
|
String |
getDefinitionSettingPolicy()
Gets the policy in effect for applying a definition setting
for the Attribute.
|
String |
getMultiValueTableSuffix()
Get the table suffix to use for a map or array type Attribute.
|
Boolean |
getStandardSimplePropertyArray()
Gets the indication as to whether the Attribute should
implement "standard" semantics for a SimpleProperty array.
|
void |
setCommonName(String commonName)
Set the common name.
|
void |
setDefinitionSettingPolicy(String policyName)
Sets the policy in effect for applying a definition setting
for the Attribute.
|
void |
setMultiValueTableSuffix(String tableSuffix)
Set the table suffix to use for a map or array type Attribute.
|
void |
setStandardSimplePropertyArray(Boolean isStandard)
Sets the indication as to whether the Attribute should
implement "standard" semantics for a SimpleProperty array.
|
static AttributeDefinition |
toAttributeDefinition(LibraryObjectDefinition lodef)
Cast specified LibraryObjectDefinition to a AttributeDefinition.
|
static AttributeDefinition |
toAttributeDefinition(LibraryObjectDefinition lodef,
boolean enforceCompat)
Cast specified LibraryObjectDefinition to a AttributeDefinition.
|
protected static AttributeDefinition[] |
vectorToAttributeDefinitionArray(Vector vector)
Internal use only: Converts a vector of AttributeDefinitions to an AttributeDefinition
array.
|
addCategoryDefinition, addCategoryDefinitions, applySettings, getCategoryDefinitions, removeCategoryDefinitions, setCategoryDefinitions, toSchemaObjectDefinition, toSchemaObjectDefinition
addDefinition, addDefinitions, addProperty, addPropertyDefinition, addPropertyDefinition, addPropertyDefinitions, addPropertyDefinitions, addSimplePropertyDefinition, addSimplePropertyDefinition, addSimplePropertyDefinitions, addSimplePropertyDefinitions, applyEnumSetting, applyEnumSetting, applyMapSetting, applyMapSetting, applyObjectArraySetting, applyObjectArraySetting, applyObjectSetting, applyObjectSetting, applySetting, applySetting, captureSession, captureSession, captureSession, clone, constructInstance, constructInstance, constructInstance, copyInto, deriveObjectArraySetting, deriveObjectSetting, getAttribute, getAttribute, getAttributes, getAttributes, getAttributesSorted, getClassId, getClassObject, getClassObjectValue, getContentSpecification, getContentSpecificationKeys, getCopiedObjectValue, getDefinition, getDefinitionClassName, getDefinitionKeys, getDefinitionListKeys, getDefinitions, getId, getLibrarySession, getName, getOption, getOptionAsAttributeValue, getOptionKeys, getPolicyMode, getPropertyDefinitions, getReferenceAttribute, getReferenceAttributes, getServerDefinition, getSession, getSimplePropertyDefinitions, getSLibrarySession, getStringAttribute, getSystemOption, getSystemOptionAsAttributeValue, getSystemOptionAsBoolean, getSystemOptionKeys, getWriteableInstance, isReadOnly, prepareForDefinitionObject, processSimplePropertiesForCreate, processSimplePropertiesForUpdate, removeAttribute, removeContentSpecification, removeDefinition, removeDefinitions, removeOption, removePropertyDefinitions, removeReferenceAttribute, removeSimplePropertyDefinitions, removeSystemOption, reset, resolve, setAttribute, setAttribute, setAttribute, setAttributeByUpperCaseName, setAttributeByUpperCaseName, setAttributePolicyMode, setAttributes, setClassId, setClassname, setClassObject, setClassObjectValue, setContentSpecification, setCopiedObjectValue, setDefinition, setDefinitions, setId, setName, setOption, setReadOnly, setReferenceAttribute, setReferenceAttribute, setSession, setSimplePropertyDefinitions, setSystemOption, unresolve, verifySession
public static final String COMMON_NAME_SYSTEMOPTION_NAME
If specified, this name gets saved as an property in the Attribute's PropertyBundle, if the Attribute has an associated PropertyBundle defined.
public static final String EXISTING_COLUMN_SYSTEMOPTION_NAME
If this system option is specified in the AttributeDefinition used to add an attribute to an existing ClassObject, then the repository will use the existing column to store the new attribute's values, rather than the default behavior of adding a new column. It is the caller's responsibility to ensure the system option's value identifies a column that already exists and whose definition and properties are compatible with the new attribute. If the existing column has a name different than the DATABASEOBJECTNAME of the new attribute, the existing column is automatically renamed.
public static final String EXISTING_INDEX_SYSTEMOPTION_NAME
If this system option is specified in the AttributeDefinition used to add an attribute to an existing ClassObject, then the repository will use the existing index, rather than the default behavior of creating a new index. It is the caller's responsibility to ensure the system option's value identifies an index that already exists and whose definition and properties are consistent with the new attribute. The existing index will be renamed to a name synthesized from the id of the new attribute.
public static final String DROP_COLUMN_SYSTEMOPTION_NAME
The default behavior is to drop the column (ALTER TABLE ... DROP
COLUMN
). However, if this system option is set false in the
AttributeDefinition supplied in removing an attribute from a ClassObject,
the repository will instead mark the column unused (ALTER TABLE ...
SET UNUSED COLUMN
).
public static final String MULTIVALUE_TABLE_SUFFIX_SYSTEMOPTION_NAME
If this system option is specified in the AttributeDefinition used to add an attribute to an existing ClassObject, then the values stored for that Attribute will use the table name as indicated by this suffix. Otherwise, a default table name will be used for each data type, for example "odmzm_stringstringmap" for data type 30.
public static final String STANDARD_SIMPLEPROPERTY_ARRAY_SYSTEMOPTION_NAME
public static final String DEFINITIONSETTINGPOLICY_SYSTEMOPTION_NAME
applySettings
method in LibraryObjectDefinition classes.
public AttributeDefinition(LibrarySessionInterface session) throws IfsException
session
- the current sessionIfsException
- if the operation failspublic AttributeDefinition(LibrarySessionInterface session, String className) throws IfsException
session
- the current sessionclassName
- the initial class nameIfsException
- if the operation failspublic void setCommonName(String commonName) throws IfsException
commonName
- the common nameIfsException
- if operation fails.public String getCommonName() throws IfsException
IfsException
- if operation fails.public void setMultiValueTableSuffix(String tableSuffix) throws IfsException
tableSuffix
- the table suffix to use in deriving
the map/array value table nameIfsException
- if operation fails.public String getMultiValueTableSuffix() throws IfsException
IfsException
- if operation fails.public void setStandardSimplePropertyArray(Boolean isStandard) throws IfsException
isStandard
- true if this attribue implements the standard semanticIfsException
- if operation fails.public Boolean getStandardSimplePropertyArray() throws IfsException
IfsException
- if operation fails.public void setDefinitionSettingPolicy(String policyName) throws IfsException
policyName
- the policy nameIfsException
- if operation fails.public String getDefinitionSettingPolicy() throws IfsException
IfsException
- if operation fails.public static AttributeDefinition toAttributeDefinition(LibraryObjectDefinition lodef) throws IfsException
Return null if the specified definition is not a AttributeDefinition, or if the specified definition is null.
lodef
- the definition to be castedIfsException
- is not currently thrown.public static AttributeDefinition toAttributeDefinition(LibraryObjectDefinition lodef, boolean enforceCompat) throws IfsException
Return null if the specified definition is null. If non-null and unable to cast, return null if enforceCompat is false but throw an IfsException if the specified definition is not a AttributeDefinition.
lodef
- the definition to be castedenforceCompat
- whether to throw an exception if
a non-null definition cannot be castIfsException
- (IFS-10822) if operation fails.protected static AttributeDefinition[] vectorToAttributeDefinitionArray(Vector vector) throws IfsException
For internal use only. Do not use this method.
vector
- the vectorIfsException
- if an error occursCopyright © 2023. All rights reserved.