org.apache.openjpa.jdbc.meta
Interface MappingInfo.ForeignKeyDefaults

Enclosing class:
MappingInfo

public static interface MappingInfo.ForeignKeyDefaults

Supplies default foreign key information.


Method Summary
 ForeignKey get(Table local, Table foreign, boolean inverse)
          Return a default foreign key for the given tables, or null to create a logical foreign key only.
 void populate(Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)
          Populate the given foreign key column with defaults.
 

Method Detail

get

ForeignKey get(Table local,
               Table foreign,
               boolean inverse)
Return a default foreign key for the given tables, or null to create a logical foreign key only. Do not fill in the columns of the foreign key, only attributes like its name, delete action, etc. Do not add the foreign key to the table.


populate

void populate(Table local,
              Table foreign,
              Column col,
              Object target,
              boolean inverse,
              int pos,
              int cols)
Populate the given foreign key column with defaults.

Parameters:
target - the target column or constant value
pos - the index of this column in the foreign key
cols - the number of columns in the foreign key


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