Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.domain
Class DomainAttributeDef

java.lang.Object
  extended byoracle.jbo.domain.DomainAttributeDef
All Implemented Interfaces:
AttributeDef, AttributeHints, Properties

public class DomainAttributeDef
extends java.lang.Object
implements AttributeDef, AttributeHints


Field Summary
 
Fields inherited from interface oracle.jbo.AttributeDef
ATTR_ASSOCIATED_ROW, ATTR_ASSOCIATED_ROWITERATOR, ATTR_DYNAMIC, ATTR_ENTITY_DERIVED, ATTR_PERSISTENT, ATTR_SQL_DERIVED, ATTR_TRANSIENT, READONLY, UPDATEABLE, UPDATEABLE_WHILE_NEW
 
Fields inherited from interface oracle.jbo.AttributeHints
ATTRIBUTE_CTL_DISPLAYHEIGHT, ATTRIBUTE_CTL_DISPLAYWIDTH, 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, CTLTYPE_DATE, CTLTYPE_DEFAULT, CTLTYPE_EDIT, CTLTYPE_IMAGE, CTLTYPE_LIST, CTLTYPE_LOV, CTLTYPE_TOGGLE, FMT_FORMAT, FMT_FORMATTER
 
Constructor Summary
DomainAttributeDef(java.lang.String name, java.lang.String columnName, int index, java.lang.Class javaType, int sqlType, java.lang.String sqlTypeName, int scale, int precision, boolean isMandatory)
           
DomainAttributeDef(java.lang.String name, java.lang.String columnName, int index, java.lang.Class javaType, int sqlType, java.lang.String sqlTypeName, int scale, int precision, boolean isMandatory, java.lang.String entityDefName)
           
 
Method Summary
 boolean displayInShortForm(LocaleContext locale)
          Returns true if the attribute is to displayed in the short(summary) form.
 byte getAttributeKind()
          Gets the attribute kind.
 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 getControlType(LocaleContext locale)
          Returns the preferred control type for this attribute
 int getDisplayHeight(LocaleContext locale)
          Returns the display width for this attribute
 java.lang.String getDisplayHint(LocaleContext locale)
          Retrieves the displya hint that dictates whether this attributr should be visible or not.
 int getDisplayWidth(LocaleContext locale)
          Returns the display width for this attribute
 int getElemSQLType()
          Return -1;
 java.lang.Class getElemType()
          Return null;
 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
 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 getLabel(LocaleContext locale)
          Retrieves the label to be used in any attribute prompts
 java.lang.String getLocaleName(LocaleContext locale, java.lang.String sName)
          function for retrieving the locale name of a hint
 java.lang.String getName()
          Gets the name of the attribute.
 int getPrecision()
          Gets the precision of a numeric or string attribute.
 java.util.Hashtable getProperties()
          Gets the table of properties.
 java.lang.Object getProperty(java.lang.String hintName)
          Retrieves the specified property, if it exists.
 java.lang.String getReferencedObjectDefName()
           
 int getScale()
          Get the scale value of a numeric attribute.
 int getSQLType()
          Gets the JDBC type of the attribute.
 java.lang.String getTooltip(LocaleContext locale)
          Retrives the tooltip text to be used for this attribute
 AttributeHints getUIHelper()
          return the AttributeHints interface implemented by this class
 byte getUpdateableFlag()
          Tests if an attribute can be modified.
static Node getXMLContentNode(Document xmlDoc, java.lang.Object attrValue, boolean isCData)
          Deprecated. since 9.0.2 use the other getXMLContentNode() .
static Node getXMLContentNode(Document xmlDoc, java.lang.Object attrValue, boolean isCData, boolean serialize)
           
 boolean hasFormatInformation(LocaleContext locale)
          Return true if any format hints have been defined for this attribute.
 boolean isMandatory()
          Tests if an attribute does not allow null values.
 boolean isPrimaryKey()
          Tests if an attribute is a Primary Key.
 boolean isQueriable()
          Tests if an attribute is queriable.
 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.
static java.lang.String printAttrXMLDefinition(AttributeList row, java.lang.String attrTag, AttributeDef ad, java.util.Hashtable allDefs, java.io.PrintWriter pw, boolean bContainees)
           
 java.lang.Object refreshProperty(java.lang.String hintName)
          Retrieves the specified property, if it exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainAttributeDef

public DomainAttributeDef(java.lang.String name,
                          java.lang.String columnName,
                          int index,
                          java.lang.Class javaType,
                          int sqlType,
                          java.lang.String sqlTypeName,
                          int scale,
                          int precision,
                          boolean isMandatory)

DomainAttributeDef

public DomainAttributeDef(java.lang.String name,
                          java.lang.String columnName,
                          int index,
                          java.lang.Class javaType,
                          int sqlType,
                          java.lang.String sqlTypeName,
                          int scale,
                          int precision,
                          boolean isMandatory,
                          java.lang.String entityDefName)
Method Detail

getAttributeKind

public byte getAttributeKind()
Gets the attribute kind.

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

getName

public java.lang.String getName()
Gets the name of the attribute.

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

getColumnName

public java.lang.String getColumnName()
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()
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()
Gets the Java class of the object stored for this attribute definition.

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

getSQLType

public int getSQLType()
Gets the JDBC type of the attribute.

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

getScale

public int getScale()
Get the scale value of a numeric attribute.

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

getPrecision

public int getPrecision()
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.

isQueriable

public boolean isQueriable()
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.

getUpdateableFlag

public byte getUpdateableFlag()
Tests if an attribute can be modified.

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

isPrimaryKey

public boolean isPrimaryKey()
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()
Tests if an attribute does not allow null values.

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

getProperty

public java.lang.Object getProperty(java.lang.String hintName)
Retrieves the specified property, if it exists.

Specified by:
getProperty in interface Properties
Parameters:
hintName - Property name.
Returns:
the named property.

refreshProperty

public java.lang.Object refreshProperty(java.lang.String hintName)
Description copied from interface: Properties
Retrieves the specified property, if it exists. If the application running in a 3 tier environment, it retrieves the property from the middle-tier server, refreshing the value on the client side. If the application is running in a 2 tier environment, it is equivalent to getProperty.

Specified by:
refreshProperty in interface Properties
Parameters:
hintName - Property name.
Returns:
the value of the property, if any, otherwise null.

getReferencedObjectDefName

public java.lang.String getReferencedObjectDefName()

getProperties

public java.util.Hashtable getProperties()
Gets the table of properties.

Specified by:
getProperties in interface Properties
Returns:
a hashtable of properties.

getXMLContentNode

public static Node getXMLContentNode(Document xmlDoc,
                                     java.lang.Object attrValue,
                                     boolean isCData)
Deprecated. since 9.0.2 use the other getXMLContentNode() .


getXMLContentNode

public static Node getXMLContentNode(Document xmlDoc,
                                     java.lang.Object attrValue,
                                     boolean isCData,
                                     boolean serialize)

printAttrXMLDefinition

public static java.lang.String printAttrXMLDefinition(AttributeList row,
                                                      java.lang.String attrTag,
                                                      AttributeDef ad,
                                                      java.util.Hashtable allDefs,
                                                      java.io.PrintWriter pw,
                                                      boolean bContainees)

getElemType

public java.lang.Class getElemType()
Return null;

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()
Return -1;

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.

getUIHelper

public AttributeHints getUIHelper()
return the AttributeHints interface implemented by this class

Specified by:
getUIHelper in interface AttributeDef
See Also:
AttributeHints

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

getLabel

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

Specified by:
getLabel in interface AttributeHints

getTooltip

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

Specified by:
getTooltip in interface AttributeHints

getDisplayHint

public java.lang.String getDisplayHint(LocaleContext locale)
Retrieves the displya hint that dictates whether this attributr 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

getControlType

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

Specified by:
getControlType in interface AttributeHints

getDisplayWidth

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

Specified by:
getDisplayWidth in interface AttributeHints

getDisplayHeight

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

Specified by:
getDisplayHeight 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

getFormat

public 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 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 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

getFormattedAttribute

public 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

parseFormattedAttribute

public 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

displayInShortForm

public 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

getFormatterClassName

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

Specified by:
getFormatterClassName in interface AttributeHints

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

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