public interface MappingDefaults
Modifier and Type | Method and Description |
---|---|
boolean |
defaultMissingInfo()
Whether to fill in missing mapping information at runtime with the
default values supplied by this plugin.
|
Object |
getDiscriminatorValue(Discriminator disc,
boolean adapt)
Return the default discriminator value for the given instance.
|
ForeignKey |
getForeignKey(ValueMapping vm,
DBIdentifier name,
Table local,
Table foreign,
boolean inverse)
Return a default foreign key for the join from this value to its
related type, or null for a logical foreign key only.
|
ForeignKey |
getForeignKey(ValueMapping vm,
String name,
Table local,
Table foreign,
boolean inverse)
Deprecated.
|
Index |
getIndex(Discriminator disc,
Table table,
Column[] cols)
Return a default index for the discriminator, or null if the
discriminator columns should not be indexed by default.
|
Index |
getIndex(ValueMapping vm,
DBIdentifier name,
Table table,
Column[] cols)
Return a default index for the value, or null if the value columns
should not be indexed by default.
|
Index |
getIndex(ValueMapping vm,
String name,
Table table,
Column[] cols)
Deprecated.
|
Index |
getIndex(Version vers,
Table table,
Column[] cols)
Return a default index for the version, or null if the
version columns should not be indexed by default.
|
ForeignKey |
getJoinForeignKey(ClassMapping cls,
Table local,
Table foreign)
Return a default foreign key for the join from this class' table to its
superclass' table, or null for a logical foreign key only.
|
ForeignKey |
getJoinForeignKey(FieldMapping fm,
Table local,
Table foreign)
Return a default foreign key for the join from this field's table to its
defining class' table, or null for a logical foreign key only.
|
Index |
getJoinIndex(FieldMapping fm,
Table table,
Column[] cols)
Return a default index for the join, or null if the
join columns should not be indexed by default.
|
Unique |
getJoinUnique(FieldMapping fm,
Table table,
Column[] cols)
Return a default constraint for the join, or null if the join columns
should not be constrained by default.
|
DBIdentifier |
getPrimaryKeyIdentifier(ClassMapping cm,
Table table)
Return the name of the primary key for the table of the given class,
or null for database default.
|
String |
getPrimaryKeyName(ClassMapping cm,
Table table)
Deprecated.
|
Object |
getStrategy(ClassMapping cls,
boolean adapt)
Default mapping strategy when there is no explicit strategy
and no hierarchy strategy given.
|
Object |
getStrategy(Discriminator disc,
boolean adapt)
Default discriminator mapping strategy when there is no explicit
strategy.
|
Object |
getStrategy(ValueMapping vm,
Class<?> type,
boolean adapt)
Custom handler or strategy for the given field, or null if none
has been registered.
|
Object |
getStrategy(Version vers,
boolean adapt)
Default version mapping strategy when there is no explicit strategy.
|
DBIdentifier |
getTableIdentifier(ClassMapping cls,
Schema defaultSchema)
Return the default table name for the given class.
|
DBIdentifier |
getTableIdentifier(FieldMapping fm,
Schema defaultSchema)
Return the default secondary table name for the given field.
|
String |
getTableName(ClassMapping cls,
Schema defaultSchema)
Deprecated.
|
String |
getTableName(FieldMapping fm,
Schema defaultSchema)
Deprecated.
|
Unique |
getUnique(ValueMapping vm,
DBIdentifier name,
Table table,
Column[] cols)
Return a default constraint for the value, or null if the value columns
should not be constrained by default.
|
Unique |
getUnique(ValueMapping vm,
String name,
Table table,
Column[] cols)
Deprecated.
|
void |
installPrimaryKey(FieldMapping fm,
Table table)
If desired, install a primary key on the given secondary table.
|
void |
populateColumns(Discriminator disc,
Table table,
Column[] cols)
Fill in default information for the given discriminator columns.
|
void |
populateColumns(ValueMapping vm,
DBIdentifier name,
Table table,
Column[] cols)
Fill in default information for the given value columns.
|
void |
populateColumns(ValueMapping vm,
String name,
Table table,
Column[] cols)
Deprecated.
|
void |
populateColumns(Version vers,
Table table,
Column[] cols)
Fill in default information for the given version columns.
|
void |
populateDataStoreIdColumns(ClassMapping cls,
Table table,
Column[] cols)
Fill in default information for the given datastore identity columns.
|
void |
populateForeignKeyColumn(ValueMapping vm,
DBIdentifier name,
Table local,
Table foreign,
Column col,
Object target,
boolean inverse,
int pos,
int cols)
Fill in default information for the given column used to join a value
to its related type.
|
void |
populateForeignKeyColumn(ValueMapping vm,
String name,
Table local,
Table foreign,
Column col,
Object target,
boolean inverse,
int pos,
int cols)
Deprecated.
|
void |
populateJoinColumn(ClassMapping cm,
Table local,
Table foreign,
Column col,
Object target,
int pos,
int cols)
Fill in default information for the given column used to join a class
to its superclass table.
|
void |
populateJoinColumn(FieldMapping fm,
Table local,
Table foreign,
Column col,
Object target,
int pos,
int cols)
Fill in default information for the given column used to join a field
to its defining class' table.
|
boolean |
populateNullIndicatorColumns(ValueMapping vm,
DBIdentifier name,
Table table,
Column[] cols)
Fill in default information for the given null indicator columns.
|
boolean |
populateNullIndicatorColumns(ValueMapping vm,
String name,
Table table,
Column[] cols)
Deprecated.
|
boolean |
populateOrderColumns(FieldMapping fm,
Table table,
Column[] cols)
Fill in default information for the given order columns.
|
boolean |
useClassCriteria()
The default for whether relations use the related object's
expected class as part of the join criteria.
|
boolean defaultMissingInfo()
boolean useClassCriteria()
Object getStrategy(ClassMapping cls, boolean adapt)
cls
- the class; will not be mapped, but superclass and raw
MappingInfo
will be availableadapt
- whether we can adapt the mapping or schemaObject getStrategy(Version vers, boolean adapt)
vers
- the version; will not be mapped, but raw
MappingInfo
will be availableadapt
- whether we can adapt the mapping or schemaObject getStrategy(Discriminator disc, boolean adapt)
disc
- the discriminator; will not be mapped, but raw
MappingInfo
will be availableadapt
- whether we can adapt the mapping or schemaObject getStrategy(ValueMapping vm, Class<?> type, boolean adapt)
vm
- the value mapping; will not be mapped, but raw
MappingInfo
will be availabletype
- the value typeadapt
- whether we can adapt the mapping or schemaObject getDiscriminatorValue(Discriminator disc, boolean adapt)
@Deprecated String getTableName(ClassMapping cls, Schema defaultSchema)
DBIdentifier getTableIdentifier(ClassMapping cls, Schema defaultSchema)
@Deprecated String getTableName(FieldMapping fm, Schema defaultSchema)
DBIdentifier getTableIdentifier(FieldMapping fm, Schema defaultSchema)
void populateDataStoreIdColumns(ClassMapping cls, Table table, Column[] cols)
void populateColumns(Version vers, Table table, Column[] cols)
void populateColumns(Discriminator disc, Table table, Column[] cols)
void populateJoinColumn(ClassMapping cm, Table local, Table foreign, Column col, Object target, int pos, int cols)
target
- the target of this column in the join; may be
another column or a constant valuepos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign keyvoid populateJoinColumn(FieldMapping fm, Table local, Table foreign, Column col, Object target, int pos, int cols)
target
- the target of this column in the join; may be
another column or a constant valuepos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign key@Deprecated void populateForeignKeyColumn(ValueMapping vm, String name, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)
name
- base name for value, as decided by mappingtarget
- the target of this column in the join; may be
another column or a constant valueinverse
- whether this is an inverse foreign keypos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign keyvoid populateForeignKeyColumn(ValueMapping vm, DBIdentifier name, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)
name
- base name for value, as decided by mappingtarget
- the target of this column in the join; may be
another column or a constant valueinverse
- whether this is an inverse foreign keypos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign key@Deprecated void populateColumns(ValueMapping vm, String name, Table table, Column[] cols)
name
- base name for value, as decided by mappingvoid populateColumns(ValueMapping vm, DBIdentifier name, Table table, Column[] cols)
name
- base name for value, as decided by mappingboolean populateOrderColumns(FieldMapping fm, Table table, Column[] cols)
@Deprecated boolean populateNullIndicatorColumns(ValueMapping vm, String name, Table table, Column[] cols)
name
- base name for value, as decided by mappingboolean populateNullIndicatorColumns(ValueMapping vm, DBIdentifier name, Table table, Column[] cols)
name
- base name for value, as decided by mappingForeignKey getJoinForeignKey(ClassMapping cls, Table local, Table foreign)
ForeignKey getJoinForeignKey(FieldMapping fm, Table local, Table foreign)
@Deprecated ForeignKey getForeignKey(ValueMapping vm, String name, Table local, Table foreign, boolean inverse)
name
- base name for value, as decided by mappinginverse
- whether this is an inverse keyForeignKey getForeignKey(ValueMapping vm, DBIdentifier name, Table local, Table foreign, boolean inverse)
name
- base name for value, as decided by mappinginverse
- whether this is an inverse keyIndex getJoinIndex(FieldMapping fm, Table table, Column[] cols)
@Deprecated Index getIndex(ValueMapping vm, String name, Table table, Column[] cols)
name
- base name for value, as decided by mappingIndex getIndex(ValueMapping vm, DBIdentifier name, Table table, Column[] cols)
name
- base name for value, as decided by mappingIndex getIndex(Version vers, Table table, Column[] cols)
Index getIndex(Discriminator disc, Table table, Column[] cols)
Unique getJoinUnique(FieldMapping fm, Table table, Column[] cols)
@Deprecated Unique getUnique(ValueMapping vm, String name, Table table, Column[] cols)
name
- base name for value, as decided by mappingUnique getUnique(ValueMapping vm, DBIdentifier name, Table table, Column[] cols)
name
- base name for value, as decided by mapping@Deprecated String getPrimaryKeyName(ClassMapping cm, Table table)
DBIdentifier getPrimaryKeyIdentifier(ClassMapping cm, Table table)
void installPrimaryKey(FieldMapping fm, Table table)
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.