|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jbo.common.NamedObjectImpl
oracle.jbo.common.VariableImpl
public class VariableImpl
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.GenericHints |
---|
PROPERTY_LABEL, PROPERTY_LABEL_PLURAL, PROPERTY_TOOLTIP |
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 |
java.lang.String |
getLabelPlural(LocaleContext locale)
Retrives the label plural text to be used for this attribute |
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. |
java.lang.String |
getSerializerClassName()
Gets the name of the custom value serializer class. |
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 |
ValueSerializer |
getValueSerializer()
Gets an instance of the custom value serializer class. |
java.lang.String |
getVariableKind()
|
VariableManager |
getVariableManager()
|
java.lang.Object |
getXMLContentValue(Element varElem)
Converts an XML element to an instance of this variable's Java type. |
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 |
setSerializerClassName(java.lang.String className)
Sets the name of the custom value serializer class. |
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 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 |
---|
public VariableImpl()
public VariableImpl(java.lang.String name)
public VariableImpl(java.lang.String name, java.lang.Class javaType)
public VariableImpl(java.lang.String name, java.lang.Object defaultValue, byte updateable, boolean notNull, java.lang.Class javaType)
Method Detail |
---|
protected VariableImpl createClone()
public java.lang.Object clone()
clone
in interface Variable
clone
in class java.lang.Object
public void setName(java.lang.String name)
NamedObjectImpl
setName
in interface Variable
setName
in class NamedObjectImpl
name
- the name to be given to this object.public VariableManager getVariableManager()
getVariableManager
in interface Variable
public void setVariableManager(VariableManager manager)
setVariableManager
in interface Variable
public java.lang.String getVariableKind()
getVariableKind
in interface Variable
public void setVariableKind(java.lang.String kind)
setVariableKind
in interface Variable
public java.lang.Object getExtendedData()
getExtendedData
in interface Variable
public void setExtendedData(java.lang.Object data)
setExtendedData
in interface Variable
public byte getUpdateableFlag()
getUpdateableFlag
in interface AttributeDef
public void setUpdateableFlag(byte updateable)
setUpdateableFlag
in interface Variable
public boolean isMandatory()
isMandatory
in interface AttributeDef
public void setMandatory(boolean b)
setMandatory
in interface Variable
public int getPrecision()
For strings, precision is maximum allowed length. For numeric values, precision is the number of significant digits.
getPrecision
in interface AttributeDef
public int getScale()
Scale value is meaningful only for numeric attributes.
getScale
in interface AttributeDef
public void setPrecisionScale(int prec, int 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.
setPrecisionScale
in interface Variable
prec
- the precision value, or 0 if unspecified.scale
- the scale value. The default is -127.public java.lang.Class getJavaType()
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.
getJavaType
in interface AttributeDef
public void setJavaType(java.lang.Class cls)
setJavaType
in interface Variable
public java.lang.String getJavaTypeName()
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.
getJavaTypeName
in interface Variable
public void setJavaTypeName(java.lang.String typeName)
public java.lang.Object getDefaultValue()
The default value for an attribute is expressed in terms of the Java type system, rather than the storage type system.
getDefaultValue
in interface Variable
public void setDefaultValue(java.lang.Object val)
setDefaultValue
in interface Variable
public void initDefaultValueNoConversion(java.lang.String val)
public java.lang.Object convertToJava(java.lang.Object data)
This method uses AttributeDefImpl() metadata to convert a database value to the corresponding Java value.
convertToJava
in interface Variable
data
- a storage value to be converted.
public void addValidator(JboValidatorInterface listener)
JboValidatorInterface
to the listener list.
addValidator
in interface ValidationManager
listener
- The Validator to be addedpublic java.util.ArrayList getValidators()
getValidators
in interface ValidationManager
public void removeValidator(JboValidatorInterface listener)
JboValidatorInterface
from the listener list.
listener
- The Validator to be removedpublic void initFromXML(DefElement xmlElement)
public void initFromXML(DefElement xmlElement, boolean bDesignTime)
protected void setPassivationNeeded(boolean flag)
public boolean isPassivationNeeded()
isPassivationNeeded
in interface Variable
public boolean isDefinedDefaultValue()
isDefinedDefaultValue
in interface Variable
protected void loadProperties(DefElement xmlElement)
xmlElement
- The XML element to load from.protected void loadCustomProperties(DefElement xmlElement, java.util.Map givenMap)
protected void loadSchemaProperties(DefElement xmlElement, java.util.Map givenMap)
public AttributeHints getUIHelper()
getUIHelper
in interface AttributeDef
AttributeHints
public java.lang.String getLocaleName(LocaleContext locale, java.lang.String sName)
AttributeHints
getLocaleName
in interface AttributeHints
public ResourceBundleDef getResourceBundleDef()
getResourceBundleDef
in interface ResourceBundleOwner
getResourceBundleDef
in interface ValidationManager
public java.lang.String getResourcePrefix()
getResourcePrefix
in interface ResourceBundleOwner
public java.lang.String[][] getCompOpers(LocaleContext locale)
AttributeHints
getCompOpers
in interface AttributeHints
protected boolean requiresNamePrefixedResId()
requiresNamePrefixedResId
in class NamedObjectImpl
public final java.lang.String getLabel(LocaleContext locale)
getLabel
in interface GenericHints
public java.util.Map getOperators(LocaleContext locale)
public final java.lang.String getTooltip(LocaleContext locale)
getTooltip
in interface GenericHints
public final java.lang.String getLabelPlural(LocaleContext locale)
getLabelPlural
in interface GenericHints
public final java.lang.String getDisplayHint(LocaleContext locale)
getDisplayHint
in interface AttributeHints
public final int getControlType(LocaleContext locale)
getControlType
in interface AttributeHints
public final int getDisplayWidth(LocaleContext locale)
getDisplayWidth
in interface AttributeHints
public final int getDisplayHeight(LocaleContext locale)
getDisplayHeight
in interface AttributeHints
public final boolean isAutoSubmit(LocaleContext locale)
isAutoSubmit
in interface AttributeHints
public java.lang.String getHint(LocaleContext locale, java.lang.String sHintName)
getHint
in interface AttributeHints
public java.lang.String getHintValue(LocaleContext locale, java.lang.String sHintName)
getHintValue
in interface GenericHints
public final java.lang.String getFormat(LocaleContext locale)
AttributeHints
getFormat
in interface AttributeHints
public final Formatter getFormatter(LocaleContext locale)
AttributeHints
getFormatter
in interface AttributeHints
public final boolean hasFormatInformation(LocaleContext locale)
AttributeHints
hasFormatInformation
in interface AttributeHints
public final java.lang.String getFormattedAttribute(AttributeList attrList, LocaleContext locale)
AttributeHints
getFormattedAttribute
in interface AttributeHints
public final java.lang.Object parseFormattedAttribute(java.lang.String sValue, LocaleContext locale)
AttributeHints
parseFormattedAttribute
in interface AttributeHints
public final boolean displayInShortForm(LocaleContext locale)
AttributeHints
displayInShortForm
in interface AttributeHints
public final java.lang.String getFormatterClassName(LocaleContext locale)
getFormatterClassName
in interface AttributeHints
public byte getAttributeKind()
AttributeDef
getAttributeKind
in interface AttributeDef
getAttributeKind
in interface Variable
public java.lang.String getColumnName()
getColumnName
in interface AttributeDef
getColumnName
in interface Variable
public java.lang.String getColumnNameForQuery()
getColumnNameForQuery
in interface AttributeDef
getColumnNameForQuery
in interface Variable
public int getSQLType()
getSQLType
in interface AttributeDef
getSQLType
in interface Variable
Types
public boolean isPrimaryKey()
isPrimaryKey
in interface AttributeDef
isPrimaryKey
in interface Variable
true
if this is either a Primary Key attribute or
part of the attributes that constitute the Primary Key for a given row.public int getElemSQLType()
getElemSQLType
in interface AttributeDef
getElemSQLType
in interface Variable
public int getIndex()
getIndex
in interface AttributeDef
public java.lang.String getColumnType()
where ATTR.COLUMNNAME in (select column_value from table(cast(:VAR.NAME as VAR.COLUMNTYPE)))
getColumnType
in interface Variable
public void setColumnType(java.lang.String columnType)
where ATTR.COLUMNNAME in (select column_value from table(cast(:VAR.NAME as VAR.COLUMNTYPE)))
setColumnType
in interface Variable
columnType
- The table name created in the database to store array valuespublic java.lang.Class getElemType()
getElemType
in interface AttributeDef
public void setElemType(java.lang.String elementTypeName)
elementTypeName
- The Class whose instances become the elements of the arraypublic boolean isDiscrColumn()
AttributeDef
isDiscrColumn
in interface AttributeDef
public boolean isSelected()
isSelected
in interface AttributeDef
public boolean isQueriable()
isQueriable
in interface AttributeDef
true
if this attribute is queriable.public ViewObject getAccessorVO(ViewObject originVO)
AttributeDef
getAccessorVO
in interface AttributeDef
originVO
- the View Object that owns the accessor
ViewObject
instance.public StructureDef getStructureDef(VariableManagerOwnerBase owner)
public Session getSession(VariableManagerOwnerBase owner)
public java.lang.String getTransientExpression()
getTransientExpression
in interface Variable
public void setTransientExpression(java.lang.String expr)
setTransientExpression
in interface Variable
public ExprEval getExprEval()
public java.lang.Object evaluateTransientExpression(VariableManagerOwnerBase owner)
evaluateTransientExpression
in interface Variable
public java.lang.String getLOVName()
AttributeDef
getLOVName
in interface AttributeDef
public ListBindingDef getListBindingDef()
getListBindingDef
in interface AttributeDef
public void setSerializerClassName(java.lang.String className)
Variable
ValueSerializer
interface.
setSerializerClassName
in interface Variable
className
- name of the custom value serializer classpublic java.lang.String getSerializerClassName()
Variable
getSerializerClassName
in interface Variable
null
if it is not defined.public ValueSerializer getValueSerializer()
Variable
getValueSerializer
in interface Variable
null
if it is not defined.VariableValueManager.writeVarsToXML(Document, Element, boolean)
public java.lang.Object getXMLContentValue(Element varElem)
Variable
getXMLContentValue
in interface Variable
varElem
- an XML element containing the serialized variable value
VariableValueManager.readVarsFromXML(Element)
public boolean isDirty()
DefPersistable
isDirty
in interface DefPersistable
public void setDirty(boolean b)
DefPersistable
setDirty
in interface DefPersistable
b
- If true the Object is marked Dirty.public boolean isNew()
DefPersistable
isNew
in interface DefPersistable
public void setNew(boolean b)
DefPersistable
setNew
in interface DefPersistable
b
- If true the Object is marked as new object.public DefPersistable getOrigObject()
getOrigObject
in interface DefPersistable
public void setOrigObject(DefPersistable oldObj)
setOrigObject
in interface DefPersistable
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
public java.lang.String getXMLElementTag()
PersistentDefinition
getXMLElementTag
in interface PersistentDefinition
public java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace
in interface PersistentDefinition
public void writeObject(DefWriter jos)
PersistentDefinition
writeObject
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void writeChildren(DefWriter jos)
PersistentDefinition
writeChildren
in interface PersistentDefinition
jos
- the Output storage for persistencepublic java.util.Map _getDomainContext()
_getDomainContext
in interface Variable
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |