Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server
Class AttributeDefImpl

    java.lang.Object
      |
      +--oracle.jbo.common.BaseObject
            |
            +--oracle.jbo.server.NamedObjectImpl
                  |
                  +--oracle.jbo.server.DefObject
                        |
                        +--oracle.jbo.server.AttributeDefImpl

public class AttributeDefImpl
extends oracle.jbo.server.DefObject
implements AttributeDef, EJBPersistable

`AttributeDefImpl` is an implementation class for the `AttributeDef` interface in the middle tier server. The main function of this class is to describe an attribute in an Entity Object or View Object.

For each Entity attribute (as well as for each View Object attribute), there is a `get` method to get its value and the `set` method to set its value. Entity Objects can have the following kinds of attributes:

- Persistent. A entity object attribute that is persisted in the database. The value of a persistent attribute can be derived from a database query.
- Transient. A entity object attribute that is not persisted in the database. The value of a transient attribute cannot be derived from a database query.

If you use the Entity Object wizard in the Business Components for Java Design Time tool to create an Entity Object based on an existing table, a persistent Entity attribute is created for each table column. After, if you change the table, you need to manually change the attribute.

Note that for a View Object attribute, there is a separate class, `ViewAttributeDefImpl`, that extends `AttributeDefImpl`.

The `AttributeDefImpl` class has static methods to create `AttributeDefImpl` instances from the Entity XML file. These instances can also be created programmatically. For example, the method `addDynamicAttribute` creates a dynamic attribute (`AttributeDefImpl`) on the View Object.

Advanced users can provide their own implementation of `EntityDefImpl` (by subclassing EntityDefImpl). Within it, they can create their own `AttributeDefImpl`s by using:

     new AttributeDefImpl(...);

Since:
  JDeveloper 3.0

Field Summary
`static byte` | `ATTR_LOAD_BULK` Indicates that while retrieving data for this attribute from the query result, data for other attributes were bulk-retrieved as well.
`static byte` | `ATTR_LOAD_EACH` Indicates that the data for this attribute was retrieved from the query result.
`static byte` | `ATTR_LOAD_SKIP` Indicates that this attribute should be skipped; that is, its data was bulk-retrieved by another attribute from the query result.
`protected byte` | `mAttrLoad` Value for the attribute's load value.
`protected java.lang.String` | `mColumnName` The database column name for the attribute.
`protected oracle.jbo.server.RowDef` | `mDef` Back Pointer to Def Object where the Attribute belongs.
`protected java.lang.Object` | `mDefaultValue` The default value of the attribute.
`protected java.lang.String` | `mDomainName` Domain name for this attribute if it's type is a generated domain
`protected java.lang.Object` | `mElemFactory`
`protected java.lang.Class` | `mElemType` Identifies the Java Type Object for this element.
`protected int` | `mIndex` Index in the Table.
`protected java.lang.Class` | `mJavaType` The Java Type Object for this attribute.
`protected byte` | `mKind` Value for the Attribute's "kind"; for example, Transient, Dynamic, etc.
`protected boolean` | `mMandatory` Value determines whether the attribute allows null values.
`protected boolean` | `mNotNull` Value determines whether the attribute is null.
`protected boolean` | `mObjectTableOID` Value determines whether the attribute is OID present.
`protected boolean` | `mObjectTableRef` Value determines whether the attribute has an Object table ref.
`protected java.lang.String` | `mObjectType` Object Type of the attribute.
`protected java.lang.String[]` | `mOIDAttrNames` Internal: Applications should not use this field.
`protected int` | `mPrecision` Precision Value for the attribute, defaulted to zero.
`protected boolean` | `mPrimaryKey` Value determines whether the attribute is primary Key.
`protected boolean` | `mQueriable` Value determines whether the attribute is queryable.
`protected java.lang.reflect.Method` | `mReadMethod` To keep the read method with this attribute.
`protected boolean` | `mResolveAccessors` Value determines whether getters and setters are loaded.
`protected boolean` | `mRetrievedOnInsert` Value determines whether the attribute is retrieved on Insert.
`protected boolean` | `mRetrievedOnUpdate` Value determines whether the attribute is retrieved on update.
`protected int` | `mScale` Scale value for attribute, set by default to 0.
`protected SQLBuilder` | `mSQLBuilder` Identifies the handle to SQL Builder.
`protected int` | `mType` Integer representation of the SQL type of the attribute.
`protected java.lang.Object` | `mTypeFactory` Identifies the `CustomDatumFactory` for this attribute.
`protected boolean` | `mTypeFactoryInitialized` Value determines whether this attribute has a type factory.
`protected byte` | `mUpdateable` Value determines whether the attribute is updatable.
`protected java.lang.reflect.Method` | `mWriteMethod` To keep the write method with this attribute.

Fields inherited from class oracle.jbo.server.DefObject
`mCompUsageList, mCompUsages`

Fields inherited from class oracle.jbo.server.NamedObjectImpl
`mFullName, mName, mParent, mProperties`

Fields inherited from class oracle.jbo.common.BaseObject
`TRACE_EVERY_ALLOC, TRACE_NONE, TRACE_OCCASIONAL, TRACE_UNINITIALIZED`

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, READONLY, UPDATEABLE, UPDATEABLE_WHILE_NEW`

Constructor Summary
`protected` | `AttributeDefImpl()` Default constructor for this class.

Method Summary
`void` | `beanToStore(java.lang.Object bean, Row store)` Internal: Applications should not use this method.
`java.lang.Object` | `convertToJava(java.lang.Object data)` Converts a value from the database type to its corresponding Java type and returns the result.
`java.lang.Object` | `convertToStorage(java.lang.Object data, DBTransactionImpl trans)` Internal: Application should not use this method.
`byte` | `getAttributeKind()` Returns the "kind" enumerations of this attribute.
`byte` | `getAttrLoad()` Describes the manner in which the data for this attribute is loaded from database.
`java.lang.String` | `getColumnName()` Returns the column name to which this attribute is mapped.
`java.lang.String` | `getColumnNameForQuery()` Returns the column name to be used in query statement.
`oracle.jbo.server.RowDef` | `getDef()` Returns the `DefObject` object which describes this attribute.
`java.lang.Object` | `getDefaultValue()` Returns the default value of the attribute.
`java.lang.Object` | `getElemFactory()` Internal: Applications should not use this method.
`java.lang.Class` | `getElemType()` Returns the element type of the attribute.
`EntityDefImpl` | `getEntityDef()` Returns the `EntityDefImpl` object which contains this attribute.
`int` | `getIndex()` Returns the column position of this attribute in the data source.
`java.lang.Class` | `getJavaType()` Returns the Java type of the attribute.
`java.lang.String` | `getName()` Returns the name of this attribute.
`java.lang.String` | `getObjectType()` If the attribute is an object, returns the name of the attribute's object type
`java.lang.String[]` | `getOIDAttrNames()` Internal: Applications should not use this method.
`int` | `getPrecision()` Gets the attribute's precision.
`java.util.Hashtable` | `getProperties()` Creates a table of this attribute's properties.
`java.lang.Object` | `getProperty(java.lang.String hintName)` Retrieves the specified property, if available.
`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.
`protected SQLBuilder` | `getSQLBuilder()` Returns the SQLBuilderImpl - lazily building.
`int` | `getSQLType()` Returns the SQL type of this attribute.
`static java.lang.String` | `getSQLTypeIdToString(int typeId)` Converts an identifier to the name of an SQL type.
`static int` | `getSQLTypeStringToId(java.lang.String sqlType)` Converts a SQL type name to its identifier.
`java.lang.Object` | `getTypeFactory()` Internal: Applications should not use this method.
`byte` | `getUpdateableFlag()` Returns whether the attribute is updateable.
`boolean` | `isMandatory()` Returns whether the attribute is not `null`.
`boolean` | `isObjectTableOID()` Internal: Applications should not use this method.
`boolean` | `isObjectTableRef()` Internal: Applications should not use this method.
`boolean` | `isPrimaryKey()` Returns whether this attribute is a Primary Key for this Entity type.
`boolean` | `isQueriable()` Returns whether this attribute can participate in the WHERE clause of a SQL statement.
`boolean` | `isRetrievedOnInsert()` Returns whether the attribute value is retrieved from the database after a row is inserted in the post cycle.
`boolean` | `isRetrievedOnUpdate()` Returns whether the attribute is retrieved from the database after a row is updated.
`java.lang.Object` | `loadFromResultSet(java.sql.ResultSet rs, int index, DBTransactionImpl trans)` Internal: Applications should not use this method.
`java.lang.Object` | `loadFromStatement(java.sql.PreparedStatement cs, int index, Transaction trans)` Internal: Applications should not use this method.
`protected java.lang.String` | `printXMLDefinition(Row row, java.util.Hashtable allDefs, java.io.PrintWriter pw, int depthCount)`
`void` | `storeToBean(java.lang.Object bean, Row store)` Internal: Applications should not use this method.

Methods inherited from class oracle.jbo.server.DefObject
`getPackageDef, getPackageName, isObjectResolved`

Methods inherited from class oracle.jbo.server.NamedObjectImpl
`getFullName, getParent, getPropertiesAsStrings, refreshProperty, setFullName, setProperty`

Methods inherited from class oracle.jbo.common.BaseObject
`dumpState, setTraceLevel, setTraceWriter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ATTR_LOAD_EACH

    public static final byte ATTR_LOAD_EACH

  Indicates that the data for this attribute was retrieved from the query result.

### ATTR_LOAD_BULK

    public static final byte ATTR_LOAD_BULK

  Indicates that while retrieving data for this attribute from the query result, data for other attributes were bulk-retrieved as well.

### ATTR_LOAD_SKIP

    public static final byte ATTR_LOAD_SKIP

  Indicates that this attribute should be skipped; that is, its data was bulk-retrieved by another attribute from the query result.

### mColumnName

    protected java.lang.String mColumnName

  The database column name for the attribute.

### mQueriable

    protected boolean mQueriable

  Value determines whether the attribute is queryable.

### mPrimaryKey

    protected boolean mPrimaryKey

  Value determines whether the attribute is primary Key.

### mMandatory

    protected boolean mMandatory

  Value determines whether the attribute allows null values.

### mRetrievedOnInsert

    protected boolean mRetrievedOnInsert

  Value determines whether the attribute is retrieved on Insert.

### mRetrievedOnUpdate

    protected boolean mRetrievedOnUpdate

  Value determines whether the attribute is retrieved on update.

### mDef

    protected oracle.jbo.server.RowDef mDef

  Back Pointer to Def Object where the Attribute belongs.

### mObjectTableRef

    protected boolean mObjectTableRef

  Value determines whether the attribute has an Object table ref.

### mObjectTableOID

    protected boolean mObjectTableOID

  Value determines whether the attribute is OID present.

### mOIDAttrNames

    protected java.lang.String[] mOIDAttrNames

  Internal: Applications should not use this field.

### mObjectType

    protected java.lang.String mObjectType

  Object Type of the attribute.

### mNotNull

    protected boolean mNotNull

  Value determines whether the attribute is null.

### mPrecision

    protected int mPrecision

  Precision Value for the attribute, defaulted to zero.

### mScale

    protected int mScale

  Scale value for attribute, set by default to 0. This is the number of decimal points before/after the decimal based on whether on whether the scale if positive or negative.

### mUpdateable

    protected byte mUpdateable

  Value determines whether the attribute is updatable.

### mKind

    protected byte mKind

  Value for the Attribute's "kind"; for example, Transient, Dynamic, etc.

### mAttrLoad

    protected byte mAttrLoad

  Value for the attribute's load value.

### mType

    protected int mType

  Integer representation of the SQL type of the attribute.

### mIndex

    protected int mIndex

  Index in the Table.

### mDefaultValue

    protected java.lang.Object mDefaultValue

  The default value of the attribute.

### mDomainName

    protected java.lang.String mDomainName

  Domain name for this attribute if it's type is a generated domain

### mJavaType

    protected java.lang.Class mJavaType

  The Java Type Object for this attribute.

### mElemType

    protected java.lang.Class mElemType

  Identifies the Java Type Object for this element. Used with VARRAYs.

### mReadMethod

    protected java.lang.reflect.Method mReadMethod

  To keep the read method with this attribute.

### mWriteMethod

    protected java.lang.reflect.Method mWriteMethod

  To keep the write method with this attribute.

### mTypeFactory

    protected java.lang.Object mTypeFactory

  Identifies the `CustomDatumFactory` for this attribute.

### mElemFactory

    protected java.lang.Object mElemFactory

### mTypeFactoryInitialized

    protected boolean mTypeFactoryInitialized

  Value determines whether this attribute has a type factory.

### mSQLBuilder

    protected SQLBuilder mSQLBuilder

  Identifies the handle to SQL Builder.

### mResolveAccessors

    protected boolean mResolveAccessors

  Value determines whether getters and setters are loaded.

Constructor Detail

### AttributeDefImpl

    protected AttributeDefImpl()

  Default constructor for this class.

Method Detail

### getName

    public java.lang.String getName()

  Returns the name of this attribute. Used by the generated accessor for this attribute.
  Specified by:
    getName in interface AttributeDef
  Overrides:
    getName in class NamedObjectImpl
  Returns:
    the name of the attribute.

### isQueriable

    public boolean isQueriable()

  Returns whether this attribute can participate in the WHERE clause of a SQL statement.

  Queriable attributes are those attributes that can have a filter condition for the WHERE clause. If this method returns `false`, the attribute will not be used in constructing the WHERE clause of the SQL statement.

  Specified by:
    isQueriable in interface AttributeDef
  Returns:
    `true` if queriable; `false` if the attribute will not be used in the WHERE clause.

### 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.

### isPrimaryKey

    public boolean isPrimaryKey()

  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
  Returns:
    `true` if this is a Primary Key; `false` otherwise.

### isRetrievedOnInsert

    public boolean isRetrievedOnInsert()

  Returns whether the attribute value is retrieved from the database after a row is inserted in the post cycle.

  Some derived attributes need to be re-fetched after a save operation has been performed. These typically include timestamps, computed fields, virtual columns and Oracle ROWIDs and OIDs.

  Returns:
    `true` if this attribute is retrieved after insert operations; `false` otherwise.

### isRetrievedOnUpdate

    public boolean isRetrievedOnUpdate()

  Returns whether the attribute is retrieved from the database after a row is updated.

  Some derived attributes need to be re-fetched after a save operation has been performed. These typically include timestamps, computed fields, virtual columns and Oracle ROWIDs and OIDs.

  Returns:
    `true` if this attribute is retrieved after update operations; `false` otherwise.

### 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.

### isObjectTableRef

    public boolean isObjectTableRef()

  Internal: Applications should not use this method.

### isObjectTableOID

    public boolean isObjectTableOID()

  Internal: Applications should not use this method.

### getOIDAttrNames

    public java.lang.String[] getOIDAttrNames()

  Internal: Applications should not use this method.

### getObjectType

    public java.lang.String getObjectType()

  If the attribute is an object, returns the name of the attribute's object type

  For example, assume that you have created an `Employee` table that contains an `Address` object of type `address_t`. The SQL code would look like this:

       CREATE TYPE address_t AS OBJECT  -- user defined Oracle Object datatype
              (
              Street VARCHAR2(30),
              City VARCHAR2(25),
              State CHAR(2),
              Zip  Number
              );

       CREATE TABLE Employee
              (
              EmpId Number,
              Name VARCHAR2(30),
              Address address_t,  -- note the Oracle Object datatype
              );

  In an `Employee` Entity Object, this would be interpreted as an `Address` attribute of type `Address_t`. If this method were applied to the `Address` attribute, it would return `Address_t`.

  Returns:
    the name of the type.

### 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, or `0` if unspecified.

### getEntityDef

    public EntityDefImpl getEntityDef()

  Returns the `EntityDefImpl` object which contains this attribute.
  Returns:
    this Entity Object definition to which this attribute belongs.

### getDef

    public oracle.jbo.server.RowDef getDef()

  Returns the `DefObject` object which describes this attribute.
  Returns:
    the definition for this attribute.

### getIndex

    public int getIndex()

  Returns the column position of this attribute in the data source. Index position is 0-based.
  Specified by:
    getIndex in interface AttributeDef
  Returns:
    the column index.

### getSQLType

    public int getSQLType()

  Returns the SQL type of this attribute.
  Specified by:
    getSQLType in interface AttributeDef
  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`.

### getAttributeKind

    public byte getAttributeKind()

  Returns the "kind" enumerations of this attribute. The "kind" of enumeration can be either persistent, derived, row-associated, transient, or dynamic.

  The following code snippet uses this method to return the attribute kind for each element in an array of AttributeDefs. Some processing is then done based on the results.

       for(int i=0; i < attributeDefs.length; i++)
       {
          byte attrKind=attributeDefs[i].getAttributeKind();
          if(attrKind==AttributeDef.ATTR_ASSOCIATED_ROW  ||
            attrKind==AttributeDef.ATTR_ASSOCIATED_ROWITERATOR)
            {
              do some processing
            }
        }

  Specified by:
    getAttributeKind in interface AttributeDef
  Returns:
    one of `ATTR_PERSISTENT`, `ATTR_SQL_DERIVED`, `ATTR_ASSOCIATED_ROW`, `ATTR_TRANSIENT` or `ATTR_DYNAMIC`.

### getAttrLoad

    public byte getAttrLoad()

  Describes the manner in which the data for this attribute is loaded from database.

  In the typical case, after the View Object query is executed, the framework retrieves data from the query result and populates the Entity row with the attribute values.

  The framework uses two different ways to retrieve data from the query result. The first is the normal SQL SELECT way--the column corresponding to the attribute is accessible in the query result. For example, if the View Object query says `SELECT e.Empno, e.Ename, e.Job, FROM Emp` then attributes corresponding to columns `Empno`, `Ename`, and `Job` are accessible from the query result. That is, one can do `result.getObject("Empno")` to JDBC to retrieve the data. This situation is described as by the `getAttrLoad()` return value `ATTR_LOAD_EACH`.

  If the query is over an Oracle Object table, on the other hand, the framework doesn't have access to individual columns from the query result. For example, assume an object table OBJEMP is based on an object type `T`, and this type has attributes `Name`, `Address`, and `Job`.

  The query statement that the framework builds for such a table is `select value(o) from TAB o`. This retrieves each row from the table as an Oracle Object. From JDBC, the framework gets this as an object (`STRUCT`) and gets attributes out of the `STRUCT`.

  In this case, the Entity Object attributes will have the following attribute load values:

          Name    -- ATTR_LOAD_BULK
          Address -- ATTR_LOAD_SKIP
          Job     -- ATTR_LOAD_SKIP

  `ATTR_LOAD_BULK` on `Name` means that while the framework retrieves data for `Name`, data for the other attributes, `Address` and `Job` is bulk-retrieved as well. `ATTR_LOAD_SKIP` on `Address` and `Job` means that since the framework filled in `Address` and `Job` while it retrieved `Name`, they should be skipped since they were bulk-retrieved with `Name`.

  Returns:
    the load value. Can be one of `ATTR_LOAD_BULK`, `ATTR_LOAD_SKIP`, or `ATTR_LOAD_EACH`.

### 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.

### getElemType

    public java.lang.Class getElemType()

  Returns the element type of the attribute.

  For VARRAYs, this method returns the class name of the elements that are in the VARRAY.

  Element type is relevant only if the attribute is an array attribute.

  Returns:
    the attribute's element class, or `null` if the attribute is not an array attribute.

### 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.

  Returns:
    the default value for the attribute, or `null` if none.

### getColumnName

    public java.lang.String getColumnName()

  Returns the column name to which this attribute is mapped.
  Specified by:
    getColumnName in interface AttributeDef
  Returns:
    the database column name of this attribute.

### getColumnNameForQuery

    public java.lang.String getColumnNameForQuery()

  Returns the column name to be used in query statement.

  For Entity Object attributes, this is the same as the column name returned by `getColumnName` (that is, the name of the column to which the attribute is mapped).

  For View Object attributes, the value it returns depends on whether the query was created in expert mode:

  - if expert mode, it returns the column alias.
  - if non-expert mode, it returns eo-usage-name.column-name.
  Specified by:
    getColumnNameForQuery in interface AttributeDef
  Returns:
    the column name to be used in query.

### convertToJava

    public java.lang.Object convertToJava(java.lang.Object data)
                                   throws DataCreationException

  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.

  Parameters:
    `data` - a storage value to be converted.
  Returns:
    an object of the Java type defined for this attribute.
  Throws:
    DataCreationException - if the conversion cannot be performed.

### getTypeFactory

    public java.lang.Object getTypeFactory()

  Internal: Applications should not use this method.

  Returns the type factory for this attribute.

### getElemFactory

    public java.lang.Object getElemFactory()

  Internal: Applications should not use this method.

### loadFromResultSet

    public java.lang.Object loadFromResultSet(java.sql.ResultSet rs,
                                              int index,
                                              DBTransactionImpl trans)
                                       throws DataCreationException

  Internal: Applications should not use this method.

  Returns the value from the specified ResultSet at the specified index. This method can be used when customizing the way that attributes are populated in the row. For example, assume you have a database `Name` column that contains a first name and a last name. You can use this method to fetch an individual entry, then parse the entry into separate `Firstname` and a `Lastname` attribute.

  Parameters:
    `rs` - the result set containing the value.
    `index` - the index position for the value.
    `trans` - the transaction containing the ResultSet.
  Throws:
    DataCreationException - if the Domain object cannot be created.

### loadFromStatement

    public java.lang.Object loadFromStatement(java.sql.PreparedStatement cs,
                                              int index,
                                              Transaction trans)
                                       throws DataCreationException

  Internal: Applications should not use this method.

  Returns the value from the specified JDBC prepared statement at the specified index. This method can be used when customizing the way that attributes are populated in the row. For example, assume you have a database `Name` column that contains a first name and a last name. You can use this method to fetch an individual entry, then parse the entry into separate `Firstname` and a `Lastname` attribute.

  Parameters:
    `cs` - the prepared statement containing the value.
    `index` - the index position for the value.
    `trans` - the transaction containing the ResultSet.
  Throws:
    DataCreationException - if the Domain object cannot be created.

### convertToStorage

    public java.lang.Object convertToStorage(java.lang.Object data,
                                             DBTransactionImpl trans)

  Internal: Application should not use this method.

  Converts a value from the attribute's Java type to a database type.

  This method uses `AttributeDefImpl` metadata to convert a Java value to the corresponding database value. This method is typically called before the framework sets an attribute inside a JDBC statement parameter.

  Parameters:
    `data` - a Java value to be converted.
    `trans` - the database transaction.
  Returns:
    an object of the storage type.
  Throws:
    DataCreationException - if the conversion cannot be performed.

### getSQLTypeStringToId

    public static int getSQLTypeStringToId(java.lang.String sqlType)

  Converts a SQL type name to its identifier.
  Parameters:
    `sqlType` - the name of a SQL datatype.
  Returns:
    the SQL type's identifier.
  See Also:
    `JboTypeMap`

### getSQLTypeIdToString

    public static java.lang.String getSQLTypeIdToString(int typeId)

  Converts an identifier to the name of an SQL type.
  Parameters:
    `typeID` - an SQL type identifier.
  Returns:
    the name of an SQL type.
  See Also:
    `JboTypeMap`

### getProperty

    public java.lang.Object getProperty(java.lang.String hintName)

  Retrieves the specified property, if available.
  Overrides:
    getProperty in class NamedObjectImpl
  Parameters:
    `hintName` - the property's key.
  Returns:
    the property associated with `hintName`, or `null` if not found.

### getProperties

    public java.util.Hashtable getProperties()

  Creates a table of this attribute's properties.
  Overrides:
    getProperties in class NamedObjectImpl
  Returns:
    the table of properties.

### getSQLBuilder

    protected SQLBuilder getSQLBuilder()

  Returns the SQLBuilderImpl - lazily building.
  Returns:
    the SQLBuilderImpl

### storeToBean

    public void storeToBean(java.lang.Object bean,
                            Row store)

  Internal: Applications should not use this method.
  Specified by:
    storeToBean in interface EJBPersistable

### beanToStore

    public void beanToStore(java.lang.Object bean,
                            Row store)

  Internal: Applications should not use this method.
  Specified by:
    beanToStore in interface EJBPersistable

### printXMLDefinition

    protected java.lang.String printXMLDefinition(Row row,
                                                  java.util.Hashtable allDefs,
                                                  java.io.PrintWriter pw,
                                                  int depthCount)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD