Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

oracle.adf.model.adapter.dataformat
Class AttributeDef

java.lang.Object
  extended by oracle.binding.metaimpl.BaseValueObjectDefinition
      extended by oracle.binding.metaimpl.BaseAttributeDefinition
          extended by oracle.adf.model.adapter.dataformat.AttributeDef
All Implemented Interfaces:
AttributeDefinition, Definition, NamedDefinition, VariableDefinition
Direct Known Subclasses:
AccessorDef

public class AttributeDef
extends BaseAttributeDefinition

Implements an attrtibute.

Since:
10.1.3

Field Summary
static java.lang.String LEAFELEMENT_HINT
           
static java.lang.String LEAFELEMENT_NO_ATTRIBUTE
           
static java.lang.String LEAFELEMENT_WITH_ATTRIBUTE
           
 
Fields inherited from interface oracle.binding.meta.Definition
TYPE_ACCESSOR, TYPE_ATTRIBUTE, TYPE_CRITERIA, TYPE_CRITERIA_ITEM, TYPE_CRITERIA_OPERATOR, TYPE_CRITERIA_ROW, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_NAMED, TYPE_OPERATION, TYPE_OPERATIONRETURN, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE
 
Constructor Summary
AttributeDef(java.lang.String name, StructureDefinition parent, java.lang.String javaType)
          Creates an attribute definition.
AttributeDef(java.lang.String name, StructureDefinition parent, java.lang.String javaType, boolean isReadOnly, boolean isKey)
          Creates an attribute definition.
 
Method Summary
 void addProperties(java.util.Map props)
          Adds custom properties to this object.
 void addProperty(java.lang.String propName, java.lang.Object value)
          Adds a custom property to this object.
 java.lang.String getBindPath()
          Gets the bind path of the definition if set.
 Definition getDefinitionParent()
          Returns the parent of this attribute.
 int getDefinitionType()
          Retrieves the type of the variable.
 java.lang.String getFullName()
          Returns the full name of the definition.
 java.lang.String getName()
          Gets the displyable name.
 java.util.Hashtable getProperties()
          Returns a Hashtable containing all the custom properties set against this object.
 java.lang.Object getProperty(java.lang.String propName)
          Returns a custom property value given its name.
 void setBindPath(java.lang.String path)
          Sets the bind path.
 void setName(java.lang.String name)
          Sets a displyable name.
 
Methods inherited from class oracle.binding.metaimpl.BaseAttributeDefinition
getSourceTypeString, isKey, isReadOnly, setReadOnly, setSourceTypeString
 
Methods inherited from class oracle.binding.metaimpl.BaseValueObjectDefinition
getDataControlDefinition, getJavaTypeString, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.binding.meta.VariableDefinition
getDataControlDefinition, getJavaTypeString
 

Field Detail

LEAFELEMENT_HINT

public static final java.lang.String LEAFELEMENT_HINT
See Also:
Constant Field Values

LEAFELEMENT_NO_ATTRIBUTE

public static final java.lang.String LEAFELEMENT_NO_ATTRIBUTE
See Also:
Constant Field Values

LEAFELEMENT_WITH_ATTRIBUTE

public static final java.lang.String LEAFELEMENT_WITH_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

AttributeDef

public AttributeDef(java.lang.String name,
                    StructureDefinition parent,
                    java.lang.String javaType,
                    boolean isReadOnly,
                    boolean isKey)
Creates an attribute definition.

Parameters:
name - name of this attribute.
parent - parent of this attribute.
javaType - equivalent Java type of this attribute (e.g. java.lang.String).
isReadOnly - flag to determine if the value of this attribute is read-only.
isKey - flag to indicate if the attribute is a key.

AttributeDef

public AttributeDef(java.lang.String name,
                    StructureDefinition parent,
                    java.lang.String javaType)
Creates an attribute definition.

Parameters:
name - name of this attribute.
parent - parent of this attribute.
javaType - equivalent Java type of this attribute (e.g. java.lang.String).
Method Detail

setName

public void setName(java.lang.String name)
Sets a displyable name.


getName

public java.lang.String getName()
Gets the displyable name.

Specified by:
getName in interface NamedDefinition
Overrides:
getName in class BaseValueObjectDefinition
Returns:
Name of this Definition.

addProperty

public void addProperty(java.lang.String propName,
                        java.lang.Object value)
Adds a custom property to this object.

Parameters:
propName - Name of the custom property
value - Value of the custom property

getProperty

public java.lang.Object getProperty(java.lang.String propName)
Returns a custom property value given its name.

Specified by:
getProperty in interface NamedDefinition
Overrides:
getProperty in class BaseValueObjectDefinition
Parameters:
propName - Name of the custom property whose value is to be retrieved.
Returns:
custom property set against this column-like artefact.

addProperties

public void addProperties(java.util.Map props)
Adds custom properties to this object.

Parameters:
props - properties have to be added.

getProperties

public java.util.Hashtable getProperties()
Returns a Hashtable containing all the custom properties set against this object.

Specified by:
getProperties in interface NamedDefinition
Overrides:
getProperties in class BaseValueObjectDefinition
Returns:
a Hashtable consisting of all the custom properties.

setBindPath

public void setBindPath(java.lang.String path)
Sets the bind path.


getBindPath

public java.lang.String getBindPath()
Gets the bind path of the definition if set.


getFullName

public java.lang.String getFullName()
Returns the full name of the definition.

Specified by:
getFullName in interface NamedDefinition
Overrides:
getFullName in class BaseValueObjectDefinition
Returns:
If the bind path is defined it returns the bind path. If bind path is not defined and the parent is defined then it returns .. Otherwise it returns the name of the definition.

getDefinitionType

public int getDefinitionType()
Description copied from class: BaseValueObjectDefinition
Retrieves the type of the variable. It can be one of the TYPE_* contants definied in VariableDefinition.

Specified by:
getDefinitionType in interface Definition
Overrides:
getDefinitionType in class BaseAttributeDefinition
Returns:
Always return TYPE_PRIMITIVE.

getDefinitionParent

public Definition getDefinitionParent()
Returns the parent of this attribute. Definition parent is the parent in the definition hierarchy. This attribute can be a child of an accessor or a data control definition and that definition becomes the definition parent of this attribute.

Specified by:
getDefinitionParent in interface NamedDefinition
Overrides:
getDefinitionParent in class BaseValueObjectDefinition
Returns:
a data control definition or an accessor definition that contains this attribute in the hierarchy of definition. If there is no parent defined, i.e. this attribute is created under a structure definition that is not attached to any accessor or data control definition yet, it returns the structure definition that contains it.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

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