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

E10653-02

oracle.jbo.common
Class VariableImpl

java.lang.Object
  extended by oracle.jbo.common.NamedObjectImpl
      extended by oracle.jbo.common.VariableImpl
All Implemented Interfaces:
java.io.Serializable, AttributeDef, AttributeHints, ResourceBundleOwner, JIReservedVarNames, JboReservedVarNames, DefPersistable, PersistentDefinition, Properties, ValidationManager, Variable
Direct Known Subclasses:
DCVariableImpl

public class VariableImpl
extends NamedObjectImpl
implements Variable, ValidationManager, AttributeHints, JboReservedVarNames, java.io.Serializable, DefPersistable, ResourceBundleOwner

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.jbo.AttributeHints
AttributeHints.ControlType
 
Field Summary
 
Fields inherited from class oracle.jbo.common.NamedObjectImpl
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX
 
Fields inherited from interface oracle.jbo.Variable
VAR_KIND_VIEW_CRITERIA_PARAM, VAR_KIND_WHERE_CLAUSE_PARAM, VAR_KIND_WHERE_OR_CRIT_PARAM
 
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_AUTOSUBMIT, 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_AUTOSUBMIT, HINT_NAME_CATEGORY, HINT_NAME_CTL_TYPE, 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_ComboBoxLovEdit, PNAME_EnumList, PNAME_LovButton, PNAME_TextField
 
Fields inherited from interface oracle.jbo.JboReservedVarNames
RESERVED_VAR_AGG_AVG, RESERVED_VAR_AGG_COUNT, RESERVED_VAR_AGG_MAX, RESERVED_VAR_AGG_MIN, RESERVED_VAR_AGG_SUM, RESERVED_VAR_AGGVAL_PREFIX, RESERVED_VAR_STRUCTURE_DEF
 
Fields inherited from interface oracle.jbo.expr.JIReservedVarNames
RESERVED_VAR_VALUE
 
Fields inherited from interface oracle.jbo.mom.xml.DefPersistable
XML_STATEMENT
 
Constructor Summary
VariableImpl()
          Default constructor for this class.
VariableImpl(java.lang.String name)
           
VariableImpl(java.lang.String name, java.lang.Class javaType)
           
VariableImpl(java.lang.String name, java.lang.Object defaultValue, byte updateable, boolean notNull, java.lang.Class javaType)
           
 
Method Summary
 java.util.Map _getDomainContext()
           
 void addValidator(JboValidatorInterface listener)
          Add a JboValidatorInterface to the listener list.
 java.lang.Object clone()
           
 java.lang.Object convertToJava(java.lang.Object data)
          Converts a value from the database type to its corresponding Java type and returns the result.
protected  VariableImpl createClone()
           
 boolean displayInShortForm(LocaleContext locale)
          Returns true if the attribute is to displayed in the short(summary) form.
 java.lang.Object evaluateTransientExpression(VariableManagerOwnerBase owner)
           
 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()
          Overridden to return null in Variable implementations.
 java.lang.String getColumnNameForQuery()
          Overridden to return null in Variable implementations.
 java.lang.String getColumnType()
          This method is used if the variable is of array type to get to the type name created in the database to store the array values.
 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
 java.lang.Object getDefaultValue()
          Returns the default value of the attribute.
 java.lang.String getDefXMLElementTag()
           
 java.lang.String getDefXMLNameSpace()
           
 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()
          Overridden to return -1.
 java.lang.Class getElemType()
          Returns the class type for the elements if this variable stores array types.
 ExprEval getExprEval()
           
 java.lang.Object getExtendedData()
           
 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()
          Overridden to return -1 for index.
 java.lang.Class getJavaType()
          Returns the Java type of the attribute.
 java.lang.String getJavaTypeName()
          Returns the name of the Java type of the attribute, mainly for design time.
 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 getLOVName()
          Gets the name of the LOV (list of values) associated with this attribute definition.
 java.util.Map getOperators(LocaleContext locale)
           
 DefPersistable getOrigObject()
           
 int getPrecision()
          Gets the attribute's precision.
 ResourceBundleDef getResourceBundleDef()
           
 java.lang.String getResourcePrefix()
           
 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.
 Session getSession(VariableManagerOwnerBase owner)
           
 int getSQLType()
          Overridden to return -1;
 StructureDef getStructureDef(VariableManagerOwnerBase owner)
           
 java.lang.String getTooltip(LocaleContext locale)
          Retrives the tooltip text to be used for this attribute
 java.lang.String getTransientExpression()
           
 AttributeHints getUIHelper()
          return the AttributeHints interface implemented by this class
 byte getUpdateableFlag()
          Returns whether the attribute is updateable.
 java.util.ArrayList getValidators()
          Get the list of JboValidatorInterface objects registered with this attribute
 java.lang.String getVariableKind()
           
 VariableManager getVariableManager()
           
 java.lang.String getXMLElementTag()
          Returns a piece of static info for the type of object this is invoked upon.
 boolean hasFormatInformation(LocaleContext locale)
          Return true if any format hints have been defined for this attribute.
 void initDefaultValueNoConversion(java.lang.String val)
          *** For internal framework use only *** only for testing purposes
 void initFromXML(DefElement xmlElement)
          *** For internal framework use only ***
 void initFromXML(DefElement xmlElement, boolean bDesignTime)
          *** For internal framework use only ***
 boolean isAutoSubmit(LocaleContext locale)
          Returns the autoSubmit value for this attribute
 boolean isDefinedDefaultValue()
          Passivation uses this to tell if the current value is not the definition default.
 boolean isDirty()
          This method returns if an Object is modified from last save/load
 boolean isDiscrColumn()
          Tests if an attribute is a discriminator.
 boolean isMandatory()
          Returns whether the attribute is not null.
 boolean isNew()
          This method returns if this object is previously persisted.
 boolean isPassivationNeeded()
          The framework calls this api when building the sparse list of variables that need passivation.
 boolean isPrimaryKey()
          Overridden to return false;
 boolean isQueriable()
          Returns true for Variables that are bound as where-clause parameters
 boolean isSelected()
           
protected  void loadCustomProperties(DefElement xmlElement, java.util.Map givenMap)
           
protected  void loadProperties(DefElement xmlElement)
           
protected  void loadSchemaProperties(DefElement xmlElement, java.util.Map givenMap)
           
 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.
 void removeValidator(JboValidatorInterface listener)
          Removes a JboValidatorInterface from the listener list.
protected  boolean requiresNamePrefixedResId()
           
 void setColumnType(java.lang.String columnType)
          This method is used to set the name of the table created in the database to store the array values.
 void setDefaultValue(java.lang.Object val)
           
 void setDirty(boolean b)
          This method marks the Object dirty
 void setElemType(java.lang.String elementTypeName)
          Sets the class type for the elements if this variable stores array types.
 void setExtendedData(java.lang.Object data)
           
 void setJavaType(java.lang.Class cls)
           
 void setJavaTypeName(java.lang.String typeName)
          *** For internal framework use only ***
 void setMandatory(boolean b)
           
 void setName(java.lang.String name)
          Name this object.
 void setNew(boolean b)
          This method marks the as previously persisted.
 void setOrigObject(DefPersistable oldObj)
           
protected  void setPassivationNeeded(boolean flag)
          *** For internal framework use only ***
 void setPrecisionScale(int prec, int scale)
          Sets the attribute's precision and scale.
 void setTransientExpression(java.lang.String expr)
           
 void setUpdateableFlag(byte updateable)
           
 void setVariableKind(java.lang.String kind)
           
 void setVariableManager(VariableManager manager)
           
 void writeChildren(DefWriter jos)
          Writes the Object's children to the Persistent storage
 void writeContents(DefWriter jos)
          Objects should write their persistence output in this method
 void writeObject(DefWriter jos)
          Objects should write their persistence output in this method
 
Methods inherited from class oracle.jbo.common.NamedObjectImpl
allocatePropertyMap, getAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyMap, getResourcesFromBundle, refreshProperty, removeProperty, removeProperty, resolvePropertyRaw, setFullName, setParent, setPropertiesMap, setPropertiesMap2, setProperty, setProperty, setPropertyMap
 
Methods inherited from class java.lang.Object
equals, finalize, 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.rules.ValidationManager
getFullName, getName
 
Methods inherited from interface oracle.jbo.mom.xml.DefPersistable
getFullName
 

Constructor Detail

VariableImpl

public VariableImpl()
Default constructor for this class.


VariableImpl

public VariableImpl(java.lang.String name)

VariableImpl

public VariableImpl(java.lang.String name,
                    java.lang.Class javaType)

VariableImpl

public VariableImpl(java.lang.String name,
                    java.lang.Object defaultValue,
                    byte updateable,
                    boolean notNull,
                    java.lang.Class javaType)
Method Detail

createClone

protected VariableImpl createClone()

clone

public java.lang.Object clone()
Specified by:
clone in interface Variable
Overrides:
clone in class java.lang.Object

setName

public void setName(java.lang.String name)
Description copied from class: NamedObjectImpl
Name this object.

Specified by:
setName in interface Variable
Overrides:
setName in class NamedObjectImpl
Parameters:
name - the name to be given to this object.

getVariableManager

public VariableManager getVariableManager()
Specified by:
getVariableManager in interface Variable

setVariableManager

public void setVariableManager(VariableManager manager)
Specified by:
setVariableManager in interface Variable

getVariableKind

public java.lang.String getVariableKind()
Specified by:
getVariableKind in interface Variable

setVariableKind

public void setVariableKind(java.lang.String kind)
Specified by:
setVariableKind in interface Variable

getExtendedData

public java.lang.Object getExtendedData()
Specified by:
getExtendedData in interface Variable

setExtendedData

public void setExtendedData(java.lang.Object data)
Specified by:
setExtendedData in interface Variable

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.

setUpdateableFlag

public void setUpdateableFlag(byte updateable)
Specified by:
setUpdateableFlag in interface Variable

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

public void setMandatory(boolean b)
Specified by:
setMandatory in interface Variable

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.

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.

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.

Specified by:
setPrecisionScale in interface Variable
Parameters:
prec - the precision value, or 0 if unspecified.
scale - the scale value. The default is -127.

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.

setJavaType

public void setJavaType(java.lang.Class cls)
Specified by:
setJavaType in interface Variable

getJavaTypeName

public java.lang.String getJavaTypeName()
Returns the name of the Java type of the attribute, mainly for design time.

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.

Specified by:
getJavaTypeName in interface Variable

setJavaTypeName

public void setJavaTypeName(java.lang.String typeName)
*** For internal framework use only ***


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.

Specified by:
getDefaultValue in interface Variable
Returns:
the default value for the attribute, or null if none.

setDefaultValue

public void setDefaultValue(java.lang.Object val)
Specified by:
setDefaultValue in interface Variable

initDefaultValueNoConversion

public void initDefaultValueNoConversion(java.lang.String val)
*** For internal framework use only *** only for testing purposes


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.

Specified by:
convertToJava in interface Variable
Parameters:
data - a storage value to be converted.
Returns:
an object of the Java type defined for this attribute.

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

getValidators

public java.util.ArrayList getValidators()
Get the list of JboValidatorInterface objects registered with this attribute

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

removeValidator

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

Parameters:
listener - The Validator to be removed

initFromXML

public void initFromXML(DefElement xmlElement)
*** For internal framework use only ***


initFromXML

public void initFromXML(DefElement xmlElement,
                        boolean bDesignTime)
*** For internal framework use only ***


setPassivationNeeded

protected void setPassivationNeeded(boolean flag)
*** For internal framework use only ***


isPassivationNeeded

public boolean isPassivationNeeded()
The framework calls this api when building the sparse list of variables that need passivation.

Specified by:
isPassivationNeeded in interface Variable

isDefinedDefaultValue

public boolean isDefinedDefaultValue()
Passivation uses this to tell if the current value is not the definition default.

Specified by:
isDefinedDefaultValue in interface Variable

loadProperties

protected void loadProperties(DefElement xmlElement)
Parameters:
xmlElement - The XML element to load from.

loadCustomProperties

protected void loadCustomProperties(DefElement xmlElement,
                                    java.util.Map givenMap)

loadSchemaProperties

protected void loadSchemaProperties(DefElement xmlElement,
                                    java.util.Map givenMap)

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

getResourceBundleDef

public ResourceBundleDef getResourceBundleDef()
Specified by:
getResourceBundleDef in interface ResourceBundleOwner
Specified by:
getResourceBundleDef in interface ValidationManager

getResourcePrefix

public java.lang.String getResourcePrefix()
Specified by:
getResourcePrefix in interface ResourceBundleOwner

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

requiresNamePrefixedResId

protected boolean requiresNamePrefixedResId()
Overrides:
requiresNamePrefixedResId in class NamedObjectImpl

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

getOperators

public java.util.Map getOperators(LocaleContext locale)

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

getDisplayHint

public final 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 final int getControlType(LocaleContext locale)
Returns the preferred control type for this attribute

Specified by:
getControlType in interface AttributeHints

getDisplayWidth

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

Specified by:
getDisplayWidth in interface AttributeHints

getDisplayHeight

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

Specified by:
getDisplayHeight in interface AttributeHints

isAutoSubmit

public final boolean isAutoSubmit(LocaleContext locale)
Returns the autoSubmit value for this attribute

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

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

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

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

getFormatterClassName

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

Specified by:
getFormatterClassName in interface AttributeHints

getAttributeKind

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

Specified by:
getAttributeKind in interface AttributeDef
Specified by:
getAttributeKind in interface Variable
Returns:
ATTR_VARIABLE

getColumnName

public java.lang.String getColumnName()
Overridden to return null in Variable implementations.

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

getColumnNameForQuery

public java.lang.String getColumnNameForQuery()
Overridden to return null in Variable implementations.

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

getSQLType

public int getSQLType()
Overridden to return -1;

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

isPrimaryKey

public boolean isPrimaryKey()
Overridden to return false;

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

getElemSQLType

public int getElemSQLType()
Overridden to return -1.

Specified by:
getElemSQLType in interface AttributeDef
Specified by:
getElemSQLType in interface Variable
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.

getIndex

public int getIndex()
Overridden to return -1 for index.

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

getColumnType

public java.lang.String getColumnType()
This method is used if the variable is of array type to get to the type name created in the database to store the array values. For example the sql should look like where ATTR.COLUMNNAME in (select column_value from table(cast(:VAR.NAME as VAR.COLUMNTYPE)))

Specified by:
getColumnType in interface Variable
Returns:
The table name created in the database to store array values

setColumnType

public void setColumnType(java.lang.String columnType)
This method is used to set the name of the table created in the database to store the array values. For example the sql should look like where ATTR.COLUMNNAME in (select column_value from table(cast(:VAR.NAME as VAR.COLUMNTYPE)))

Specified by:
setColumnType in interface Variable
Parameters:
columnType - The table name created in the database to store array values

getElemType

public java.lang.Class getElemType()
Returns the class type for the elements if this variable stores array types.

Specified by:
getElemType in interface AttributeDef
Returns:
The Class whose instances become the elements of the array

setElemType

public void setElemType(java.lang.String elementTypeName)
Sets the class type for the elements if this variable stores array types.

Parameters:
elementTypeName - The Class whose instances become the elements of the array

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.

isSelected

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

isQueriable

public boolean isQueriable()
Returns true for Variables that are bound as where-clause parameters

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

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.

getStructureDef

public StructureDef getStructureDef(VariableManagerOwnerBase owner)

getSession

public Session getSession(VariableManagerOwnerBase owner)

getTransientExpression

public java.lang.String getTransientExpression()
Specified by:
getTransientExpression in interface Variable

setTransientExpression

public void setTransientExpression(java.lang.String expr)
Specified by:
setTransientExpression in interface Variable

getExprEval

public ExprEval getExprEval()

evaluateTransientExpression

public java.lang.Object evaluateTransientExpression(VariableManagerOwnerBase owner)
Specified by:
evaluateTransientExpression in interface Variable

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)

getListBindingDef

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

isDirty

public boolean isDirty()
Description copied from interface: DefPersistable
This method returns if an Object is modified from last save/load

Specified by:
isDirty in interface DefPersistable
Returns:
Returns true if the Object is dirty. Returns false otherwise.

setDirty

public void setDirty(boolean b)
Description copied from interface: DefPersistable
This method marks the Object dirty

Specified by:
setDirty in interface DefPersistable
Parameters:
b - If true the Object is marked Dirty.

isNew

public boolean isNew()
Description copied from interface: DefPersistable
This method returns if this object is previously persisted.

Specified by:
isNew in interface DefPersistable
Returns:
true if the Object is previously persisted. Returns false otherwise.

setNew

public void setNew(boolean b)
Description copied from interface: DefPersistable
This method marks the as previously persisted. By default all objects are new objects. When the object is persisted first time, that object is marked as 'not new' object

Specified by:
setNew in interface DefPersistable
Parameters:
b - If true the Object is marked as new object.

getOrigObject

public DefPersistable getOrigObject()
Specified by:
getOrigObject in interface DefPersistable

setOrigObject

public void setOrigObject(DefPersistable oldObj)
Specified by:
setOrigObject in interface DefPersistable

getDefXMLElementTag

public java.lang.String getDefXMLElementTag()
Specified by:
getDefXMLElementTag in interface PersistentDefinition

getXMLElementTag

public java.lang.String getXMLElementTag()
Description copied from interface: PersistentDefinition
Returns a piece of static info for the type of object this is invoked upon. Examples are PreparedStatements for insert, update, delete, and String containing a base the select statement for retrieving instances of this type through the SQLInputStream

Specified by:
getXMLElementTag in interface PersistentDefinition
Returns:
returns the Statement required to store in Persitent Storage. Incase of XML, it just returns the String. In the case of SQL a JDBC PreparedStatement is returned.

getDefXMLNameSpace

public java.lang.String getDefXMLNameSpace()
Specified by:
getDefXMLNameSpace in interface PersistentDefinition

writeObject

public void writeObject(DefWriter jos)
Description copied from interface: PersistentDefinition
Objects should write their persistence output in this method

Specified by:
writeObject in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

writeContents

public void writeContents(DefWriter jos)
Description copied from interface: PersistentDefinition
Objects should write their persistence output in this method

Specified by:
writeContents in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

writeChildren

public void writeChildren(DefWriter jos)
Description copied from interface: PersistentDefinition
Writes the Object's children to the Persistent storage

Specified by:
writeChildren in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

_getDomainContext

public java.util.Map _getDomainContext()
Specified by:
_getDomainContext in interface Variable

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

E10653-02

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