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
Class FieldMappingInfo

    java.lang.Object
      org.apache.openjpa.jdbc.meta.MappingInfo
          org.apache.openjpa.jdbc.meta.FieldMappingInfo

All Implemented Interfaces:
  Commentable

    public class FieldMappingInfo

extends MappingInfo
implements Commentable

Information about the mapping from a field to the schema, in raw form. The columns and tables used in mapping info will not be part of the `SchemaGroup` used at runtime. Rather, they will be structs with the relevant pieces of information filled in.

Author:
  Abe White

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.meta.MappingInfo
`MappingInfo.ForeignKeyDefaults, MappingInfo.TableDefaults`

Field Summary

Fields inherited from class org.apache.openjpa.jdbc.meta.MappingInfo
`JOIN_FORWARD, JOIN_INVERSE, JOIN_NONE`

Fields inherited from interface org.apache.openjpa.lib.xml.Commentable
`EMPTY_COMMENTS`

Constructor Summary
`FieldMappingInfo()`

Method Summary
`boolean` | `canOrderColumn()` Whether we can have an ordering column.
`protected void` | `clear(boolean canFlags)` Clear mapping information.
`void` | `copy(MappingInfo info)` Copy missing info from the instance to this one.
`String[]` | `getComments()` Return comments, or empty array if none.
`ForeignKey` | `getJoin(FieldMapping field, Table table, boolean adapt)` Return the join from the field table to the owning class table.
`Index` | `getJoinIndex(FieldMapping field, boolean adapt)` Index on the field join.
`Unique` | `getJoinUnique(FieldMapping field, boolean def, boolean adapt)` Unique constraint on the field join.
`Column` | `getOrderColumn()` Raw synthetic ordering column.
`Column` | `getOrderColumn(FieldMapping field, Table table, boolean adapt)` Return the ordering column for this field, or null if none.
`Table` | `getTable(FieldMapping field, boolean create, boolean adapt)` Return the table for the given field, or null if no table given.
`String` | `getTableName()` The user-supplied name of the table for this field.
`boolean` | `hasSchemaComponents()` Return true if this info has columns, foreign key information, index information, etc.
`boolean` | `isJoinOuter()` Whether the field's table is joined to the class table through an outer join.
`void` | `setCanOrderColumn(boolean canOrder)` Whether we can have an ordering column.
`void` | `setComments(String[] comments)` Set comments.
`void` | `setJoinOuter(boolean outer)` Whether the field's table is joined to the class table through an outer join.
`void` | `setOrderColumn(Column order)` Raw synthetic ordering column.
`void` | `setTableName(String tableName)` The user-supplied name of the table for this field.
`void` | `syncOrderColumn(FieldMapping field)` Synchronize internal order column information with the given field.
`void` | `syncStrategy(FieldMapping field)` Synchronize internal mapping strategy information with the given field.
`void` | `syncWith(FieldMapping field)` Synchronize internal information with the mapping data for the given field.

Methods inherited from class org.apache.openjpa.jdbc.meta.MappingInfo
`assertNoForeignKey, assertNoIndex, assertNoJoin, assertNoSchemaComponents, assertNoUnique, assertStrategy, canForeignKey, canIndex, canUnique, clear, createColumns, createForeignKey, createIndex, createTable, createUnique, getColumnIO, getColumns, getForeignKey, getIndex, getJoinDirection, getStrategy, getUnique, mergeColumn, setCanForeignKey, setCanIndex, setCanUnique, setColumnIO, setColumns, setForeignKey, setIndex, setJoinDirection, setStrategy, setUnique, syncColumn, syncColumns, syncForeignKey, syncIndex, syncUnique`

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

Constructor Detail

### FieldMappingInfo

    public FieldMappingInfo()

Method Detail

### getTableName

    public String getTableName()

  The user-supplied name of the table for this field.

### setTableName

    public void setTableName(String tableName)

  The user-supplied name of the table for this field.

### isJoinOuter

    public boolean isJoinOuter()

  Whether the field's table is joined to the class table through an outer join.

### setJoinOuter

    public void setJoinOuter(boolean outer)

  Whether the field's table is joined to the class table through an outer join.

### getOrderColumn

    public Column getOrderColumn()

  Raw synthetic ordering column.

### setOrderColumn

    public void setOrderColumn(Column order)

  Raw synthetic ordering column.

### canOrderColumn

    public boolean canOrderColumn()

  Whether we can have an ordering column.

### setCanOrderColumn

    public void setCanOrderColumn(boolean canOrder)

  Whether we can have an ordering column.

### getTable

    public Table getTable(FieldMapping field,
                          boolean create,
                          boolean adapt)

  Return the table for the given field, or null if no table given.

### getJoin

    public ForeignKey getJoin(FieldMapping field,
                              Table table,
                              boolean adapt)

  Return the join from the field table to the owning class table.

### getJoinUnique

    public Unique getJoinUnique(FieldMapping field,
                                boolean def,
                                boolean adapt)

  Unique constraint on the field join.

### getJoinIndex

    public Index getJoinIndex(FieldMapping field,
                              boolean adapt)

  Index on the field join.

### getOrderColumn

    public Column getOrderColumn(FieldMapping field,
                                 Table table,
                                 boolean adapt)

  Return the ordering column for this field, or null if none.

### syncWith

    public void syncWith(FieldMapping field)

  Synchronize internal information with the mapping data for the given field.

### syncStrategy

    public void syncStrategy(FieldMapping field)

  Synchronize internal mapping strategy information with the given field.

### syncOrderColumn

    public void syncOrderColumn(FieldMapping field)

  Synchronize internal order column information with the given field.

### hasSchemaComponents

    public boolean hasSchemaComponents()

  Description copied from class: `MappingInfo`
  Return true if this info has columns, foreign key information, index information, etc.

  Overrides:
    `hasSchemaComponents` in class `MappingInfo`

### clear

    protected void clear(boolean canFlags)

  Description copied from class: `MappingInfo`
  Clear mapping information.

  Overrides:
    `clear` in class `MappingInfo`
  Parameters:
    `canFlags` - whether to clear information about whether we can place indexed, foreign keys, etc on this mapping

### copy

    public void copy(MappingInfo info)

  Description copied from class: `MappingInfo`
  Copy missing info from the instance to this one.

  Overrides:
    `copy` in class `MappingInfo`

### getComments

    public String[] getComments()

  Description copied from interface: `Commentable`
  Return comments, or empty array if none.

  Specified by:
    `getComments` in interface `Commentable`

### setComments

    public void setComments(String[] comments)

  Description copied from interface: `Commentable`
  Set comments.

  Specified by:
    `setComments` in interface `Commentable`

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 Apache Software Foundation. All Rights Reserved.