|
Oracle Application Development Framework Model and Business Components Java API Reference
10g Release 3 (10.1.3) B16005-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.jbo.common.NamedObjectImpl
oracle.jbo.common.VariableImpl
| Field Summary | |
protected java.lang.Object |
mDefaultValueThe default value of the attribute. |
protected java.lang.Class |
mJavaTypeThe Java Type Object for this attribute. |
protected java.lang.String |
mJavaTypeName |
protected boolean |
mMandatoryValue determines whether the attribute allows null values. |
protected boolean |
mNotNullValue determines whether the attribute is null. |
protected int |
mPrecisionPrecision Value for the attribute, defaulted to zero. |
protected int |
mScaleScale value for attribute, set by default to 0. |
protected byte |
mUpdateableValue determines whether the attribute is updatable. |
| Fields inherited from class oracle.jbo.common.NamedObjectImpl |
mFullName, mObjName, mParent, mProperties |
| Fields inherited from interface oracle.jbo.Variable |
VAR_KIND_WHERE_CLAUSE_PARAM |
| 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, ATTR_VARIABLE, READONLY, UPDATEABLE, UPDATEABLE_WHILE_NEW |
| 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 | |
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. |
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. |
int |
getControlType(LocaleContext locale)Returns the preferred control type for 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 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. |
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 |
getLocaleName(LocaleContext locale, java.lang.String sName)function for retrieving the locale name of a hint |
int |
getPrecision()Gets the attribute's precision. |
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. |
int |
getSQLType()Overridden to return -1; |
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()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() |
boolean |
hasFormatInformation(LocaleContext locale)Return true if any format hints have been defined for this attribute. |
void |
initFromXML(DefElement xmlElement)*** For internal framework use only *** |
void |
initFromXML(DefElement xmlElement, boolean bDesignTime)*** For internal framework use only *** |
boolean |
isDefinedDefaultValue()Passivation uses this to tell if the current value is not the definition default. |
boolean |
isMandatory()Returns whether the attribute is not null. |
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()Tests if an attribute is transient. |
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 java.lang.String |
resolveResourceProperty(java.lang.String property, LocaleContext locale) |
void |
setDefaultValue(java.lang.Object val) |
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 |
setPrecisionScale(int prec, int scale)Sets the attribute's precision and scale. |
void |
setUpdateableFlag(byte updateable) |
void |
setVariableKind(java.lang.String kind) |
void |
setVariableManager(VariableManager manager) |
| Methods inherited from class oracle.jbo.common.NamedObjectImpl |
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, refreshProperty, setFullName, setParent, setPropertiesMap, setProperty |
| 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, refreshProperty |
| Methods inherited from interface oracle.jbo.rules.ValidationManager |
getName |
| Field Detail |
protected boolean mMandatory
protected boolean mNotNull
protected int mPrecision
protected int mScale
protected byte mUpdateable
protected java.lang.Object mDefaultValue
protected transient java.lang.Class mJavaType
protected transient java.lang.String mJavaTypeName
| 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 Variablepublic void setName(java.lang.String name)
NamedObjectImplsetName in interface VariablesetName in class NamedObjectImplname - the name to be given to this object.public VariableManager getVariableManager()
getVariableManager in interface Variablepublic void setVariableManager(VariableManager manager)
setVariableManager in interface Variablepublic java.lang.String getVariableKind()
getVariableKind in interface Variablepublic void setVariableKind(java.lang.String kind)
setVariableKind in interface Variablepublic java.lang.Object getExtendedData()
getExtendedData in interface Variablepublic void setExtendedData(java.lang.Object data)
setExtendedData in interface Variablepublic byte getUpdateableFlag()
getUpdateableFlag in interface AttributeDefpublic void setUpdateableFlag(byte updateable)
setUpdateableFlag in interface Variablepublic boolean isMandatory()
isMandatory in interface AttributeDefpublic void setMandatory(boolean b)
setMandatory in interface Variablepublic int getPrecision()
For strings, precision is maximum allowed length. For numeric values, precision is the number of significant digits.
getPrecision in interface AttributeDefpublic 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 Variableprec - 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 AttributeDefpublic void setJavaType(java.lang.Class cls)
setJavaType in interface Variablepublic 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.
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 Variablepublic void setDefaultValue(java.lang.Object val)
setDefaultValue in interface Variablepublic 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 Variabledata - a storage value to be converted.public void addValidator(JboValidatorInterface listener)
JboValidatorInterface to the listener list.addValidator in interface ValidationManagerlistener - The Validator to be addedpublic java.util.ArrayList getValidators()
getValidators in interface ValidationManagerpublic 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)
public boolean isPassivationNeeded()
isPassivationNeeded in interface Variablepublic boolean isDefinedDefaultValue()
isDefinedDefaultValue in interface Variablepublic AttributeHints getUIHelper()
getUIHelper in interface AttributeDefAttributeHints
public java.lang.String getLocaleName(LocaleContext locale,
java.lang.String sName)
AttributeHintsgetLocaleName in interface AttributeHints
protected java.lang.String resolveResourceProperty(java.lang.String property,
LocaleContext locale)
public final java.lang.String getLabel(LocaleContext locale)
getLabel in interface AttributeHintspublic final java.lang.String getTooltip(LocaleContext locale)
getTooltip in interface AttributeHintspublic final java.lang.String getDisplayHint(LocaleContext locale)
getDisplayHint in interface AttributeHintspublic final int getControlType(LocaleContext locale)
getControlType in interface AttributeHintspublic final int getDisplayWidth(LocaleContext locale)
getDisplayWidth in interface AttributeHintspublic final int getDisplayHeight(LocaleContext locale)
getDisplayHeight 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 AttributeHintspublic final java.lang.String getFormat(LocaleContext locale)
AttributeHintsgetFormat in interface AttributeHintspublic final Formatter getFormatter(LocaleContext locale)
AttributeHintsgetFormatter in interface AttributeHintspublic final boolean hasFormatInformation(LocaleContext locale)
AttributeHintshasFormatInformation in interface AttributeHints
public final java.lang.String getFormattedAttribute(AttributeList attrList,
LocaleContext locale)
AttributeHintsgetFormattedAttribute in interface AttributeHints
public final java.lang.Object parseFormattedAttribute(java.lang.String sValue,
LocaleContext locale)
AttributeHintsparseFormattedAttribute in interface AttributeHintspublic final boolean displayInShortForm(LocaleContext locale)
AttributeHintsdisplayInShortForm in interface AttributeHintspublic final java.lang.String getFormatterClassName(LocaleContext locale)
getFormatterClassName in interface AttributeHintspublic byte getAttributeKind()
AttributeDefgetAttributeKind in interface Variablepublic java.lang.String getColumnName()
getColumnName in interface Variablepublic java.lang.String getColumnNameForQuery()
getColumnNameForQuery in interface Variablepublic int getSQLType()
getSQLType in interface Variablepublic boolean isPrimaryKey()
isPrimaryKey in interface Variablepublic int getElemSQLType()
getElemSQLType in interface Variablepublic int getIndex()
getIndex in interface AttributeDefpublic java.lang.Class getElemType()
getElemType in interface AttributeDefpublic boolean isSelected()
AttributeDefisSelected in interface AttributeDeftrue if this attribute is transient.public boolean isQueriable()
isQueriable in interface AttributeDeftrue if this attribute is queriable.
|
Oracle Application Development Framework Model and Business Components Java API Reference
10g Release 3 (10.1.3) B16005-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||