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
Interface AttributeDef

All Known Implementing Classes:
  DomainAttributeDef, AttributeDefHelper, AttributeDefImpl

public interface AttributeDef
extends Properties

Defines access to named attribute definitions.

Since:
  JDeveloper 3.0
See Also:
  `Row`, `RowSet`, `StructureInfo`

Field Summary
`static byte` | `ATTR_ASSOCIATED_ROW` An attribute that returns a single row.
`static byte` | `ATTR_ASSOCIATED_ROWITERATOR` An ASSOCIATION attribute that returns a row-iterator.
`static byte` | `ATTR_DYNAMIC` An attribute which is added only through calls to `ViewObject`.
`static byte` | `ATTR_ENTITY_DERIVED` An attribute derived from an Entity Object.
`static byte` | `ATTR_PERSISTENT` A persistent attribute that is mapped to a column in a database table.
`static byte` | `ATTR_SQL_DERIVED` A attribute whose value is retrieved via a SQL statement.
`static byte` | `ATTR_TRANSIENT` A attribute which is not mapped to any other attribute or column.
`static byte` | `READONLY` The attribute cannot be modified.
`static byte` | `UPDATEABLE` The attribute can be freely modified.
`static byte` | `UPDATEABLE_WHILE_NEW` The attribute can be modified until it is committed, but cannot be subsequently modified.

Method Summary
`byte` | `getAttributeKind()` Gets the attribute value.
`java.lang.String` | `getColumnName()` Gets the name of the database column the attribute represents.
`java.lang.String` | `getColumnNameForQuery()` Gets the column name to be used in query statement.
`int` | `getIndex()` Gets the index of the attribute in the context of a `StoreInfo` instance.
`java.lang.Class` | `getJavaType()` Gets the Java class of the object stored for this attribute definition.
`java.lang.String` | `getName()` Gets the name of the attribute.
`int` | `getPrecision()` Gets the precision of a numeric or string attribute.
`int` | `getScale()` Get the scale value of a numeric attribute.
`int` | `getSQLType()` Gets the JDBC type of the attribute.
`byte` | `getUpdateableFlag()` Tests if an attribute can be modified.
`boolean` | `isMandatory()` Tests if an attribute does not allow null values.
`boolean` | `isPrimaryKey()` Tests if an attribute is a Primary Key.
`boolean` | `isQueriable()` Tests if an attribute is queriable.

Methods inherited from interface oracle.jbo.Properties
`getProperties, getProperty, refreshProperty`

Field Detail

### ATTR_PERSISTENT

    public static final byte ATTR_PERSISTENT

  A persistent attribute that is mapped to a column in a database table.

### ATTR_SQL_DERIVED

    public static final byte ATTR_SQL_DERIVED

  A attribute whose value is retrieved via a SQL statement.

### ATTR_ASSOCIATED_ROW

    public static final byte ATTR_ASSOCIATED_ROW

  An attribute that returns a single row.

### ATTR_TRANSIENT

    public static final byte ATTR_TRANSIENT

  A attribute which is not mapped to any other attribute or column.

### ATTR_DYNAMIC

    public static final byte ATTR_DYNAMIC

  An attribute which is added only through calls to `ViewObject`.

### ATTR_ENTITY_DERIVED

    public static final byte ATTR_ENTITY_DERIVED

  An attribute derived from an Entity Object.

  These attributes are View Object attributes derived from transient Entity Object attributes.

### ATTR_ASSOCIATED_ROWITERATOR

    public static final byte ATTR_ASSOCIATED_ROWITERATOR

  An ASSOCIATION attribute that returns a row-iterator.

### READONLY

    public static final byte READONLY

  The attribute cannot be modified.

### UPDATEABLE_WHILE_NEW

    public static final byte UPDATEABLE_WHILE_NEW

  The attribute can be modified until it is committed, but cannot be subsequently modified.

### UPDATEABLE

    public static final byte UPDATEABLE

  The attribute can be freely modified.

Method Detail

### getAttributeKind

    public byte getAttributeKind()

  Gets the attribute value.
  Returns:
    one of the `ATTR` constants defined for this class.

### getName

    public java.lang.String getName()

  Gets the name of the attribute.
  Returns:
    the name of the attribute.

### getColumnName

    public java.lang.String getColumnName()

  Gets the name of the database column the attribute represents.
  Returns:
    the name of the column.

### 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.
  Returns:
    the column name to be used in query.

### getIndex

    public int getIndex()

  Gets the index of the attribute in the context of a `StoreInfo` instance.
  Returns:
    the index of the attribute row's definition object.

### getJavaType

    public java.lang.Class getJavaType()

  Gets the Java class of the object stored for this attribute definition.
  Returns:
    the class of the attribute.

### getSQLType

    public int getSQLType()

  Gets the JDBC type of the attribute.
  Returns:
    the JDBC type.
  See Also:
    `Types`

### getScale

    public int getScale()

  Get the scale value of a numeric attribute.
  Returns:
    the scale value for this attribute, if applicable.

### getPrecision

    public int getPrecision()

  Gets the precision of a numeric or string attribute.

  'Precision' for a string is the maximum length.

  Returns:
    the precision value for this attribute.

### isQueriable

    public boolean isQueriable()

  Tests if an attribute is queriable.

  Queriable attributes are those that may 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 SQL statements to fetch data.

  Returns:
    `true` if this attribute is queriable.

### getUpdateableFlag

    public byte getUpdateableFlag()

  Tests if an attribute can be modified.
  Returns:
    `READONLY`, `UPDATEABLE`, or `UPDATEABLE_WHILE_NEW`.

### isPrimaryKey

    public boolean isPrimaryKey()

  Tests if an attribute is a Primary Key.
  Returns:
    `true` if this is either a Primary Key attribute or part of the attributes that constitute the Primary Key for a given row.

### isMandatory

    public boolean isMandatory()

  Tests if an attribute does not allow null values.
  Returns:
    `true` if this attribute cannot store a null value

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