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

## org.apache.openjpa.jdbc.meta.strats
Class IdentityJoinable

    java.lang.Object
      org.apache.openjpa.jdbc.meta.strats.IdentityJoinable

All Implemented Interfaces:
  Serializable, Joinable

     class IdentityJoinable

extends Object
implements Joinable

`Joinable` for the datastore identity column.

Author:
  Abe White

Constructor Summary
`IdentityJoinable(ClassMapping mapping)` Constructor; supply datastore identity mapping.

Method Summary
`Column[]` | `getColumns()` The columns managed by this joinable.
`int` | `getFieldIndex()` Return the field index of this joinable, or -1 if not a field.
`Object` | `getJoinValue(Object val, Column col, JDBCStore store)` Return the join value of the given column.
`Object` | `getJoinValue(OpenJPAStateManager sm, Column col, JDBCStore store)` Return the join value of the given column.
`Object` | `getPrimaryKeyValue(Result res, Column[] cols, ForeignKey fk, JDBCStore store, Joins joins)` Return the value for this joinable from the given result, using the given columns.
`void` | `setAutoAssignedValue(OpenJPAStateManager sm, JDBCStore store, Column col, Object autogen)` Use the given auto-assigned value to set this join value's field on the given instance.

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

Constructor Detail

### IdentityJoinable

    public IdentityJoinable(ClassMapping mapping)

  Constructor; supply datastore identity mapping.

Method Detail

### getFieldIndex

    public int getFieldIndex()

  Description copied from interface: `Joinable`
  Return the field index of this joinable, or -1 if not a field.

  Specified by:
    `getFieldIndex` in interface `Joinable`

### getPrimaryKeyValue

    public Object getPrimaryKeyValue(Result res,
                                     Column[] cols,
                                     ForeignKey fk,
                                     JDBCStore store,
                                     Joins joins)
                              throws SQLException

  Description copied from interface: `Joinable`
  Return the value for this joinable from the given result, using the given columns. If the given foreign key is non-null, use the foreign key's columns by translating the given columns through `ForeignKey.getColumn(org.apache.openjpa.jdbc.schema.Column)`.

  Specified by:
    `getPrimaryKeyValue` in interface `Joinable`
  Throws:
    `SQLException`

### getColumns

    public Column[] getColumns()

  Description copied from interface: `Joinable`
  The columns managed by this joinable.

  Specified by:
    `getColumns` in interface `Joinable`

### getJoinValue

    public Object getJoinValue(Object val,
                               Column col,
                               JDBCStore store)

  Description copied from interface: `Joinable`
  Return the join value of the given column.

  Specified by:
    `getJoinValue` in interface `Joinable`
  Parameters:
    `val` - the value of the field for this joinable
    `col` - the column of this joinable whose value to return

### getJoinValue

    public Object getJoinValue(OpenJPAStateManager sm,
                               Column col,
                               JDBCStore store)

  Description copied from interface: `Joinable`
  Return the join value of the given column.

  Specified by:
    `getJoinValue` in interface `Joinable`
  Parameters:
    `sm` - the instance from which to get the value
    `col` - the column whose value to return

### setAutoAssignedValue

    public void setAutoAssignedValue(OpenJPAStateManager sm,
                                     JDBCStore store,
                                     Column col,
                                     Object autogen)

  Description copied from interface: `Joinable`
  Use the given auto-assigned value to set this join value's field on the given instance.

  Specified by:
    `setAutoAssignedValue` in interface `Joinable`

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

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.