oracle.ifs.beans
Class Attribute


java.lang.Object

  |

  +--oracle.ifs.beans.LibraryObject

        |

        +--oracle.ifs.beans.TieLibraryObject

              |

              +--oracle.ifs.beans.SchemaObject

                    |

                    +--oracle.ifs.beans.TieSchemaObject

                          |

                          +--oracle.ifs.beans.Attribute

All Implemented Interfaces:
IfsEventHandler, LibraryObjectInterface, SchemaObjectInterface, Traceable

public final class Attribute
extends TieSchemaObject

An Attribute describes an atomic unit of data in a ClassObject instance. Each Attribute is defined by exactly one ClassObject. A ClassObject may define one or more Attributes. Subclasses will inheirit all attributes from its super class. This object describes an Attribute of a ClassObject. This object is not used for manipulating the attributes of instances of Class Objects, but rather the Class Object itself.


Field Summary
static int ATTRIBUTEDATATYPE_BOOLEAN
          The data type of boolean attributes.
static int ATTRIBUTEDATATYPE_BOOLEAN_ARRAY
          The data type of array-type boolean attributes.
static int ATTRIBUTEDATATYPE_DATE
          The data type of date attributes.
static int ATTRIBUTEDATATYPE_DATE_ARRAY
          The data type of array-type date attributes.
static int ATTRIBUTEDATATYPE_DIRECTORYOBJECT
          The data type of DirectoryObject attributes.
static int ATTRIBUTEDATATYPE_DIRECTORYOBJECT_ARRAY
          The data type of array-type DirectoryObject attributes.
static int ATTRIBUTEDATATYPE_DOUBLE
          The data type of double attributes.
static int ATTRIBUTEDATATYPE_DOUBLE_ARRAY
          The data type of array-type double attributes.
static int ATTRIBUTEDATATYPE_INTEGER
          The data type of integer attributes.
static int ATTRIBUTEDATATYPE_INTEGER_ARRAY
          The data type of array-type integer attributes.
static int ATTRIBUTEDATATYPE_LONG
          The data type of long attributes.
static int ATTRIBUTEDATATYPE_LONG_ARRAY
          The data type of array-type long attributes.
static int ATTRIBUTEDATATYPE_PUBLICOBJECT
          The data type of PublicObject attributes.
static int ATTRIBUTEDATATYPE_PUBLICOBJECT_ARRAY
          The data type of array-type PublicObject attributes.
static int ATTRIBUTEDATATYPE_SCHEMAOBJECT
          The data type of SchemaObject attributes.
static int ATTRIBUTEDATATYPE_SCHEMAOBJECT_ARRAY
          The data type of array-type SchemaObject attributes.
static int ATTRIBUTEDATATYPE_STRING
          The data type of string attributes.
static int ATTRIBUTEDATATYPE_STRING_ARRAY
          The data type of array-type string attributes.
static int ATTRIBUTEDATATYPE_SYSTEMOBJECT
          The data type of SystemObject attributes.
static int ATTRIBUTEDATATYPE_SYSTEMOBJECT_ARRAY
          The data type of array-type SystemObject attributes.
static int ATTRIBUTEDATATYPE_UNKNOWN
          An unknown data type.
static java.lang.String CLASS_ATTRIBUTE
          The Class to which this Attribute belongs.
static java.lang.String CLASS_NAME
          The name of the Attribute.
static java.lang.String CLASSDOMAIN_ATTRIBUTE
          The ClassDomain applied to this object-type Attribute to restrict the objects to which it refers by their ClassObject.
static java.lang.String DATABASEOBJECTNAME_ATTRIBUTE
          The name of the column for this Attribute in the database table for the ClassObject.
static java.lang.String DATALENGTH_ATTRIBUTE
          The maximum size of this Attribute.
static java.lang.String DATASCALE_ATTRIBUTE
          The Datascale attribute is reserved for future use.
static java.lang.String DATATYPE_ATTRIBUTE
          The datatype of this Attribute- either scalar or array of integer, long, double, string, boolean, DirectoryObject, PublicObject, SchemaObject, SystemObject.
static java.lang.String DESCRIPTION_ATTRIBUTE
          A textual description of the Attribute.
static java.lang.String INDEXED_ATTRIBUTE
          An indicator of whether the database table that stores data for instances of the ClassObject has an index on this Attribute.
static java.lang.String REFERENTIALINTEGRITYRULE_ATTRIBUTE
          The referential integrity behavior (clear, restrict) of this Attribute.
static java.lang.String REQUIRED_ATTRIBUTE
          An indicator of whether each instance of the ClassObject must have a value for this Attribute.
static int RIRULE_CLEAR
          Represents the "CLEAR" referential integrity rule.
static int RIRULE_RESTRICT
          Represents the "RESTRICT" referential integrity rule.
static java.lang.String SETTABLE_ATTRIBUTE
          An indicator of whether this Attribute can be set using the repository SDK when creating new instances of the ClassObject.
static java.lang.String UNIQUE_ATTRIBUTE
          An indicator of whether each instance of the ClassObject must have a unique value for this Attribute (if not null).
static java.lang.String UPDATEABLE_ATTRIBUTE
          An indicator of whether this Attribute can be updated using the repository SDK for existing instances of the ClassObject.
static java.lang.String VALUEDEFAULT_ATTRIBUTE
          The default value of this Attribute in new instances of the ClassObject.
static java.lang.String VALUEDOMAIN_ATTRIBUTE
          The ValueDomain applied to this Attribute to restrict its values to a list of pre-specified allowed values for instances of the ClassObject.
static java.lang.String VALUEDOMAINVALIDATED_ATTRIBUTE
          An indicator of whether the ValueDomain is enforced or merely a guideline.
 
Fields inherited from class oracle.ifs.beans.SchemaObject
ACTIVE_ATTRIBUTE, NAME_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE
 
Method Summary
static int attributeDataTypeDefaultDataLength(int attributeDataType)
          Gets the default data length of the specified Attribute data type.
static int attributeDataTypeDefaultDataScale(int attributeDataType)
          Gets the default data scale of the specified Attribute data type.
static boolean attributeDataTypeIsArrayType(int attributeDataType)
          Gets whether the specified Attribute data type is an array type.
static boolean attributeDataTypeIsObjectType(int attributeDataType)
          Gets whether the specified Attribute data type is an object type.
static int attributeDataTypeJdbcType(int attributeDataType)
          Gets the JDBC type for the specified Attribute data type.
static java.lang.String attributeDataTypeName(int dataType, Localizer localizer)
          Deprecated. use toDataTypeLabel()
static java.lang.String attributeDataTypeRdbmsType(int attributeDataType)
          Gets the RDBMS type for the specified Attribute data type.
static java.lang.String attributeDataTypeRdbmsType(int attributeDataType, int dataLength)
          Gets the RDBMS type for the specified Attribute data type.
static java.lang.String attributeDataTypeRdbmsType(int attributeDataType, int dataLength, int dataScale)
          Gets the RDBMS type for the specified Attribute data type.
static java.lang.String attributeDataTypeResourceBundleKey(int attributeDataType)
          Gets the resource bundle key for the specified Attribute data type.
 void free()
          Permanently removes this Attribute.
 ClassDomain getClassDomain()
          Gets the ClassDomain of this Attribute.
 java.lang.String getDatabaseObjectName()
          get the database object name corresponding to this attribute.
 int getDataLength()
          Get the length of the attribute.
 int getDataScale()
          Get the Data Scale of this Attribute.
 int getDataType()
          Get the data type of the attribute.
 java.lang.String getDataTypeLabel()
          Gets the localized String label for the data type set for this instance.
 java.lang.String getDefiningClass()
          Returns the CLASS of which this is an attribute.
 java.lang.String getDescription()
          Returns the description of an Attribute.
 java.lang.String getLabel()
          returns the Label for this Attribute, based on the Attribute's name and class.
 int getReferentialIntegrityRule()
          Gets the Referential Integrity Rule associated with this Attribute.
 java.lang.String getReferentialIntegrityRuleLabel()
          Gets the localized String label for the ReferentialIntegrityRule set for this instance.
 ValueDefault getValueDefault()
          Gets the ValueDefault of this Attribute.
 ValueDomain getValueDomain()
          Gets the ValueDomain of this Attribute.
 boolean isIndexed()
          Determine if the current attribute is indexed.
 boolean isRequired()
          Determine if the current attribute is required.
 boolean isSettable()
          Determine if the current attribute is Settable.
 boolean isUnique()
          Determine if the current attribute is unique.
 boolean isUpdateable()
          Determine if the current attribute is Updateable.
 boolean isValueDomainValidated()
          Determines if the attribute's value domain has been validated.
 void setClassDomain(ClassDomain cd)
          Sets the ClassDomain of this Attribute.
 void setDescription(java.lang.String description)
          Sets the description of this Attribute.
 void setReferentialIntegrityRule(int rule)
          Sets the referential Integrity rule associated with this Attribute.
 void setValueDefault(ValueDefault vde)
          Sets the ValueDefault of this Attribute.
 void setValueDomain(ValueDomain vd)
          Sets the ValueDomain of this Attribute.
 void setValueDomainValidated(boolean value)
          Marks the attribute as ValueDomainValidated.
static java.lang.String toDataTypeLabel(int dataType)
          Converts the specified data type constant to a localized label.
static java.lang.String toDataTypeLabel(int dataType, LibrarySession session)
          Converts the specified data type constant to a localized label, using the Localizer from the specified LibrarySession.
static java.lang.String toDataTypeLabel(int dataType, Localizer localizer)
          Converts the specified data type constant to a localized label, using the specified Localizer.
static java.lang.String toReferentialIntegrityRuleLabel(int riRule)
          Converts the specified ReferentialIntegrityRule constant to a localized label.
static java.lang.String toReferentialIntegrityRuleLabel(int riRule, LibrarySession session)
          Converts the specified ReferentialIntegrityRule constant to a localized label, using the Localizer from the specified LibrarySession.
static java.lang.String toReferentialIntegrityRuleLabel(int riRule, Localizer localizer)
          Converts the specified ReferentialIntegrityRule constant to a localized label, using the specified Localizer.
 
Methods inherited from class oracle.ifs.beans.SchemaObject
getPolicyBundle, getPropertyBundle, hasNameAttribute, isActive, putPolicy, putProperty, putProperty, removeAllPolicies, removeAllProperties, removePolicy, removePolicy, removeProperty, setActive, setPolicyBundle, setPropertyBundle
 
Methods inherited from class oracle.ifs.beans.LibraryObject
equals, free, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getClassId, getClassObject, getDefinition, getId, getName, getSession, handleEvent, invokeServerMethod, isInstanceOf, isTraced, lookupInstanceLabel, postEvent, postEvent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setName, toString, trace, update
 
Methods inherited from interface oracle.ifs.common.LibraryObjectInterface
getId
 
Methods inherited from interface oracle.ifs.common.Traceable
getTraceLogger, isTraced, trace
 

Field Detail


CLASS_NAME


public static final java.lang.String CLASS_NAME
The name of the Attribute.

CLASS_ATTRIBUTE


public static final java.lang.String CLASS_ATTRIBUTE
The Class to which this Attribute belongs.

DESCRIPTION_ATTRIBUTE


public static final java.lang.String DESCRIPTION_ATTRIBUTE
A textual description of the Attribute.

DATATYPE_ATTRIBUTE


public static final java.lang.String DATATYPE_ATTRIBUTE
The datatype of this Attribute- either scalar or array of integer, long, double, string, boolean, DirectoryObject, PublicObject, SchemaObject, SystemObject.

DATALENGTH_ATTRIBUTE


public static final java.lang.String DATALENGTH_ATTRIBUTE
The maximum size of this Attribute. For String attributes, this is the maximum string length in bytes. The Datalength attribute is ignored for non-String Attributes.

DATASCALE_ATTRIBUTE


public static final java.lang.String DATASCALE_ATTRIBUTE
The Datascale attribute is reserved for future use.

UNIQUE_ATTRIBUTE


public static final java.lang.String UNIQUE_ATTRIBUTE
An indicator of whether each instance of the ClassObject must have a unique value for this Attribute (if not null).

REQUIRED_ATTRIBUTE


public static final java.lang.String REQUIRED_ATTRIBUTE
An indicator of whether each instance of the ClassObject must have a value for this Attribute.

INDEXED_ATTRIBUTE


public static final java.lang.String INDEXED_ATTRIBUTE
An indicator of whether the database table that stores data for instances of the ClassObject has an index on this Attribute.

SETTABLE_ATTRIBUTE


public static final java.lang.String SETTABLE_ATTRIBUTE
An indicator of whether this Attribute can be set using the repository SDK when creating new instances of the ClassObject. Non-settable Attributes can only be "system-set" by server extensibility code.

UPDATEABLE_ATTRIBUTE


public static final java.lang.String UPDATEABLE_ATTRIBUTE
An indicator of whether this Attribute can be updated using the repository SDK for existing instances of the ClassObject. The values of non-updateable Attributes can only be changed by server extensibility code.

DATABASEOBJECTNAME_ATTRIBUTE


public static final java.lang.String DATABASEOBJECTNAME_ATTRIBUTE
The name of the column for this Attribute in the database table for the ClassObject.

CLASSDOMAIN_ATTRIBUTE


public static final java.lang.String CLASSDOMAIN_ATTRIBUTE
The ClassDomain applied to this object-type Attribute to restrict the objects to which it refers by their ClassObject. ClassDomain must be null for non object-type Attributes.

VALUEDOMAIN_ATTRIBUTE


public static final java.lang.String VALUEDOMAIN_ATTRIBUTE
The ValueDomain applied to this Attribute to restrict its values to a list of pre-specified allowed values for instances of the ClassObject.

VALUEDEFAULT_ATTRIBUTE


public static final java.lang.String VALUEDEFAULT_ATTRIBUTE
The default value of this Attribute in new instances of the ClassObject.

VALUEDOMAINVALIDATED_ATTRIBUTE


public static final java.lang.String VALUEDOMAINVALIDATED_ATTRIBUTE
An indicator of whether the ValueDomain is enforced or merely a guideline.

REFERENTIALINTEGRITYRULE_ATTRIBUTE


public static final java.lang.String REFERENTIALINTEGRITYRULE_ATTRIBUTE
The referential integrity behavior (clear, restrict) of this Attribute.

ATTRIBUTEDATATYPE_UNKNOWN


public static final int ATTRIBUTEDATATYPE_UNKNOWN
An unknown data type.

ATTRIBUTEDATATYPE_DATE


public static final int ATTRIBUTEDATATYPE_DATE
The data type of date attributes.

ATTRIBUTEDATATYPE_STRING


public static final int ATTRIBUTEDATATYPE_STRING
The data type of string attributes.

ATTRIBUTEDATATYPE_DOUBLE


public static final int ATTRIBUTEDATATYPE_DOUBLE
The data type of double attributes.

ATTRIBUTEDATATYPE_INTEGER


public static final int ATTRIBUTEDATATYPE_INTEGER
The data type of integer attributes.

ATTRIBUTEDATATYPE_BOOLEAN


public static final int ATTRIBUTEDATATYPE_BOOLEAN
The data type of boolean attributes.

ATTRIBUTEDATATYPE_DIRECTORYOBJECT


public static final int ATTRIBUTEDATATYPE_DIRECTORYOBJECT
The data type of DirectoryObject attributes.

ATTRIBUTEDATATYPE_LONG


public static final int ATTRIBUTEDATATYPE_LONG
The data type of long attributes.

ATTRIBUTEDATATYPE_SCHEMAOBJECT


public static final int ATTRIBUTEDATATYPE_SCHEMAOBJECT
The data type of SchemaObject attributes.

ATTRIBUTEDATATYPE_SYSTEMOBJECT


public static final int ATTRIBUTEDATATYPE_SYSTEMOBJECT
The data type of SystemObject attributes.

ATTRIBUTEDATATYPE_PUBLICOBJECT


public static final int ATTRIBUTEDATATYPE_PUBLICOBJECT
The data type of PublicObject attributes.

ATTRIBUTEDATATYPE_DATE_ARRAY


public static final int ATTRIBUTEDATATYPE_DATE_ARRAY
The data type of array-type date attributes.

ATTRIBUTEDATATYPE_STRING_ARRAY


public static final int ATTRIBUTEDATATYPE_STRING_ARRAY
The data type of array-type string attributes.

ATTRIBUTEDATATYPE_DOUBLE_ARRAY


public static final int ATTRIBUTEDATATYPE_DOUBLE_ARRAY
The data type of array-type double attributes.

ATTRIBUTEDATATYPE_INTEGER_ARRAY


public static final int ATTRIBUTEDATATYPE_INTEGER_ARRAY
The data type of array-type integer attributes.

ATTRIBUTEDATATYPE_BOOLEAN_ARRAY


public static final int ATTRIBUTEDATATYPE_BOOLEAN_ARRAY
The data type of array-type boolean attributes.

ATTRIBUTEDATATYPE_DIRECTORYOBJECT_ARRAY


public static final int ATTRIBUTEDATATYPE_DIRECTORYOBJECT_ARRAY
The data type of array-type DirectoryObject attributes.

ATTRIBUTEDATATYPE_LONG_ARRAY


public static final int ATTRIBUTEDATATYPE_LONG_ARRAY
The data type of array-type long attributes.

ATTRIBUTEDATATYPE_SCHEMAOBJECT_ARRAY


public static final int ATTRIBUTEDATATYPE_SCHEMAOBJECT_ARRAY
The data type of array-type SchemaObject attributes.

ATTRIBUTEDATATYPE_SYSTEMOBJECT_ARRAY


public static final int ATTRIBUTEDATATYPE_SYSTEMOBJECT_ARRAY
The data type of array-type SystemObject attributes.

ATTRIBUTEDATATYPE_PUBLICOBJECT_ARRAY


public static final int ATTRIBUTEDATATYPE_PUBLICOBJECT_ARRAY
The data type of array-type PublicObject attributes.

RIRULE_CLEAR


public static final int RIRULE_CLEAR
Represents the "CLEAR" referential integrity rule.

If LibraryObject.free is invoked on an object referenced by a CLEAR-type Attribute, the CLEAR-type Attribute's value is set to null and the free is performed.

RIRULE_RESTRICT


public static final int RIRULE_RESTRICT
Represents the "RESTRICT" referential integrity rule.

If LibraryObject.free is invoked on an object referenced by a RESTRICT-type Attribute, the free is not performed and a IfsException is thrown.

Method Detail

getLabel


public java.lang.String getLabel()
                          throws IfsException
returns the Label for this Attribute, based on the Attribute's name and class. This overrides the method defined in LibraryObject so that the AttributeLabel resource strings can be checked instead of the InstanceLabels that are checked in LibraryObject. If no AttributeLabel is defined, return the Attribute's name.
Overrides:
getLabel in class LibraryObject
Returns:
the label for this object.
Throws:
IfsException - if operation fails.

setClassDomain


public void setClassDomain(ClassDomain cd)
                    throws IfsException
Sets the ClassDomain of this Attribute.
Parameters:
cd - the ClassDomain
Throws:
IfsException - if the operation fails

getClassDomain


public final ClassDomain getClassDomain()
                                 throws IfsException
Gets the ClassDomain of this Attribute.
Returns:
the ClassDomain
Throws:
IfsException - if the operation fails

setValueDomain


public void setValueDomain(ValueDomain vd)
                    throws IfsException
Sets the ValueDomain of this Attribute.
Parameters:
cd - the ValueDomain
Throws:
IfsException - if the operation fails

getValueDomain


public final ValueDomain getValueDomain()
                                 throws IfsException
Gets the ValueDomain of this Attribute.
Returns:
the ValueDomain
Throws:
IfsException - if the operation fails

setValueDefault


public void setValueDefault(ValueDefault vde)
                     throws IfsException
Sets the ValueDefault of this Attribute.
Parameters:
cd - the ValueDefault
Throws:
IfsException - if the operation fails

getValueDefault


public final ValueDefault getValueDefault()
                                   throws IfsException
Gets the ValueDefault of this Attribute.
Returns:
the ValueDefault
Throws:
IfsException - if the operation fails

free


public void free()
          throws IfsException
Permanently removes this Attribute.

iFS does not allow Attributes to be removed from a ClassObject, so this method always throws IfsException.

Overrides:
free in class LibraryObject
Throws:
IfsException - upon every invocation

getDefiningClass


public java.lang.String getDefiningClass()
                                  throws IfsException
Returns the CLASS of which this is an attribute.
Returns:
Name of the class which defines this attribute.
Throws:
IfsException - if the operation fails

getDescription


public java.lang.String getDescription()
                                throws IfsException
Returns the description of an Attribute.
Returns:
The description of the Attribute.
Throws:
IfsException - if the operation fails

setDescription


public void setDescription(java.lang.String description)
                    throws IfsException
Sets the description of this Attribute.
Parameters:
description - the description
Throws:
IfsException - if the operation fails

getDataType


public int getDataType()
                throws IfsException
Get the data type of the attribute.
Returns:
Data type of the attribute.
Throws:
IfsException - if the operation fails.

getDataLength


public int getDataLength()
                  throws IfsException
Get the length of the attribute.
Returns:
Length of the field that holds the attribute.
Throws:
IfsException - if the operation fails.

getDataScale


public int getDataScale()
                 throws IfsException
Get the Data Scale of this Attribute.
Returns:
Data Scale of this Attribute
Throws:
IfsException - if the operation fails

isUnique


public boolean isUnique()
                 throws IfsException
Determine if the current attribute is unique. Mostly used for unique names.
Returns:
True if the Current Attribute is Unique.
Throws:
IfsException - if the operation fails.

isRequired


public boolean isRequired()
                   throws IfsException
Determine if the current attribute is required.
Returns:
True if the Current Attribute is a Required attribute.
Throws:
IfsException - if the operation fails.

isIndexed


public boolean isIndexed()
                  throws IfsException
Determine if the current attribute is indexed.
Returns:
True if the Current Attribute is a indexed attribute.
Throws:
IfsException - if the operation fails.

isSettable


public boolean isSettable()
                   throws IfsException
Determine if the current attribute is Settable.
Returns:
True if the Current Attribute is a settable attribute.
Throws:
IfsException - if the operation fails.

isUpdateable


public boolean isUpdateable()
                     throws IfsException
Determine if the current attribute is Updateable.
Returns:
True if the Current Attribute is a updateable attribute.
Throws:
IfsException - if the operation fails.

getDatabaseObjectName


public java.lang.String getDatabaseObjectName()
                                       throws IfsException
get the database object name corresponding to this attribute.
Returns:
Name of the database object.
Throws:
IfsException - if the operation fails.

isValueDomainValidated


public boolean isValueDomainValidated()
                               throws IfsException
Determines if the attribute's value domain has been validated.
Returns:
True if the value domain has been validated.
Throws:
IfsException - if the operation fails.

setValueDomainValidated


public void setValueDomainValidated(boolean value)
                             throws IfsException
Marks the attribute as ValueDomainValidated.
Parameters:
Boolean - true of False.
Throws:
IfsException - if the operation fails.

getReferentialIntegrityRule


public int getReferentialIntegrityRule()
                                throws IfsException
Gets the Referential Integrity Rule associated with this Attribute.
Returns:
The Referential Integrity rule.

getReferentialIntegrityRuleLabel


public java.lang.String getReferentialIntegrityRuleLabel()
                                                  throws IfsException
Gets the localized String label for the ReferentialIntegrityRule set for this instance.
Returns:
the label corresponding to the ReferentialIntegrityRule
Throws:
IfsException - if operation fails.

toReferentialIntegrityRuleLabel


public static java.lang.String toReferentialIntegrityRuleLabel(int riRule)
                                                        throws IfsException
Converts the specified ReferentialIntegrityRule constant to a localized label. The default Localizer is used.
Parameters:
riRule - the ReferentialIntegrityRule constant.
Returns:
the label corresponding to the specified ReferentialIntegrityRule constant.
Throws:
IfsException - if operation fails.

toReferentialIntegrityRuleLabel


public static java.lang.String toReferentialIntegrityRuleLabel(int riRule,
                                                               LibrarySession session)
                                                        throws IfsException
Converts the specified ReferentialIntegrityRule constant to a localized label, using the Localizer from the specified LibrarySession.
Parameters:
riRule - the ReferentialIntegrityRule constant
session - the LibrarySession, whose current Localizer will be used for the conversion
Returns:
the label corresponding to the specified ReferentialIntegrityRule constant
Throws:
IfsException - if operation fails.

toReferentialIntegrityRuleLabel


public static java.lang.String toReferentialIntegrityRuleLabel(int riRule,
                                                               Localizer localizer)
                                                        throws IfsException
Converts the specified ReferentialIntegrityRule constant to a localized label, using the specified Localizer. If a null is specified for the Localizer, a temporary Localizer (constructed based on the default Locale) is used for the conversion.
Parameters:
riRule - the ReferentialIntegrityRule constant.
localizer - the Localizer that performs the conversion
Returns:
the label corresponding to the specified ReferentialIntegrityRule constant.
Throws:
IfsException - if operation fails.

setReferentialIntegrityRule


public void setReferentialIntegrityRule(int rule)
                                 throws IfsException
Sets the referential Integrity rule associated with this Attribute. Valid integer parameters are Attribute.RIRULE_CLEAR and Attribute.RIRULE_RESTRICT.
Parameters:
an - integer representing a valid RI rule from Attribute.
Throws:
IfsException - if the operation fails.

attributeDataTypeResourceBundleKey


public static final java.lang.String attributeDataTypeResourceBundleKey(int attributeDataType)
                                                                 throws IfsException
Gets the resource bundle key for the specified Attribute data type.

Call LibrarySession.getResourceString with the returned value to get a localized name for the specified Attribute data type.

Parameters:
attributeDataType - the Attribute data type
Returns:
the resource bundle key
Throws:
IfsException - if operation fails

attributeDataTypeName


public static final java.lang.String attributeDataTypeName(int dataType,
                                                           Localizer localizer)
                                                    throws IfsException
Deprecated. use toDataTypeLabel()

Gets the localized name of the specified Attribute data type.
Parameters:
dataType - the Attribute data type
localizer - the localizer to use
Returns:
the localized name
Throws:
IfsException - (IFS-19001) if localizer is null
IfsException - (IFS-10400) if attributeDataType is invalid

getDataTypeLabel


public java.lang.String getDataTypeLabel()
                                  throws IfsException
Gets the localized String label for the data type set for this instance.
Returns:
the label corresponding to the AttributeDataType
Throws:
IfsException - if operation fails.

toDataTypeLabel


public static java.lang.String toDataTypeLabel(int dataType)
                                        throws IfsException
Converts the specified data type constant to a localized label. The default Localizer is used.
Parameters:
dataType - the data type constant.
Returns:
the label corresponding to the specified data type constant.
Throws:
IfsException - if operation fails.

toDataTypeLabel


public static java.lang.String toDataTypeLabel(int dataType,
                                               LibrarySession session)
                                        throws IfsException
Converts the specified data type constant to a localized label, using the Localizer from the specified LibrarySession.
Parameters:
dataType - the data type constant
session - the LibrarySession, whose current Localizer will be used for the conversion
Returns:
the label corresponding to the specified data type constant
Throws:
IfsException - if operation fails.

toDataTypeLabel


public static java.lang.String toDataTypeLabel(int dataType,
                                               Localizer localizer)
                                        throws IfsException
Converts the specified data type constant to a localized label, using the specified Localizer. If a null is specified for the Localizer, a temporary Localizer (constructed based on the default Locale) is used for the conversion.
Parameters:
dataType - the data type constant.
localizer - the Localizer that performs the conversion
Returns:
the label corresponding to the specified data type constant.
Throws:
IfsException - if operation fails.

attributeDataTypeIsArrayType


public static final boolean attributeDataTypeIsArrayType(int attributeDataType)
                                                  throws IfsException
Gets whether the specified Attribute data type is an array type.
Parameters:
attributeDataType - the Attribute data type
Returns:
whether the data type is an array type
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeIsObjectType


public static final boolean attributeDataTypeIsObjectType(int attributeDataType)
                                                   throws IfsException
Gets whether the specified Attribute data type is an object type.
Parameters:
attributeDataType - the Attribute data type
Returns:
whether the data type is an object type
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeJdbcType


public static int attributeDataTypeJdbcType(int attributeDataType)
                                     throws IfsException
Gets the JDBC type for the specified Attribute data type.
Parameters:
attributeDataType - the Attribute data type
Returns:
the JDBC type
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeRdbmsType


public static java.lang.String attributeDataTypeRdbmsType(int attributeDataType)
                                                   throws IfsException
Gets the RDBMS type for the specified Attribute data type.
Parameters:
attributeDataType - the Attribute data type
Returns:
the string RDBMS type. If the RDBMS type requires the data length to be specified, the default data length is used. Similarly, if the RDBMS type requires the data scale to be specified, the default data scale is used.
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeRdbmsType


public static java.lang.String attributeDataTypeRdbmsType(int attributeDataType,
                                                          int dataLength)
                                                   throws IfsException
Gets the RDBMS type for the specified Attribute data type.
Parameters:
attributeDataType - the Attribute data type
dataLength - the total number of digits in a numeric data type or the number of bytes (not characters) in a string. If data length is not applicable for this Attribute data type, the value is ignored.
Returns:
the string RDBMS type. If the RDBMS type requires the data scale to be specified, the default data scale is used.
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeRdbmsType


public static java.lang.String attributeDataTypeRdbmsType(int attributeDataType,
                                                          int dataLength,
                                                          int dataScale)
                                                   throws IfsException
Gets the RDBMS type for the specified Attribute data type.
Parameters:
attributeDataType - the Attribute data type
dataLength - the total number of digits in a numeric data type or the number of bytes (not characters) in a string. If data length is not applicable for this Attribute data type, the value is ignored.
dataScale - the number of digits to the right of the decimal point in a numeric data type. If data scale is not applicable for this Attribute data type, the value is ignored.
Returns:
the string RDBMS type
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeDefaultDataLength


public static int attributeDataTypeDefaultDataLength(int attributeDataType)
                                              throws IfsException
Gets the default data length of the specified Attribute data type.
Parameters:
attributeDataType - the Attribute data type.
Returns:
the default total number of digits in a numeric data type or the default number of bytes (not characters) in a string. Returns 1 if data length is not applicable for this Attribute data type.
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid

attributeDataTypeDefaultDataScale


public static int attributeDataTypeDefaultDataScale(int attributeDataType)
                                             throws IfsException
Gets the default data scale of the specified Attribute data type.
Parameters:
attributeDataType - the Attribute data type.
Returns:
the default number of digits to the right of the decimal point in a numeric data type. Returns 0 if data scale is not applicable for this Attribute data type.
Throws:
IfsException - (IFS-10400) if attributeDataType is invalid