Top Description Inners Fields Constructors Methods
org.hibernate.cfg.annotations

public Class TableBinder

extends Object
Class Inheritance
Annotations
@SuppressWarnings:unchecked
Imports
java.util.ArrayList, .Iterator, .List, javax.persistence.UniqueConstraint, org.hibernate.AnnotationException, .AssertionFailure, org.hibernate.annotations.Index, org.hibernate.cfg.Mappings, .BinderHelper, .Ejb3JoinColumn, .IndexOrUniqueKeySecondPass, .ObjectNameNormalizer, .ObjectNameSource, .NamingStrategy, .UniqueConstraintHolder, org.hibernate.util.StringHelper, .CollectionHelper, org.hibernate.mapping.Collection, .Column, .DependantValue, .JoinedSubclass, .PersistentClass, .Property, .SimpleValue, .Table, .ToOne, .Value, org.slf4j.Logger, .LoggerFactory

Table related operations
Author
Emmanuel Bernard

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private String
private String
private String
pack-priv String
pack-priv Table
private boolean
private boolean
private static Logger
pack-priv Mappings
private String
private String
private String
private String
private String
private List<UniqueConstraintHolder>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
addIndexes(Table hibTable, Index[] indexes, Mappings mappings)

public Table
bind()

public static void
bindFk(PersistentClass referencedEntity, PersistentClass destinationEntity, Ejb3JoinColumn[] columns, SimpleValue value, boolean unique, Mappings mappings)

public static Table
buildAndFillTable(String schema, String catalog, ObjectNameSource nameSource, ObjectNameNormalizer.NamingStrategyHelper namingStrategyHelper, boolean isAbstract, List<UniqueConstraintHolder> uniqueConstraints, String constraints, Table denormalizedSuperTable, Mappings mappings, String subselect)

private ObjectNameSource
buildNameContext(String unquotedOwnerTable, String unquotedAssocTable)

public static List<UniqueConstraintHolder>

Returns:

The built org.hibernate.cfg.UniqueConstraintHolder instances.
buildUniqueConstraintHolders
(UniqueConstraint[]
The UniqueConstraint annotations.
annotations
)

Build a list of org.hibernate.cfg.UniqueConstraintHolder instances given a list of UniqueConstraint annotations.

public static List<String[]>
buildUniqueConstraints(UniqueConstraint[] constraintsArray)

Deprecated Use buildUniqueConstraintHolders instead
public static void
public static Table
fillTable(String schema, String catalog, String realTableName, String logicalName, boolean isAbstract, List<E> uniqueConstraints, String constraints, Table denormalizedSuperTable, Mappings mappings)

Deprecated Use buildAndFillTable instead.
public String
public static void
public void
setAbstract(boolean anAbstract)

public void
setCatalog(String catalog)

public void
setConstraints(String constraints)

public void
setDefaultName(String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName)

public void
setDenormalizedSuperTable(Table denormalizedSuperTable)

public void
setJPA2ElementCollection(boolean isJPA2ElementCollection)

public void
public void
public void
setSchema(String schema)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

associatedEntityback to summary
private String associatedEntity
associatedEntityTableback to summary
private String associatedEntityTable
catalogback to summary
private String catalog
constraintsback to summary
pack-priv String constraints
denormalizedSuperTableback to summary
pack-priv Table denormalizedSuperTable
isAbstractback to summary
private boolean isAbstract
isJPA2ElementCollectionback to summary
private boolean isJPA2ElementCollection
logback to summary
private static Logger log
mappingsback to summary
pack-priv Mappings mappings
nameback to summary
private String name
ownerEntityback to summary
private String ownerEntity
ownerEntityTableback to summary
private String ownerEntityTable
propertyNameback to summary
private String propertyName
schemaback to summary
private String schema
uniqueConstraintsback to summary
private List<UniqueConstraintHolder> uniqueConstraints

Constructor Detail

TableBinderback to summary
public TableBinder()

Method Detail

addIndexesback to summary
public static void addIndexes(Table hibTable, Index[] indexes, Mappings mappings)
bindback to summary
public Table bind()
bindFkback to summary
public static void bindFk(PersistentClass referencedEntity, PersistentClass destinationEntity, Ejb3JoinColumn[] columns, SimpleValue value, boolean unique, Mappings mappings)
buildAndFillTableback to summary
public static Table buildAndFillTable(String schema, String catalog, ObjectNameSource nameSource, ObjectNameNormalizer.NamingStrategyHelper namingStrategyHelper, boolean isAbstract, List<UniqueConstraintHolder> uniqueConstraints, String constraints, Table denormalizedSuperTable, Mappings mappings, String subselect)
buildNameContextback to summary
private ObjectNameSource buildNameContext(String unquotedOwnerTable, String unquotedAssocTable)
buildUniqueConstraintHoldersback to summary
public static List<UniqueConstraintHolder> buildUniqueConstraintHolders(UniqueConstraint[] annotations)

Build a list of org.hibernate.cfg.UniqueConstraintHolder instances given a list of UniqueConstraint annotations.

Parameters
annotations:UniqueConstraint[]

The UniqueConstraint annotations.

Returns:List<UniqueConstraintHolder>

The built org.hibernate.cfg.UniqueConstraintHolder instances.

buildUniqueConstraintsback to summary
public static List<String[]> buildUniqueConstraints(UniqueConstraint[] constraintsArray)

Deprecated

Use buildUniqueConstraintHolders instead

Annotations
@SuppressWarnings:JavaDoc
createUniqueConstraintback to summary
public static void createUniqueConstraint(Value value)
fillTableback to summary
public static Table fillTable(String schema, String catalog, String realTableName, String logicalName, boolean isAbstract, List<E> uniqueConstraints, String constraints, Table denormalizedSuperTable, Mappings mappings)

Deprecated

Use buildAndFillTable instead.

Annotations
@SuppressWarnings:JavaDoc
getNameback to summary
public String getName()
linkJoinColumnWithValueOverridingNameIfImplicitback to summary
public static void linkJoinColumnWithValueOverridingNameIfImplicit(PersistentClass referencedEntity, Iterator<E> columnIterator, Ejb3JoinColumn[] columns, SimpleValue value)
setAbstractback to summary
public void setAbstract(boolean anAbstract)
setCatalogback to summary
public void setCatalog(String catalog)
setConstraintsback to summary
public void setConstraints(String constraints)
setDefaultNameback to summary
public void setDefaultName(String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName)
setDenormalizedSuperTableback to summary
public void setDenormalizedSuperTable(Table denormalizedSuperTable)
setJPA2ElementCollectionback to summary
public void setJPA2ElementCollection(boolean isJPA2ElementCollection)
setMappingsback to summary
public void setMappings(Mappings mappings)
setNameback to summary
public void setName(String name)
setSchemaback to summary
public void setSchema(String schema)
setUniqueConstraintsback to summary
public void setUniqueConstraints(UniqueConstraint[] uniqueConstraints)
org.hibernate.cfg.annotations back to summary

private Class TableBinder.AssociationTableNameSource

extends Object
implements ObjectNameSource
Class Inheritance
  • java.lang.Object
  • org.hibernate.cfg.annotations.TableBinder.AssociationTableNameSource
All Implemented Interfaces
org.hibernate.cfg.ObjectNameSource

Field Summary

Modifier and TypeField and Description
private final String
private final String

Constructor Summary

AccessConstructor and Description
private
AssociationTableNameSource(String explicitName, String logicalName)

Method Summary

Modifier and TypeMethod and Description
public String
getExplicitName()

Implements org.hibernate.cfg.ObjectNameSource.getExplicitName.

Retrieve the name explicitly provided by the user.
public String
getLogicalName()

Implements org.hibernate.cfg.ObjectNameSource.getLogicalName.

Retrieve the logical name for this object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

explicitNameback to summary
private final String explicitName
logicalNameback to summary
private final String logicalName

Constructor Detail

AssociationTableNameSourceback to summary
private AssociationTableNameSource(String explicitName, String logicalName)

Method Detail

getExplicitNameback to summary
public String getExplicitName()

Implements org.hibernate.cfg.ObjectNameSource.getExplicitName.

Doc from org.hibernate.cfg.ObjectNameSource.getExplicitName.

Retrieve the name explicitly provided by the user.

Returns:String

The explicit name.

getLogicalNameback to summary
public String getLogicalName()

Implements org.hibernate.cfg.ObjectNameSource.getLogicalName.

Doc from org.hibernate.cfg.ObjectNameSource.getLogicalName.

Retrieve the logical name for this object. Usually this is the name under which the "thing" is registered with the Mappings.

Returns:String

The logical name.