Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.jbo.common
Class AttributeDefHelper

java.lang.Object
  extended by oracle.jbo.common.PropertiesHelper
      extended by oracle.jbo.common.AttributeDefHelper
All Implemented Interfaces:
java.io.Serializable, AttributeDef, Properties
Direct Known Subclasses:
AttributeDefImpl, AttributeInfo

public abstract class AttributeDefHelper
extends PropertiesHelper
implements AttributeDef, java.io.Serializable

Internal: Applications should not use this class.

See Also:
Serialized Form

Field Summary
static int HISTORY_TYPE_RESERVED_IDS
           
 
Fields inherited from class oracle.jbo.common.PropertiesHelper
mProperties
 
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
 
Constructor Summary
protected AttributeDefHelper()
           
protected AttributeDefHelper(java.lang.String nm, java.lang.String cnm, java.lang.String cnmForQuery, int idx, java.lang.String typ, int sqlType, int typeGroup, byte kind, boolean isSelected, boolean isQueriable, boolean isFromReference, byte updateable, boolean primarykey, boolean mandatory, int precision, int scale, java.lang.String elemClzName, java.lang.String lovName, boolean isDiscrColumn)
           
 
Method Summary
static java.lang.String convertUpdateableFlagToString(byte updateable)
           
static byte convertUpdateableStringToFlag(java.lang.String str)
          Convert Attribute Updateable value to byte.
 ViewObject getAccessorVO(ViewObject originVO)
          For an accessor attribute, this method creates a View Object that works for the View Link definition.
 byte getAttributeKind()
          Gets the attribute value.
 java.lang.String getColumnName()
          Gets the name of the database column the attribute represents.
 java.lang.String getColumnNameForQuery()
          Gets the column name to be used in query statement.
 int getElemSQLType()
          Returns the jdbc type of the elements of this attribute.
 java.lang.Class getElemType()
          Returns the element type of the attribute.
 int getIndex()
          Gets the index of the attribute in the context of a StoreInfo instance.
 java.lang.Class getJavaType()
          Gets the Java class of the object stored for this attribute definition.
 java.lang.String getJavaTypeName()
           
 java.lang.String getLOVName()
          Gets the name of the LOV (list of values) associated with this attribute definition.
 java.lang.String getName()
          Gets the name of the attribute.
 int getPrecision()
          Gets the precision of a numeric or string attribute.
 int getScale()
          Get the scale value of a numeric attribute.
 int getSQLType()
          Gets the JDBC type of the attribute.
 int getTypeGroup()
           
 byte getUpdateableFlag()
          Tests if an attribute can be modified.
 boolean isDiscrColumn()
          Tests if an attribute is a discriminator.
 boolean isFromReference()
           
 boolean isMandatory()
          Return true if this attribute does not allow null values.
 boolean isPrimaryKey()
          Tests if an attribute is a Primary Key.
 boolean isQueriable()
          Tests if an attribute is queriable.
 boolean isSelected()
           
static java.lang.Object parseFormattedAttribute(AttributeDef ad, java.lang.String sValue, LocaleContext locale)
           
 void setName(java.lang.String name)
          This method is not implemented by default.
 
Methods inherited from class oracle.jbo.common.PropertiesHelper
closeObject, getImageLoc, getProperties, getProperty, getProperty, isReadOnly, refreshProperties, refreshProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jbo.AttributeDef
getListBindingDef, getUIHelper
 
Methods inherited from interface oracle.jbo.Properties
getProperties, getProperty, getProperty, refreshProperty
 

Field Detail

HISTORY_TYPE_RESERVED_IDS

public static final int HISTORY_TYPE_RESERVED_IDS
See Also:
Constant Field Values
Constructor Detail

AttributeDefHelper

protected AttributeDefHelper()

AttributeDefHelper

protected AttributeDefHelper(java.lang.String nm,
                             java.lang.String cnm,
                             java.lang.String cnmForQuery,
                             int idx,
                             java.lang.String typ,
                             int sqlType,
                             int typeGroup,
                             byte kind,
                             boolean isSelected,
                             boolean isQueriable,
                             boolean isFromReference,
                             byte updateable,
                             boolean primarykey,
                             boolean mandatory,
                             int precision,
                             int scale,
                             java.lang.String elemClzName,
                             java.lang.String lovName,
                             boolean isDiscrColumn)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: AttributeDef
Gets the name of the attribute.

Specified by:
getName in interface AttributeDef
Returns:
the name of the attribute.

getColumnName

public java.lang.String getColumnName()
Description copied from interface: AttributeDef
Gets the name of the database column the attribute represents.

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

getColumnNameForQuery

public java.lang.String getColumnNameForQuery()
Description copied from interface: AttributeDef
Gets the column name to be used in query statement. If the VO involves multiple entity usages, the column name may have to be qualified with the table alias for the appropriate entity. If the query statement is a full query ("expert mode"), the where-clause in the outer select must use column alias used for the inner select. This method takes care of all this and returns the right column name to be used for a query statement.

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

getIndex

public int getIndex()
Description copied from interface: AttributeDef
Gets the index of the attribute in the context of a StoreInfo instance.

Specified by:
getIndex in interface AttributeDef
Returns:
the index of the attribute row's definition object.

getJavaType

public java.lang.Class getJavaType()
Description copied from interface: AttributeDef
Gets the Java class of the object stored for this attribute definition.

Specified by:
getJavaType in interface AttributeDef
Returns:
the class of the attribute.

getJavaTypeName

public java.lang.String getJavaTypeName()

getSQLType

public int getSQLType()
Description copied from interface: AttributeDef
Gets the JDBC type of the attribute.

Specified by:
getSQLType in interface AttributeDef
Returns:
the JDBC type.
See Also:
Types

getTypeGroup

public int getTypeGroup()

getAttributeKind

public byte getAttributeKind()
Description copied from interface: AttributeDef
Gets the attribute value.

Specified by:
getAttributeKind in interface AttributeDef
Returns:
one of the ATTR constants defined for this class.

isSelected

public boolean isSelected()
Specified by:
isSelected in interface AttributeDef

isQueriable

public boolean isQueriable()
Description copied from interface: AttributeDef
Tests if an attribute is queriable.

Queriable attributes are those that may 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 SQL statements to fetch data.

Specified by:
isQueriable in interface AttributeDef
Returns:
true if this attribute is queriable.

isFromReference

public boolean isFromReference()

getUpdateableFlag

public byte getUpdateableFlag()
Description copied from interface: AttributeDef
Tests if an attribute can be modified.

Specified by:
getUpdateableFlag in interface AttributeDef
Returns:
READONLY, UPDATEABLE, or UPDATEABLE_WHILE_NEW.

isPrimaryKey

public boolean isPrimaryKey()
Description copied from interface: AttributeDef
Tests if an attribute is a Primary Key.

Specified by:
isPrimaryKey in interface AttributeDef
Returns:
true if this is either a Primary Key attribute or part of the attributes that constitute the Primary Key for a given row.

isMandatory

public boolean isMandatory()
Return true if this attribute does not allow null values.

Specified by:
isMandatory in interface AttributeDef
Returns:
true if this attribute cannot store a null value

getPrecision

public int getPrecision()
Description copied from interface: AttributeDef
Gets the precision of a numeric or string attribute.

'Precision' for a string is the maximum length.

Specified by:
getPrecision in interface AttributeDef
Returns:
the precision value for this attribute.

getScale

public int getScale()
Description copied from interface: AttributeDef
Get the scale value of a numeric attribute.

Specified by:
getScale in interface AttributeDef
Returns:
the scale value for this attribute, if applicable.

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.

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 java.sql.Types.NULL if this attribute is not an array attribute.

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.

setName

public void setName(java.lang.String name)
Description copied from class: PropertiesHelper
This method is not implemented by default. subclasses may implement this method.

Overrides:
setName in class PropertiesHelper
Parameters:
name -
For internal use only. Application developers should not use this

getLOVName

public java.lang.String getLOVName()
Description copied from interface: AttributeDef
Gets the name of the LOV (list of values) associated with this attribute definition.

Specified by:
getLOVName in interface AttributeDef
Returns:
the name of the LOV (may be null)

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.

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)

parseFormattedAttribute

public static java.lang.Object parseFormattedAttribute(AttributeDef ad,
                                                       java.lang.String sValue,
                                                       LocaleContext locale)

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

Copyright © 1997, 2011, Oracle. All rights reserved.