Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.server
Class AttributeDefImpl

java.lang.Object
  extended by oracle.jbo.server.NamedObjectImpl
      extended by oracle.jbo.mom.PersistableDefObject
          extended by oracle.jbo.server.DefObject
              extended by oracle.jbo.server.AttributeDefImpl
All Implemented Interfaces:
Formattable, AttributeDef, AttributeHints, ResourceBundleOwner, Properties, ValidationManager, VariableManagerOwner, VariableManagerOwnerBase
Direct Known Subclasses:
AssociationDefImpl, ViewAttributeDefImpl

public class AttributeDefImpl
extends DefObject
implements AttributeDef, AttributeHints, ResourceBundleOwner, ValidationManager


Field Summary
static byte ATTR_LOAD_BULK
          Indicates that while retrieving data for this attribute from the query result, data for other attributes were bulk-retrieved as well.
static byte ATTR_LOAD_EACH
          Indicates that the data for this attribute was retrieved from the query result.
static byte ATTR_LOAD_SKIP
          Indicates that this attribute should be skipped; that is, its data was bulk-retrieved by another attribute from the query result.
static java.lang.Class CLASS_INSTANCE
           
static byte EFFECTIVE_DATE_TYPE_END
          An attribute that is defined as an effective end date
static byte EFFECTIVE_DATE_TYPE_NONE
          An attribute that is not defined as an effective start or end date
static byte EFFECTIVE_DATE_TYPE_START
          An attribute that is defined as an effective start date
static byte HISTORY_CREATE_DATE
          An attribute that is defined as a create_date history attribute
static byte HISTORY_CREATE_USER
          An attribute that is defined as a create_user history attribute
static byte HISTORY_MODIFY_DATE
          An attribute that is defined as a modify_date history attribute
static byte HISTORY_MODIFY_USER
          An attribute that is defined as a modifiy_user history attribute
static byte HISTORY_MODIFY_VERSION
          An attribute that is defined as a modifiy_version history attribute
static byte HISTORY_NOT_DEFINED
          An attribute that is not defined as a history attribute
protected  byte mAttrLoad
           
protected  ArrayList mBackwardDep
           
protected  java.lang.String mColumnName
          The database column name for the attribute.
protected  boolean mDataSecurity
           
protected  RowDef mDef
          Back Pointer to Def Object where the Attribute belongs.
protected  java.lang.Object mDefaultValue
          The default value of the attribute.
protected  boolean mDiscrColumn
          Value determines whether the attribute is discriminator column.
protected  java.lang.String mDomainName
          Domain name for this attribute if it's type is a generated domain
protected  byte mEffectiveDateType
           
protected  java.lang.Object mElemFactory
           
protected  java.lang.Class mElemType
          Identifies the Java Type Object for this element.
protected  ArrayList mForwardDep
           
protected  byte mHistoryKind
           
protected  int mIndex
          Index in the Table.
protected  java.lang.Class mJavaType
          The Java Type Object for this attribute.
protected  byte mKind
          Value for the Attribute's "kind"; for example, Transient, Dynamic, etc.
protected  boolean mNotNull
          Value determines whether the attribute is null.
protected  boolean mObjectTableOID
           
protected  boolean mObjectTableRef
           
protected  java.lang.String mObjectType
          Object Type of the attribute.
protected  int mPrecision
          Precision Value for the attribute, defaulted to zero.
protected  boolean mPrimaryKey
          Value determines whether the attribute is primary key.
protected  boolean mQueriable
          Value determines whether the attribute is queryable.
protected  boolean mResolveAccessors
           
protected  boolean mRetrievedOnInsert
          Value determines whether the attribute is retrieved on Insert.
protected  boolean mRetrievedOnUpdate
          Value determines whether the attribute is retrieved on update.
protected  int mScale
          Scale value for attribute, set by default to 0.
protected  SQLBuilder mSQLBuilder
           
protected  int mType
          Integer representation of the SQL type of the attribute.
protected  java.lang.Object mTypeFactory
           
protected  boolean mTypeFactoryInitialized
           
protected  boolean mUnique
          Value determines whether the attribute is part of a unique key constraint.
protected  byte mUpdateable
          Value determines whether the attribute is updatable.
protected  java.lang.String tableName
          What database table does this attribute come from (if any)?
 
Fields inherited from class oracle.jbo.server.DefObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY
 
Fields inherited from class oracle.jbo.server.NamedObjectImpl
mObjName, mParent, mProperties, mUserData, RES_ID_SUFFIX
 
Fields inherited from interface oracle.jbo.AttributeDef
ATTR_ASSOCIATED_ROW, ATTR_ASSOCIATED_ROWITERATOR, ATTR_DYNAMIC, ATTR_ENTITY_DERIVED, ATTR_HIDDEN, ATTR_PERSISTENT, ATTR_ROWSET, ATTR_SQL_DERIVED, ATTR_TRANSIENT, ATTR_VARIABLE, READONLY, UPDATEABLE, UPDATEABLE_WHILE_NEW
 
Fields inherited from interface oracle.jbo.AttributeHints
ATTRIBUTE_BINDEDITOR_LABEL, ATTRIBUTE_CTL_CATEGORY, ATTRIBUTE_CTL_DISPLAYHEIGHT, ATTRIBUTE_CTL_DISPLAYWIDTH, ATTRIBUTE_CTL_FIELD_ORDER, ATTRIBUTE_CTL_FORMTYPE, ATTRIBUTE_CTL_TYPE, ATTRIBUTE_DISPLAY_HINT, ATTRIBUTE_DISPLAY_HINT_DISPLAY, ATTRIBUTE_DISPLAY_HINT_HIDE, ATTRIBUTE_FORM_TYPE_DETAIL, ATTRIBUTE_FORM_TYPE_SHORT, ATTRIBUTE_LABEL, ATTRIBUTE_TOOLTIP, CTL_CHECK_BOX, CTL_CHOICE_LIST, CTL_COMBO_BOX, CTL_COMBO_BOX_LOV, CTL_DATE, CTL_DEFAULT, CTL_EDIT, CTL_IMAGE, CTL_INPUT_TEXT_LOV, CTL_LIST_BOX, CTL_NUMBER_EDIT, CTL_RADIO_GROUP, CTLTYPE_CHECKBOX, CTLTYPE_COMBO, CTLTYPE_COMBOLOV, CTLTYPE_DATE, CTLTYPE_DEFAULT, CTLTYPE_EDIT, CTLTYPE_IMAGE, CTLTYPE_LIST, CTLTYPE_LISTBOX, CTLTYPE_LOV, CTLTYPE_NUMEDIT, CTLTYPE_RADIOGRP, CTLTYPE_TOGGLE, FMT_FORMAT, FMT_FORMATTER, HINT_NAME_CATEGORY, HINT_NAME_DISPLAY_HEIGHT, HINT_NAME_DISPLAY_HINT, HINT_NAME_DISPLAY_WIDTH, HINT_NAME_FIELD_ORDER, HINT_NAME_FORMAT, HINT_NAME_LABEL, HINT_NAME_MANDATORY, HINT_NAME_TOOLTIP, HINT_NAME_UPDATEABLE, PNAME_Button, PNAME_ButtonGroup, PNAME_ComboBox, PNAME_EnumList, PNAME_LovButton, PNAME_TextField
 
Constructor Summary
protected AttributeDefImpl()
           
 
Method Summary
 void addBackwardDependency(java.lang.String attrName)
           
 void addForwardDependency(java.lang.String attrName)
           
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 void addValidator(JboValidatorInterface listener)
          Add a JboValidatorInterface to the listener list.
 java.lang.Object convertToJava(java.lang.Object data)
          Converts a value from the database type to its corresponding Java type and returns the result.
 java.lang.Object convertToStorage(java.lang.Object data, DBTransactionImpl trans)
          Internal: Application should not use this method.
static java.lang.String convertUpdateableFlagToString(byte updateable)
           
static byte convertUpdateableStringToFlag(java.lang.String str)
          Convert Attribute Updateable value to byte.
 boolean displayInShortForm(LocaleContext locale)
          Returns true if the attribute is to displayed in the short(summary) form.
 java.lang.Object evaluateTransientExpression(Row row)
           
 java.lang.String formatForOutput(OutputFormatter formatter)
           
 ViewObject getAccessorVO(ViewObject originVO)
          For an accessor attribute, this method creates a View Object that works for the View Link definition.
 int getAltKeyCount()
           
 byte getAttributeKind()
          Returns the "kind" enumerations of this attribute.
 byte getAttrLoad()
           
 java.lang.String getColumnName()
          Returns the column name to which this attribute is mapped.
 java.lang.String getColumnNameForQuery()
          Returns the column name to be used in query statement.
 ArrayList getCompOpers()
           
 java.lang.String[][] getCompOpers(LocaleContext locale)
          Returns a Map of operators for this attribute.
 int getControlType(LocaleContext locale)
          Returns the preferred control type for this attribute
 RowDef getDef()
          Returns the DefObject object which describes this attribute.
 java.lang.Object getDefaultValue()
          Returns the default value of the attribute.
 int getDisplayHeight(LocaleContext locale)
          Returns the display width for this attribute
 java.lang.String getDisplayHint(LocaleContext locale)
          Retrieves the display hint that dictates whether this attribute should be visible or not.
 int getDisplayWidth(LocaleContext locale)
          Returns the display width for this attribute
 java.lang.String getDomainName()
          Returns the DomainName object which describes this attribute.
 java.lang.Object getElemFactory()
          Internal: Applications should not use this method.
 int getElemSQLType()
          Returns the jdbc type of the elements of this attribute.
 java.lang.Class getElemType()
          Returns the element type of the attribute.
 EntityDefImpl getEntityDef()
          Return the EntityDefImpl object which contains this attribute
 java.lang.String getFormat(LocaleContext locale)
          returns the format string stored in the ui hints
 java.lang.String getFormattedAttribute(AttributeList attrList, LocaleContext locale)
          Returns the formatted value for the attribute.
 Formatter getFormatter(LocaleContext locale)
          returns the formatter object stored in the ui hints
 java.lang.String getFormatterClassName(LocaleContext locale)
          Returns the formatter object stored in the ui hints
 java.lang.String getHint(LocaleContext locale, java.lang.String sHintName)
          Return defaulted hint value
 java.lang.String getHintValue(LocaleContext locale, java.lang.String sHintName)
          Return non-defaulted hint value
 byte getHistoryKind()
          Gets the attribute history kind.
 int getIndex()
          Returns the column position of this attribute in the data source.
 java.lang.Class getJavaType()
          Returns the Java type of the attribute.
 java.lang.String getLabel(LocaleContext locale)
          Retrieves the label to be used in any attribute prompts
 ListBindingDef getListBindingDef()
           
 java.lang.String getLocaleName(LocaleContext locale, java.lang.String sName)
          function for retrieving the locale name of a hint
 java.lang.String getLOVFinder()
           
 java.lang.String getLOVName()
          Gets the name of the LOV on which the attribute is a primary attribute.
 java.lang.String getObjectType()
           
 int getPrecision()
          Gets the attribute's precision.
 java.lang.String getRecalcExpression()
           
 ResourceBundleDef getResourceBundleDef()
           
 int getScale()
          Gets the attribute's scale value: the number of digits to the right or left of the decimal point, depending on whether the scale value is positive or negative.
protected  SQLBuilder getSQLBuilder()
          Returns the SQLBuilderImpl - lazily building.
 int getSQLType()
          Returns the SQL type of this attribute.
static int getSQLTypeStringToId(java.lang.String sqlType)
          Converts a SQL type name to its identifier.
 java.lang.String getTableName()
           
 java.lang.String getTooltip(LocaleContext locale)
          Retrives the tooltip text to be used for this attribute
 java.lang.String getTransientExpression()
           
 java.lang.Object getTypeFactory()
          Internal: Applications should not use this method.
 AttributeHints getUIHelper()
          Return the AttributeHints interface implemented by this class.
 byte getUpdateableFlag()
          Returns whether the attribute is updateable.
 JboValidatorInterface getValidator(int indx)
           
 int getValidatorCount()
           
 List getValidators()
          Get the list of JboValidatorInterface objects registered with this attribute
 boolean hasFormatInformation(LocaleContext locale)
          Return true if any format hints have been defined for this attribute.
 boolean hasTransientExpression()
           
protected  void initFromXML(org.kxml2.io.KXmlParser parser, RowDef parent, int index)
           
protected  boolean isCascadeUpdateParticipant()
           
 boolean isDiscrColumn()
          Tests if an attribute is a discriminator.
 boolean isEffectiveEndDate()
          Checks if the attribute represents the effective end date.
 boolean isEffectiveStartDate()
          Checks if the attribute represents the effective start date.
 boolean isInWhereOrderGroup()
           
 boolean isMandatory()
          Returns whether the attribute is not null.
 boolean isObjectTableOID()
          Internal: Applications should not use this method.
 boolean isObjectTableRef()
           
 boolean isPrimaryKey()
          Returns whether this attribute is a Primary Key for this Entity type.
 boolean isQueriable()
          Returns whether this attribute can participate in the WHERE clause of a SQL statement.
 boolean isRetrievedOnInsert()
          Returns whether the attribute value is retrieved from the database after a row is inserted in the post cycle.
 boolean isRetrievedOnUpdate()
          Returns whether the attribute is retrieved from the database after a row is updated.
 boolean isSelected()
          Tests if an attribute is transient.
 boolean isSessionScope()
           
protected  void loadDependencies(org.kxml2.io.KXmlParser xmlElement)
           
 java.lang.Object loadFromResultSet(ResultSet rs, int index, DBTransactionImpl trans)
          Internal: Applications should not use this method.
 java.lang.Object loadFromStatement(PreparedStatement cs, int index, Transaction trans)
          Internal: Applications should not use this method.
protected  void loadPermission(org.kxml2.io.KXmlParser parser)
           
 java.lang.Object parseFormattedAttribute(java.lang.String sValue, LocaleContext locale)
          Strips off the formatting from a string and constructs an instance of the attribute's domain using the 'clean' string as a parameter of the contructor.
protected  void readChangeIndicator(org.kxml2.io.KXmlParser parser)
          Determine if the XML specifies this Attrubite is a "Change Indicator"
protected  void readColumnType(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's column type
protected  void readDefaultValue(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as the default value for this column.
protected  void readIsPersistent(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's kind
protected  void readIsUpdateable(org.kxml2.io.KXmlParser parser)
          Determine if the XML specifies the Attribute is updateable
protected  void readJavaType(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's Java type
protected  void readPrecision(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's precision
protected  void readScale(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's scale
protected  void readSqlType(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's SQL type
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void removeValidator(JboValidatorInterface listener)
          Removes a JboValidatorInterface from the listener list.
protected  java.lang.Object resolvePropertyRaw(java.lang.String property, Locale locale)
           
protected  void setAttributeKind(byte value)
           
 void setAttrLoad(byte attrLoad)
           
protected  void setColumnName(java.lang.String colName)
           
 void setDiscrColumn(boolean b)
           
protected  void setDomainName(java.lang.String name)
          Set the DomainName object which describes this attribute.
 void setElemType(java.lang.Class cls)
           
 void setLOVFinder(java.lang.String lovFinder)
           
 void setLOVName(java.lang.String lovName)
           
protected  void setMandatory(boolean b)
           
 void setPrecisionScale(int prec, int scale)
          Sets the attribute's precision and scale.
protected  void setPrimaryKey(boolean b)
           
protected  void setQueriable(boolean value)
           
 void setRecalcExpression(java.lang.String expr)
           
protected  void setRetrievedOnInsert(boolean value)
           
protected  void setRetrievedOnUpdate(boolean value)
           
 void setSelected(boolean b)
           
protected  void setTableName(java.lang.String name)
           
 void setTransientExpression(java.lang.String expr)
           
 boolean shouldEvaluateTransientExpression(Row row)
           
 
Methods inherited from class oracle.jbo.server.DefObject
addExtendedDefObject, ensureVariableManager, getBaseDefObject, getDefScope, getExtendedDefObjects, getMessageBundleClass, getResourcePrefix, getVariableManager, getVarMgrParents, hasExtendedDefObjects, hasVariables, isBaseDefFor, isObjectResolved, loadProperties, loadProperties, loadResourceBundleDef, loadUserData, setBaseDefObject, setBaseDefObject, setDefForComponent, setDefScope, setObjectResolved, setResourceBundleDef, unsetDefForComponent
 
Methods inherited from class oracle.jbo.mom.PersistableDefObject
getDefManager, loadXMLContents
 
Methods inherited from class oracle.jbo.server.NamedObjectImpl
formatChildCollectionForOutput, formatChildCollectionForOutput, formatChildCollectionForOutput, formatForOutput, getAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getResourcesFromBundle, getUserData, parseAttrArrayElements, refreshProperty, requiresNamePrefixedResId, setFullName, setName, setParent, setPropertiesMap, setProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jbo.AttributeDef
getName
 
Methods inherited from interface oracle.jbo.Properties
getProperties, getProperty, getProperty, refreshProperty
 
Methods inherited from interface oracle.jbo.common.ResourceBundleOwner
getResourcePrefix
 
Methods inherited from interface oracle.jbo.rules.ValidationManager
getFullName, getName
 
Methods inherited from interface oracle.jbo.VariableManagerOwner
getName
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE

EFFECTIVE_DATE_TYPE_NONE

public static final byte EFFECTIVE_DATE_TYPE_NONE
An attribute that is not defined as an effective start or end date

See Also:
Constant Field Values

EFFECTIVE_DATE_TYPE_START

public static final byte EFFECTIVE_DATE_TYPE_START
An attribute that is defined as an effective start date

See Also:
Constant Field Values

EFFECTIVE_DATE_TYPE_END

public static final byte EFFECTIVE_DATE_TYPE_END
An attribute that is defined as an effective end date

See Also:
Constant Field Values

HISTORY_NOT_DEFINED

public static final byte HISTORY_NOT_DEFINED
An attribute that is not defined as a history attribute

See Also:
Constant Field Values

HISTORY_CREATE_DATE

public static final byte HISTORY_CREATE_DATE
An attribute that is defined as a create_date history attribute

See Also:
Constant Field Values

HISTORY_MODIFY_DATE

public static final byte HISTORY_MODIFY_DATE
An attribute that is defined as a modify_date history attribute

See Also:
Constant Field Values

HISTORY_CREATE_USER

public static final byte HISTORY_CREATE_USER
An attribute that is defined as a create_user history attribute

See Also:
Constant Field Values

HISTORY_MODIFY_USER

public static final byte HISTORY_MODIFY_USER
An attribute that is defined as a modifiy_user history attribute

See Also:
Constant Field Values

HISTORY_MODIFY_VERSION

public static final byte HISTORY_MODIFY_VERSION
An attribute that is defined as a modifiy_version history attribute

See Also:
Constant Field Values

ATTR_LOAD_EACH

public static final byte ATTR_LOAD_EACH
Indicates that the data for this attribute was retrieved from the query result.

See Also:
Constant Field Values

ATTR_LOAD_BULK

public static final byte ATTR_LOAD_BULK
Indicates that while retrieving data for this attribute from the query result, data for other attributes were bulk-retrieved as well.

See Also:
Constant Field Values

ATTR_LOAD_SKIP

public static final byte ATTR_LOAD_SKIP
Indicates that this attribute should be skipped; that is, its data was bulk-retrieved by another attribute from the query result.

See Also:
Constant Field Values

mColumnName

protected java.lang.String mColumnName
The database column name for the attribute.


mUnique

protected boolean mUnique
Value determines whether the attribute is part of a unique key constraint.


mPrimaryKey

protected boolean mPrimaryKey
Value determines whether the attribute is primary key.


mDiscrColumn

protected boolean mDiscrColumn
Value determines whether the attribute is discriminator column.


mRetrievedOnInsert

protected boolean mRetrievedOnInsert
Value determines whether the attribute is retrieved on Insert.


mRetrievedOnUpdate

protected boolean mRetrievedOnUpdate
Value determines whether the attribute is retrieved on update.


mDef

protected RowDef mDef
Back Pointer to Def Object where the Attribute belongs.


mObjectType

protected java.lang.String mObjectType
Object Type of the attribute.


mPrecision

protected int mPrecision
Precision Value for the attribute, defaulted to zero.


mQueriable

protected boolean mQueriable
Value determines whether the attribute is queryable.


mKind

protected byte mKind
Value for the Attribute's "kind"; for example, Transient, Dynamic, etc.


mUpdateable

protected byte mUpdateable
Value determines whether the attribute is updatable.


mType

protected int mType
Integer representation of the SQL type of the attribute.


mIndex

protected int mIndex
Index in the Table.


mDefaultValue

protected java.lang.Object mDefaultValue
The default value of the attribute.


mJavaType

protected java.lang.Class mJavaType
The Java Type Object for this attribute.


mElemType

protected java.lang.Class mElemType
Identifies the Java Type Object for this element. Used with VARRAYs.


mScale

protected int mScale
Scale value for attribute, set by default to 0. This is the number of decimal points before/after the decimal based on whether on whether the scale if positive or negative.


mDomainName

protected java.lang.String mDomainName
Domain name for this attribute if it's type is a generated domain


tableName

protected java.lang.String tableName
What database table does this attribute come from (if any)?


mAttrLoad

protected byte mAttrLoad

mObjectTableRef

protected boolean mObjectTableRef

mDataSecurity

protected boolean mDataSecurity

mBackwardDep

protected ArrayList mBackwardDep

mForwardDep

protected ArrayList mForwardDep

mObjectTableOID

protected boolean mObjectTableOID

mEffectiveDateType

protected byte mEffectiveDateType

mResolveAccessors

protected boolean mResolveAccessors

mHistoryKind

protected byte mHistoryKind

mSQLBuilder

protected SQLBuilder mSQLBuilder

mTypeFactoryInitialized

protected boolean mTypeFactoryInitialized

mElemFactory

protected java.lang.Object mElemFactory

mTypeFactory

protected java.lang.Object mTypeFactory

mNotNull

protected boolean mNotNull
Value determines whether the attribute is null.

Constructor Detail

AttributeDefImpl

protected AttributeDefImpl()
Method Detail

getAttributeKind

public byte getAttributeKind()
Returns the "kind" enumerations of this attribute. The "kind" of enumeration can be either persistent, derived, row-associated, transient, or dynamic.

Specified by:
getAttributeKind in interface AttributeDef
Returns:
one of ATTR_PERSISTENT, ATTR_SQL_DERIVED, ATTR_ASSOCIATED_ROW, ATTR_TRANSIENT, ATTR_DYNAMIC, ATTR_ENTITY_DERIVED, or ATTR_ASSOCIATED_ROWITERATOR.

setAttributeKind

protected void setAttributeKind(byte value)

getColumnName

public java.lang.String getColumnName()
Returns the column name to which this attribute is mapped.

Specified by:
getColumnName in interface AttributeDef
Returns:
the database column name of this attribute.

setColumnName

protected void setColumnName(java.lang.String colName)

getColumnNameForQuery

public java.lang.String getColumnNameForQuery()
Returns the column name to be used in query statement.

For Entity Object attributes, this REF([entity-alias]) if the attribute is an object table reference. Otherwise, it is [entity-alias].[column-name], where [column-name] is the name of the column to which the attribute is mapped (that is, the value returned by getColumnName.

For View Object attributes, the value it returns depends on whether the query was created in expert mode:

Specified by:
getColumnNameForQuery in interface AttributeDef
Returns:
the column name to be used in query.

getDef

public RowDef getDef()
Returns the DefObject object which describes this attribute.

Returns:
the definition for this attribute.

getEntityDef

public EntityDefImpl getEntityDef()
Return the EntityDefImpl object which contains this attribute

Returns:

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the default value of the attribute.

The default value for an attribute is expressed in terms of the Java type system, rather than the storage type system.

Returns:
the default value for the attribute, or null if none.

getElemSQLType

public int getElemSQLType()
Returns the jdbc type of the elements of this attribute.

For VARRAYs, this method returns the jdbc type of the elements that are in the VARRAY.

Element type is relevant only if the attribute is an array attribute.

Specified by:
getElemSQLType in interface AttributeDef
Returns:
the jdbc type (java.sql.Types.*) of this attribute's elements, or -1 if this attribute is not an array attribute.

getElemType

public java.lang.Class getElemType()
Returns the element type of the attribute.

For VARRAYs, this method returns the class name of the elements that are in the VARRAY.

Element type is relevant only if the attribute is an array attribute.

Specified by:
getElemType in interface AttributeDef
Returns:
the attribute's element class, or null if the attribute is not an array attribute.

getIndex

public int getIndex()
Returns the column position of this attribute in the data source. Index position is 0-based.

Specified by:
getIndex in interface AttributeDef
Returns:
the column index.

getObjectType

public java.lang.String getObjectType()

getJavaType

public java.lang.Class getJavaType()
Returns the Java type of the attribute.

For example, if the attribute is of type String, this method returns java.lang.String; if it is of type Number, it returns oracle.jbo.domain.Number.

Subclasses should override this method because Entities without accessors should also be able to get their types from attribute descriptors and beans.

Specified by:
getJavaType in interface AttributeDef
Returns:
the attribute's Java class, or Object for attributes which have no accessor methods available.

getPrecision

public int getPrecision()
Gets the attribute's precision.

For strings, precision is maximum allowed length. For numeric values, precision is the number of significant digits.

Specified by:
getPrecision in interface AttributeDef
Returns:
the precision value, or 0 if unspecified.

setPrecisionScale

public void setPrecisionScale(int prec,
                              int scale)
Sets the attribute's precision and scale.

For strings, precision is maximum allowed length. For numeric values, precision is the number of significant digits.

Scale is the number of digits to the right or left of the decimal point, depending on whether the scale value is positive or negative. Scale is meaning only for numeric attributes.

Parameters:
prec - the precision value, or 0 if unspecified.
scale - the scale value. The default is -127.

getSQLType

public int getSQLType()
Returns the SQL type of this attribute.

Specified by:
getSQLType in interface AttributeDef
Returns:
the data type. For JDBC types, returns a value of java.sql.Types. For Oracle JDBC types, returns a value of oracle.jdbc.driver.OracleTypes.
See Also:
java.sql.Types

getScale

public int getScale()
Gets the attribute's scale value: the number of digits to the right or left of the decimal point, depending on whether the scale value is positive or negative.

Scale value is meaningful only for numeric attributes.

Specified by:
getScale in interface AttributeDef
Returns:
the scale value. The default is -127.

getUIHelper

public AttributeHints getUIHelper()
Return the AttributeHints interface implemented by this class.

Specified by:
getUIHelper in interface AttributeDef
Returns:
this
See Also:
AttributeHints

getUpdateableFlag

public byte getUpdateableFlag()
Returns whether the attribute is updateable.

Specified by:
getUpdateableFlag in interface AttributeDef
Returns:
true if this is an editable attribute; false otherwise.

isMandatory

public boolean isMandatory()
Returns whether the attribute is not null.

Specified by:
isMandatory in interface AttributeDef
Returns:
true if this is attribute not null; false otherwise.

setMandatory

protected void setMandatory(boolean b)

isRetrievedOnInsert

public boolean isRetrievedOnInsert()
Returns whether the attribute value is retrieved from the database after a row is inserted in the post cycle.

Some derived attributes need to be re-fetched after a save operation has been performed. These typically include timestamps, computed fields, virtual columns and Oracle ROWIDs and OIDs.

Returns:
true if this attribute is retrieved after insert operations; false otherwise.

setRetrievedOnInsert

protected void setRetrievedOnInsert(boolean value)

isRetrievedOnUpdate

public boolean isRetrievedOnUpdate()
Returns whether the attribute is retrieved from the database after a row is updated.

Some derived attributes need to be re-fetched after a save operation has been performed. These typically include timestamps, computed fields, virtual columns and Oracle ROWIDs and OIDs.

Returns:
true if this attribute is retrieved after update operations; false otherwise.

setRetrievedOnUpdate

protected void setRetrievedOnUpdate(boolean value)

isPrimaryKey

public boolean isPrimaryKey()
Returns whether this attribute is a Primary Key for this Entity type.

The following code snippet uses this method to find the name and value of the primary key attribute in an array of AttributeDefs (attrs[]).

 String curAttrName = null;
 for (int j = 0; j < attrs.length; j++)
 {
   if (attrs[j].isPrimaryKey())
   {
     //get the name of the primary key
     curAttrName = attrs[j].getName();
     //assumes only one key
     String currValue = row.getAttribute(curAttrName).toString();
   }
 }
 

Specified by:
isPrimaryKey in interface AttributeDef
Returns:
true if this is a Primary Key; false otherwise.

setPrimaryKey

protected void setPrimaryKey(boolean b)

getTableName

public java.lang.String getTableName()

setTableName

protected void setTableName(java.lang.String name)

setDomainName

protected void setDomainName(java.lang.String name)
Set the DomainName object which describes this attribute.


getDomainName

public java.lang.String getDomainName()
Returns the DomainName object which describes this attribute.

Returns:
the Domain Name for this attribute.

isQueriable

public boolean isQueriable()
Returns whether this attribute can participate in the WHERE clause of a SQL statement.

Queriable attributes are those attributes that can have a filter condition for the WHERE clause. If this method returns false, the attribute will not be used in constructing the WHERE clause of the SQL statement.

Specified by:
isQueriable in interface AttributeDef
Returns:
true if queriable; false if the attribute will not be used in the WHERE clause.

setQueriable

protected void setQueriable(boolean value)

isSelected

public boolean isSelected()
Description copied from interface: AttributeDef
Tests if an attribute is transient. Transient attributes are those whose values are derived when needed. There is no mapping onto a column in a table for these values.

Specified by:
isSelected in interface AttributeDef
Returns:
true if this attribute is transient.

displayInShortForm

public final boolean displayInShortForm(LocaleContext locale)
Description copied from interface: AttributeHints
Returns true if the attribute is to displayed in the short(summary) form.

Specified by:
displayInShortForm in interface AttributeHints

getControlType

public final int getControlType(LocaleContext locale)
Returns the preferred control type for this attribute

Specified by:
getControlType in interface AttributeHints

getDisplayHeight

public final int getDisplayHeight(LocaleContext locale)
Returns the display width for this attribute

Specified by:
getDisplayHeight in interface AttributeHints

getDisplayHint

public final java.lang.String getDisplayHint(LocaleContext locale)
Retrieves the display hint that dictates whether this attribute should be visible or not. The two possible values are: ATTRIBUTE_DISPLAY_HINT_DISPLAY = "Display"; ATTRIBUTE_DISPLAY_HINT_HIDE = "Hide";

Specified by:
getDisplayHint in interface AttributeHints

getDisplayWidth

public final int getDisplayWidth(LocaleContext locale)
Returns the display width for this attribute

Specified by:
getDisplayWidth in interface AttributeHints

getFormattedAttribute

public final java.lang.String getFormattedAttribute(AttributeList attrList,
                                                    LocaleContext locale)
Description copied from interface: AttributeHints
Returns the formatted value for the attribute. The AttributeList parameter will usually be an instance of the oracle.jbo.Row class.

Specified by:
getFormattedAttribute in interface AttributeHints

getHint

public java.lang.String getHint(LocaleContext locale,
                                java.lang.String sHintName)
Return defaulted hint value

Specified by:
getHint in interface AttributeHints

getHintValue

public java.lang.String getHintValue(LocaleContext locale,
                                     java.lang.String sHintName)
Return non-defaulted hint value

Specified by:
getHintValue in interface AttributeHints

getLabel

public final java.lang.String getLabel(LocaleContext locale)
Retrieves the label to be used in any attribute prompts

Specified by:
getLabel in interface AttributeHints

getTooltip

public final java.lang.String getTooltip(LocaleContext locale)
Retrives the tooltip text to be used for this attribute

Specified by:
getTooltip in interface AttributeHints

getCompOpers

public ArrayList getCompOpers()

initFromXML

protected void initFromXML(org.kxml2.io.KXmlParser parser,
                           RowDef parent,
                           int index)

readIsUpdateable

protected void readIsUpdateable(org.kxml2.io.KXmlParser parser)
Determine if the XML specifies the Attribute is updateable

Parameters:
parser - Parser positioned at the start of an Attribute element

convertUpdateableStringToFlag

public static byte convertUpdateableStringToFlag(java.lang.String str)
Convert Attribute Updateable value to byte.

Parameters:
str - Attribute Updateable or not
Returns:
byte Attribute is updateable or not

convertUpdateableFlagToString

public static java.lang.String convertUpdateableFlagToString(byte updateable)

readJavaType

protected void readJavaType(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as this Attribute's Java type

Parameters:
parser - Parser positioned at the start of an Attribute element

readPrecision

protected void readPrecision(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as this Attribute's precision

Parameters:
parser - Parser positioned at the start of an Attribute element

readScale

protected void readScale(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as this Attribute's scale

Parameters:
parser - Parser positioned at the start of an Attribute element

readColumnType

protected void readColumnType(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as this Attribute's column type

Parameters:
parser - Parser positioned at the start of an Attribute element

readIsPersistent

protected void readIsPersistent(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as this Attribute's kind

Parameters:
parser -

readSqlType

protected void readSqlType(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as this Attribute's SQL type

Parameters:
parser -

readChangeIndicator

protected void readChangeIndicator(org.kxml2.io.KXmlParser parser)
Determine if the XML specifies this Attrubite is a "Change Indicator"

Parameters:
parser -

readDefaultValue

protected void readDefaultValue(org.kxml2.io.KXmlParser parser)
Determine what the XML specifies as the default value for this column.

Parameters:
parser -

formatForOutput

public java.lang.String formatForOutput(OutputFormatter formatter)
Specified by:
formatForOutput in interface Formattable
Overrides:
formatForOutput in class NamedObjectImpl

getResourceBundleDef

public ResourceBundleDef getResourceBundleDef()
Specified by:
getResourceBundleDef in interface ResourceBundleOwner
Specified by:
getResourceBundleDef in interface ValidationManager
Specified by:
getResourceBundleDef in interface VariableManagerOwner
Overrides:
getResourceBundleDef in class DefObject

getAttrLoad

public byte getAttrLoad()

setAttrLoad

public void setAttrLoad(byte attrLoad)

isObjectTableRef

public boolean isObjectTableRef()

isInWhereOrderGroup

public boolean isInWhereOrderGroup()

getAccessorVO

public ViewObject getAccessorVO(ViewObject originVO)
Description copied from interface: AttributeDef
For an accessor attribute, this method creates a View Object that works for the View Link definition.

Specified by:
getAccessorVO in interface AttributeDef
Parameters:
originVO - the View Object that owns the accessor
Returns:
a ViewObject instance.

isDiscrColumn

public boolean isDiscrColumn()
Description copied from interface: AttributeDef
Tests if an attribute is a discriminator. Discriminating attributes are those whose values determine the (sub)type representing the entity.

Specified by:
isDiscrColumn in interface AttributeDef
Returns:
true if this is a Discriminator Column; false otherwise.

setSelected

public void setSelected(boolean b)

getTransientExpression

public java.lang.String getTransientExpression()

getRecalcExpression

public java.lang.String getRecalcExpression()

addBackwardDependency

public void addBackwardDependency(java.lang.String attrName)

addForwardDependency

public void addForwardDependency(java.lang.String attrName)

setElemType

public void setElemType(java.lang.Class cls)

getFormat

public final java.lang.String getFormat(LocaleContext locale)
Description copied from interface: AttributeHints
returns the format string stored in the ui hints

Specified by:
getFormat in interface AttributeHints

getFormatter

public final Formatter getFormatter(LocaleContext locale)
Description copied from interface: AttributeHints
returns the formatter object stored in the ui hints

Specified by:
getFormatter in interface AttributeHints

hasFormatInformation

public final boolean hasFormatInformation(LocaleContext locale)
Description copied from interface: AttributeHints
Return true if any format hints have been defined for this attribute. This function should eb used to bracket any calls to the formatting api.

Specified by:
hasFormatInformation in interface AttributeHints

getFormatterClassName

public final java.lang.String getFormatterClassName(LocaleContext locale)
Returns the formatter object stored in the ui hints

Specified by:
getFormatterClassName in interface AttributeHints

parseFormattedAttribute

public final java.lang.Object parseFormattedAttribute(java.lang.String sValue,
                                                      LocaleContext locale)
Description copied from interface: AttributeHints
Strips off the formatting from a string and constructs an instance of the attribute's domain using the 'clean' string as a parameter of the contructor.

Specified by:
parseFormattedAttribute in interface AttributeHints

convertToJava

public java.lang.Object convertToJava(java.lang.Object data)
Converts a value from the database type to its corresponding Java type and returns the result.

This method uses AttributeDefImpl() metadata to convert a database value to the corresponding Java value.

Parameters:
data - a storage value to be converted.
Returns:
an object of the Java type defined for this attribute.
Throws:
DataCreationException - if the conversion cannot be performed.

setTransientExpression

public void setTransientExpression(java.lang.String expr)

setRecalcExpression

public void setRecalcExpression(java.lang.String expr)

getLOVFinder

public java.lang.String getLOVFinder()

setLOVFinder

public void setLOVFinder(java.lang.String lovFinder)

getLOVName

public java.lang.String getLOVName()
Gets the name of the LOV on which the attribute is a primary attribute.

Specified by:
getLOVName in interface AttributeDef
Returns:
name of the LOV

setLOVName

public void setLOVName(java.lang.String lovName)

isObjectTableOID

public boolean isObjectTableOID()
Internal: Applications should not use this method.


loadPermission

protected void loadPermission(org.kxml2.io.KXmlParser parser)

loadDependencies

protected void loadDependencies(org.kxml2.io.KXmlParser xmlElement)

setDiscrColumn

public void setDiscrColumn(boolean b)

getSQLTypeStringToId

public static int getSQLTypeStringToId(java.lang.String sqlType)
Converts a SQL type name to its identifier.

Parameters:
sqlType - the name of a SQL datatype.
Returns:
the SQL type's identifier.
See Also:
JboTypeMap

isEffectiveStartDate

public boolean isEffectiveStartDate()
Checks if the attribute represents the effective start date.

Returns:
true or false

isEffectiveEndDate

public boolean isEffectiveEndDate()
Checks if the attribute represents the effective end date.

Returns:
true or false

loadFromResultSet

public java.lang.Object loadFromResultSet(ResultSet rs,
                                          int index,
                                          DBTransactionImpl trans)
Internal: Applications should not use this method.

Returns the value from the specified ResultSet at the specified index. This method can be used when customizing the way that attributes are populated in the row. For example, assume you have a database Name column that contains a first name and a last name. You can use this method to fetch an individual entry, then parse the entry into separate Firstname and a Lastname attribute.

Parameters:
rs - the result set containing the value.
index - the index position for the value.
trans - the transaction containing the ResultSet.
Throws:
DataCreationException - if the Domain object cannot be created.

getAltKeyCount

public int getAltKeyCount()

evaluateTransientExpression

public java.lang.Object evaluateTransientExpression(Row row)

isCascadeUpdateParticipant

protected final boolean isCascadeUpdateParticipant()

getTypeFactory

public java.lang.Object getTypeFactory()
Internal: Applications should not use this method.

Returns the type factory for this attribute.


getElemFactory

public java.lang.Object getElemFactory()
Internal: Applications should not use this method.


shouldEvaluateTransientExpression

public boolean shouldEvaluateTransientExpression(Row row)

getLocaleName

public java.lang.String getLocaleName(LocaleContext locale,
                                      java.lang.String sName)
Description copied from interface: AttributeHints
function for retrieving the locale name of a hint

Specified by:
getLocaleName in interface AttributeHints

getCompOpers

public java.lang.String[][] getCompOpers(LocaleContext locale)
Description copied from interface: AttributeHints
Returns a Map of operators for this attribute.

Specified by:
getCompOpers in interface AttributeHints

getListBindingDef

public ListBindingDef getListBindingDef()
Specified by:
getListBindingDef in interface AttributeDef

convertToStorage

public java.lang.Object convertToStorage(java.lang.Object data,
                                         DBTransactionImpl trans)
Internal: Application should not use this method.

Converts a value from the attribute's Java type to a database type.

This method uses AttributeDefImpl metadata to convert a Java value to the corresponding database value. This method is typically called before the framework sets an attribute inside a JDBC statement parameter.

Parameters:
data - a Java value to be converted.
trans - the database transaction.
Returns:
an object of the storage type.
Throws:
DataCreationException - if the conversion cannot be performed.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.

Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.

Parameters:
listener - The PropertyChangeListener to be added

addValidator

public void addValidator(JboValidatorInterface listener)
Add a JboValidatorInterface to the listener list.

Specified by:
addValidator in interface ValidationManager
Parameters:
listener - The Validator to be added

removeValidator

public void removeValidator(JboValidatorInterface listener)
Removes a JboValidatorInterface from the listener list.

Parameters:
listener - The Validator to be removed

getValidatorCount

public int getValidatorCount()

getValidator

public JboValidatorInterface getValidator(int indx)

getValidators

public List getValidators()
Get the list of JboValidatorInterface objects registered with this attribute

Specified by:
getValidators in interface ValidationManager
Returns:
ArrayList List of Validators

isSessionScope

public boolean isSessionScope()

hasTransientExpression

public boolean hasTransientExpression()

getHistoryKind

public byte getHistoryKind()
Gets the attribute history kind.

Returns:
one of the HISTORY constants defined for this class.

loadFromStatement

public java.lang.Object loadFromStatement(PreparedStatement cs,
                                          int index,
                                          Transaction trans)
                                   throws DataCreationException
Internal: Applications should not use this method.

Returns the value from the specified JDBC prepared statement at the specified index. This method can be used when customizing the way that attributes are populated in the row. For example, assume you have a database Name column that contains a first name and a last name. You can use this method to fetch an individual entry, then parse the entry into separate Firstname and a Lastname attribute.

Parameters:
cs - the prepared statement containing the value.
index - the index position for the value.
trans - the transaction containing the ResultSet.
Throws:
DataCreationException - if the Domain object cannot be created.

getSQLBuilder

protected SQLBuilder getSQLBuilder()
Returns the SQLBuilderImpl - lazily building.

Returns:
the SQLBuilderImpl

resolvePropertyRaw

protected java.lang.Object resolvePropertyRaw(java.lang.String property,
                                              Locale locale)
Overrides:
resolvePropertyRaw in class DefObject

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.