Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.server
Class ViewAttributeDefImpl

java.lang.Object
  extended by oracle.jbo.server.NamedObjectImpl
      extended by oracle.jbo.mom.PersistableDefObject
          extended by oracle.jbo.server.DefObject
              extended by oracle.jbo.server.AttributeDefImpl
                  extended by oracle.jbo.server.ViewAttributeDefImpl
All Implemented Interfaces:
Formattable, AttributeDef, AttributeHints, ResourceBundleOwner, Properties, ValidationManager, VariableManagerOwner, VariableManagerOwnerBase

public class ViewAttributeDefImpl
extends AttributeDefImpl


Field Summary
static java.lang.Class CLASS_INSTANCE
           
protected  java.lang.String mAlias
           
protected  ArrayList mAssocEntityRefs
           
protected  boolean mAssocEntityRefsInited
           
protected  AttributeDefImpl mAttrDesc
           
protected  java.lang.String mBindVar
           
protected  java.lang.String mGetterName
           
protected  java.lang.String mSetterName
           
protected  ViewObjectImpl mVO
           
 
Fields inherited from class oracle.jbo.server.AttributeDefImpl
ATTR_LOAD_BULK, ATTR_LOAD_EACH, ATTR_LOAD_SKIP, EFFECTIVE_DATE_TYPE_END, EFFECTIVE_DATE_TYPE_NONE, EFFECTIVE_DATE_TYPE_START, HISTORY_CREATE_DATE, HISTORY_CREATE_USER, HISTORY_MODIFY_DATE, HISTORY_MODIFY_USER, HISTORY_MODIFY_VERSION, HISTORY_NOT_DEFINED, mAttrLoad, mBackwardDep, mColumnName, mDataSecurity, mDef, mDefaultValue, mDiscrColumn, mDomainName, mEffectiveDateType, mElemFactory, mElemType, mForwardDep, mHistoryKind, mIndex, mJavaType, mKind, mNotNull, mObjectTableOID, mObjectTableRef, mObjectType, mPrecision, mPrimaryKey, mQueriable, mResolveAccessors, mRetrievedOnInsert, mRetrievedOnUpdate, mScale, mSQLBuilder, mType, mTypeFactory, mTypeFactoryInitialized, mUnique, mUpdateable, tableName
 
Fields inherited from class oracle.jbo.server.DefObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY
 
Fields inherited from class oracle.jbo.server.NamedObjectImpl
mObjName, mParent, mProperties, mUserData, RES_ID_SUFFIX
 
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_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_CATEGORY, 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_EnumList, PNAME_LovButton, PNAME_TextField
 
Constructor Summary
ViewAttributeDefImpl()
           
 
Method Summary
 ViewLinkDefImpl findViewLinkDefImpl()
           
 java.lang.String formatForOutput(OutputFormatter formatter)
          This is used mainly for testing.
 java.lang.String getAliasName()
           
 AttributeDefImpl getAttributeDefImpl()
          Get the underlying EO attribute that this VO attribute references (if any)
 java.lang.String getColumnNameForQuery()
          Gets the column name to be used in query statement.
 AttributeDefImpl getEntityAttributeDef()
           
 EntityReference getEntityReference()
          Gets the entity reference which this attribute belongs to
 java.lang.Class getJavaType()
          Create a new ViewAttributeDefImpl from a chunk of XML
 ViewDefImpl getOtherViewDef()
          If this attribute is an accessor attribute (refers to an end in a ViewLink) then this method returns the ViewDef of other end of the ViewLink.
 DefObject getReferenceAttribute()
          Gets the reference Entity's AttributeDefImpl if this View Attribute is Entity based.
 int getSQLType()
          Returns the SQL type of this attribute.
 ViewDefImpl getViewDef()
           
 boolean isEntityBacked()
           
 boolean isPrimaryKey()
          Returns whether this attribute is a Primary Key for this Entity type.
protected  void readJavaType(org.kxml2.io.KXmlParser parser)
          Determine what the XML specifies as this Attribute's Java type
protected  java.lang.Object resolvePropertyRaw(java.lang.String property, Locale locale)
           
 void setAliasName(java.lang.String alias)
           
 
Methods inherited from class oracle.jbo.server.AttributeDefImpl
addBackwardDependency, addForwardDependency, addPropertyChangeListener, addValidator, convertToJava, convertToStorage, convertUpdateableFlagToString, convertUpdateableStringToFlag, displayInShortForm, evaluateTransientExpression, getAccessorVO, getAltKeyCount, getAttributeKind, getAttrLoad, getColumnName, getCompOpers, getCompOpers, getControlType, getDef, getDefaultValue, getDisplayHeight, getDisplayHint, getDisplayWidth, getDomainName, getElemFactory, getElemSQLType, getElemType, getEntityDef, getFormat, getFormattedAttribute, getFormatter, getFormatterClassName, getHint, getHintValue, getHistoryKind, getIndex, getLabel, getListBindingDef, getLocaleName, getLOVFinder, getLOVName, getObjectType, getPrecision, getRecalcExpression, getResourceBundleDef, getScale, getSQLBuilder, getSQLTypeStringToId, getTableName, getTooltip, getTransientExpression, getTypeFactory, getUIHelper, getUpdateableFlag, getValidator, getValidatorCount, getValidators, hasFormatInformation, hasTransientExpression, initFromXML, isCascadeUpdateParticipant, isDiscrColumn, isEffectiveEndDate, isEffectiveStartDate, isInWhereOrderGroup, isMandatory, isObjectTableOID, isObjectTableRef, isQueriable, isRetrievedOnInsert, isRetrievedOnUpdate, isSelected, isSessionScope, loadDependencies, loadFromResultSet, loadFromStatement, loadPermission, parseFormattedAttribute, readChangeIndicator, readColumnType, readDefaultValue, readIsPersistent, readIsUpdateable, readPrecision, readScale, readSqlType, removePropertyChangeListener, removeValidator, setAttributeKind, setAttrLoad, setColumnName, setDiscrColumn, setDomainName, setElemType, setLOVFinder, setLOVName, setMandatory, setPrecisionScale, setPrimaryKey, setQueriable, setRecalcExpression, setRetrievedOnInsert, setRetrievedOnUpdate, setSelected, setTableName, setTransientExpression, shouldEvaluateTransientExpression
 
Methods inherited from class oracle.jbo.server.DefObject
addExtendedDefObject, ensureVariableManager, getBaseDefObject, getDefScope, getExtendedDefObjects, getMessageBundleClass, getResourcePrefix, getVariableManager, getVarMgrParents, hasExtendedDefObjects, hasVariables, isBaseDefFor, isObjectResolved, loadProperties, loadProperties, loadResourceBundleDef, loadUserData, setBaseDefObject, setBaseDefObject, setDefForComponent, setDefScope, setObjectResolved, setResourceBundleDef, unsetDefForComponent
 
Methods inherited from class oracle.jbo.mom.PersistableDefObject
getDefManager, loadXMLContents
 
Methods inherited from class oracle.jbo.server.NamedObjectImpl
formatChildCollectionForOutput, formatChildCollectionForOutput, formatChildCollectionForOutput, formatForOutput, getAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getResourcesFromBundle, getUserData, parseAttrArrayElements, refreshProperty, requiresNamePrefixedResId, setFullName, setName, setParent, setPropertiesMap, setProperty
 
Methods inherited from class java.lang.Object
equals, 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.common.ResourceBundleOwner
getResourcePrefix
 
Methods inherited from interface oracle.jbo.rules.ValidationManager
getFullName, getName
 
Methods inherited from interface oracle.jbo.VariableManagerOwner
getName
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE

mAttrDesc

protected AttributeDefImpl mAttrDesc

mAlias

protected java.lang.String mAlias

mGetterName

protected java.lang.String mGetterName

mSetterName

protected java.lang.String mSetterName

mBindVar

protected java.lang.String mBindVar

mVO

protected ViewObjectImpl mVO

mAssocEntityRefs

protected ArrayList mAssocEntityRefs

mAssocEntityRefsInited

protected boolean mAssocEntityRefsInited
Constructor Detail

ViewAttributeDefImpl

public ViewAttributeDefImpl()
Method Detail

getViewDef

public ViewDefImpl getViewDef()

getAttributeDefImpl

public AttributeDefImpl getAttributeDefImpl()
Get the underlying EO attribute that this VO attribute references (if any)

Returns:
An Entity attribute, or null if this attribute is not mapped to an Entity attribute

isEntityBacked

public boolean isEntityBacked()

getJavaType

public java.lang.Class getJavaType()
Create a new ViewAttributeDefImpl from a chunk of XML

Specified by:
getJavaType in interface AttributeDef
Overrides:
getJavaType in class AttributeDefImpl
Parameters:
parser - An XML pull parser positioned at the start of a element
parent - The ViewDefImpl this ViewAttributeDefImpl belongs to
index - 0-based index of this attribute
Returns:
A new ViewAttributeDefImpl, or null if there was a problem parsing

getSQLType

public int getSQLType()
Description copied from class: AttributeDefImpl
Returns the SQL type of this attribute.

Specified by:
getSQLType in interface AttributeDef
Overrides:
getSQLType in class AttributeDefImpl
Returns:
the data type. For JDBC types, returns a value of java.sql.Types. For Oracle JDBC types, returns a value of oracle.jdbc.driver.OracleTypes.
See Also:
java.sql.Types

isPrimaryKey

public boolean isPrimaryKey()
Description copied from class: AttributeDefImpl
Returns whether this attribute is a Primary Key for this Entity type.

The following code snippet uses this method to find the name and value of the primary key attribute in an array of AttributeDefs (attrs[]).

 String curAttrName = null;
 for (int j = 0; j < attrs.length; j++)
 {
   if (attrs[j].isPrimaryKey())
   {
     //get the name of the primary key
     curAttrName = attrs[j].getName();
     //assumes only one key
     String currValue = row.getAttribute(curAttrName).toString();
   }
 }
 

Specified by:
isPrimaryKey in interface AttributeDef
Overrides:
isPrimaryKey in class AttributeDefImpl
Returns:
true if this is a Primary Key; false otherwise.

readJavaType

protected void readJavaType(org.kxml2.io.KXmlParser parser)
Description copied from class: AttributeDefImpl
Determine what the XML specifies as this Attribute's Java type

Overrides:
readJavaType in class AttributeDefImpl
Parameters:
parser - Parser positioned at the start of an Attribute element

getEntityReference

public EntityReference getEntityReference()
Gets the entity reference which this attribute belongs to

Returns:
The EntityReference

getAliasName

public java.lang.String getAliasName()

getEntityAttributeDef

public AttributeDefImpl getEntityAttributeDef()

setAliasName

public void setAliasName(java.lang.String alias)

findViewLinkDefImpl

public ViewLinkDefImpl findViewLinkDefImpl()

formatForOutput

public java.lang.String formatForOutput(OutputFormatter formatter)
This is used mainly for testing. Dumps out the important details in a list format.

Specified by:
formatForOutput in interface Formattable
Overrides:
formatForOutput in class AttributeDefImpl
Parameters:
formatter -
Returns:

getOtherViewDef

public ViewDefImpl getOtherViewDef()
If this attribute is an accessor attribute (refers to an end in a ViewLink) then this method returns the ViewDef of other end of the ViewLink. If this attribute is not an accessor attribute it returns null.


getColumnNameForQuery

public java.lang.String getColumnNameForQuery()
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
Overrides:
getColumnNameForQuery in class AttributeDefImpl
Returns:
the column name to be used in query.

getReferenceAttribute

public DefObject getReferenceAttribute()
Gets the reference Entity's AttributeDefImpl if this View Attribute is Entity based.

Returns:
The referenced by object (null if this attribute is not entity based.).

resolvePropertyRaw

protected java.lang.Object resolvePropertyRaw(java.lang.String property,
                                              Locale locale)
Overrides:
resolvePropertyRaw in class AttributeDefImpl

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.