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

public Class EntityBinder

extends Object
Class Inheritance
Imports
java.util.HashMap, .Iterator, .List, .Map, javax.persistence.Access, .Entity, .JoinColumn, .JoinTable, .PrimaryKeyJoinColumn, .SecondaryTable, .SecondaryTables, org.hibernate.AnnotationException, .AssertionFailure, .EntityMode, .MappingException, org.hibernate.annotations.BatchSize, .Cache, .CacheConcurrencyStrategy, .FetchMode, .Immutable, .Loader, .OptimisticLockType, .Persister, .PolymorphismType, .Proxy, .SQLDelete, .SQLDeleteAll, .SQLInsert, .SQLUpdate, .Subselect, .Synchronize, .Tables, .Tuplizer, .Tuplizers, .Where, org.hibernate.annotations.common.reflection.XAnnotatedElement, .XClass, org.hibernate.cfg.AccessType, .AnnotationBinder, .BinderHelper, .Ejb3JoinColumn, .InheritanceState, .Mappings, .PropertyHolder, .ObjectNameSource, .NamingStrategy, .ObjectNameNormalizer, .UniqueConstraintHolder, org.hibernate.engine.ExecuteUpdateResultCheckStyle, .FilterDefinition, .Versioning, org.hibernate.mapping.DependantValue, .Join, .PersistentClass, .RootClass, .SimpleValue, .Table, .TableOwner, .Value, org.hibernate.persister.PersisterClassProvider, org.hibernate.util.ReflectHelper, .StringHelper, org.slf4j.Logger, .LoggerFactory

Stateful holder and processor for binding Entity information
Author
Emmanuel Bernard

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private XClass
private int
private String
private boolean
private String
private String
private boolean
private boolean
private boolean
private Map<String, String>
private Boolean
private boolean
private InheritanceState
private Boolean
private boolean
private Logger
private Mappings
private String
private OptimisticLockType
private PersistentClass
private PolymorphismType
private AccessType
private XClass
private static EntityBinder.SecondaryTableNamingStrategyHelper
private Map<String, Object>
private Map<String, Join>
private boolean
private String
private String
private boolean

Constructor Summary

AccessConstructor and Description
public
EntityBinder()

Use as a fake one for Collection of elements

public
EntityBinder(Entity ejb3Ann, Entity hibAnn, XClass annotatedClass, PersistentClass persistentClass, Mappings mappings)

Method Summary

Modifier and TypeMethod and Description
public void
addFilter(String name, String condition)

public Join
addJoin(JoinTable joinTable, PropertyHolder holder, boolean noDelayInPkColumnCreation)

private Join
addJoin(SecondaryTable secondaryTable, JoinTable joinTable, PropertyHolder propertyHolder, boolean noDelayInPkColumnCreation)

public void
private void
public void
private void
private void
bindJoinToPersistentClass(Join join, Ejb3JoinColumn[] ejb3JoinColumns, Mappings mappings)

public void
bindTable(String schema, String catalog, String tableName, List<UniqueConstraintHolder> uniqueConstraints, String constraints, Table denormalizedSuperclassTable)

private void
createPrimaryColumnsToSecondaryTable(Object uncastedColumn, PropertyHolder propertyHolder, Join join)

public void
private Table
public void
public static String
public AccessType
public AccessType
public AccessType
public Map<String, Join>
pack-priv int
private boolean
public boolean
public void
public void
public void
public void
setCache(Cache cacheAnn)

public void
setDiscriminatorValue(String discriminatorValue)

private void
public void
setForceDiscriminator(boolean forceDiscriminator)

public void
setIgnoreIdAnnotations(boolean ignoreIdAnnotations)

public void
public void
setInsertableDiscriminator(boolean insertableDiscriminator)

public void
public void
setProxy(Proxy proxy)

public void
setWhere(Where whereAnn)

public void
setWrapIdsInEmbeddedComponents(boolean wrapIdsInEmbeddedComponents)

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotatedClassback to summary
private XClass annotatedClass
batchSizeback to summary
private int batchSize
cacheConcurrentStrategyback to summary
private String cacheConcurrentStrategy
cacheLazyPropertyback to summary
private boolean cacheLazyProperty
cacheRegionback to summary
private String cacheRegion
discriminatorValueback to summary
private String discriminatorValue
dynamicInsertback to summary
private boolean dynamicInsert
dynamicUpdateback to summary
private boolean dynamicUpdate
explicitHibernateEntityAnnotationback to summary
private boolean explicitHibernateEntityAnnotation
filtersback to summary
private Map<String, String> filters
forceDiscriminatorback to summary
private Boolean forceDiscriminator
ignoreIdAnnotationsback to summary
private boolean ignoreIdAnnotations
inheritanceStateback to summary
private InheritanceState inheritanceState
insertableDiscriminatorback to summary
private Boolean insertableDiscriminator
lazyback to summary
private boolean lazy
logback to summary
private Logger log
mappingsback to summary
private Mappings mappings
nameback to summary
private String name
optimisticLockTypeback to summary
private OptimisticLockType optimisticLockType
persistentClassback to summary
private PersistentClass persistentClass
polymorphismTypeback to summary
private PolymorphismType polymorphismType
propertyAccessTypeback to summary
private AccessType propertyAccessType
proxyClassback to summary
private XClass proxyClass
SEC_TBL_NS_HELPERback to summary
private static EntityBinder.SecondaryTableNamingStrategyHelper SEC_TBL_NS_HELPER
secondaryTableJoinsback to summary
private Map<String, Object> secondaryTableJoins
secondaryTablesback to summary
private Map<String, Join> secondaryTables
selectBeforeUpdateback to summary
private boolean selectBeforeUpdate
subselectback to summary
private String subselect
whereback to summary
private String where
wrapIdsInEmbeddedComponentsback to summary
private boolean wrapIdsInEmbeddedComponents

Constructor Detail

EntityBinderback to summary
public EntityBinder()

Use as a fake one for Collection of elements

EntityBinderback to summary
public EntityBinder(Entity ejb3Ann, Entity hibAnn, XClass annotatedClass, PersistentClass persistentClass, Mappings mappings)

Method Detail

addFilterback to summary
public void addFilter(String name, String condition)
addJoinback to summary
public Join addJoin(JoinTable joinTable, PropertyHolder holder, boolean noDelayInPkColumnCreation)
addJoinback to summary
private Join addJoin(SecondaryTable secondaryTable, JoinTable joinTable, PropertyHolder propertyHolder, boolean noDelayInPkColumnCreation)
bindDiscriminatorValueback to summary
public void bindDiscriminatorValue()
bindEjb3Annotationback to summary
private void bindEjb3Annotation(Entity ejb3Ann)
bindEntityback to summary
public void bindEntity()
bindHibernateAnnotationback to summary
private void bindHibernateAnnotation(Entity hibAnn)
bindJoinToPersistentClassback to summary
private void bindJoinToPersistentClass(Join join, Ejb3JoinColumn[] ejb3JoinColumns, Mappings mappings)
bindTableback to summary
public void bindTable(String schema, String catalog, String tableName, List<UniqueConstraintHolder> uniqueConstraints, String constraints, Table denormalizedSuperclassTable)
createPrimaryColumnsToSecondaryTableback to summary
private void createPrimaryColumnsToSecondaryTable(Object uncastedColumn, PropertyHolder propertyHolder, Join join)
finalSecondaryTableBindingback to summary
public void finalSecondaryTableBinding(PropertyHolder propertyHolder)
findMatchingComplimentTableAnnotationback to summary
private Table findMatchingComplimentTableAnnotation(Join join)
firstLevelSecondaryTablesBindingback to summary
public void firstLevelSecondaryTablesBinding(SecondaryTable secTable, SecondaryTables secTables)
getCacheConcurrencyStrategyback to summary
public static String getCacheConcurrencyStrategy(CacheConcurrencyStrategy strategy)
getExplicitAccessTypeback to summary
public AccessType getExplicitAccessType(XAnnotatedElement element)
getPropertyAccessorback to summary
public AccessType getPropertyAccessor(XAnnotatedElement element)
getPropertyAccessTypeback to summary
public AccessType getPropertyAccessType()
getSecondaryTablesback to summary
public Map<String, Join> getSecondaryTables()
getVersioningback to summary
pack-priv int getVersioning(OptimisticLockType type)
isExplicitPolymorphismback to summary
private boolean isExplicitPolymorphism(PolymorphismType type)
isIgnoreIdAnnotationsback to summary
public boolean isIgnoreIdAnnotations()
processComplementaryTableDefinitionsback to summary
public void processComplementaryTableDefinitions(Table table)
processComplementaryTableDefinitionsback to summary
public void processComplementaryTableDefinitions(Tables tables)
setBatchSizeback to summary
public void setBatchSize(BatchSize sizeAnn)
setCacheback to summary
public void setCache(Cache cacheAnn)
setDiscriminatorValueback to summary
public void setDiscriminatorValue(String discriminatorValue)
setFKNameIfDefinedback to summary
private void setFKNameIfDefined(Join join)
setForceDiscriminatorback to summary
public void setForceDiscriminator(boolean forceDiscriminator)
setIgnoreIdAnnotationsback to summary
public void setIgnoreIdAnnotations(boolean ignoreIdAnnotations)
setInheritanceStateback to summary
public void setInheritanceState(InheritanceState inheritanceState)
setInsertableDiscriminatorback to summary
public void setInsertableDiscriminator(boolean insertableDiscriminator)
setPropertyAccessTypeback to summary
public void setPropertyAccessType(AccessType propertyAccessor)
setProxyback to summary
public void setProxy(Proxy proxy)
Annotations
@SuppressWarnings:unchecked
setWhereback to summary
public void setWhere(Where whereAnn)
setWrapIdsInEmbeddedComponentsback to summary
public void setWrapIdsInEmbeddedComponents(boolean wrapIdsInEmbeddedComponents)
wrapIdsInEmbeddedComponentsback to summary
public boolean wrapIdsInEmbeddedComponents()
org.hibernate.cfg.annotations back to summary

private Class EntityBinder.EntityTableNamingStrategyHelper

extends Object
implements NamingStrategyHelper
Class Inheritance
  • java.lang.Object
  • org.hibernate.cfg.annotations.EntityBinder.EntityTableNamingStrategyHelper
All Implemented Interfaces
org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
determineImplicitName(NamingStrategy
The naming strategy in effect
strategy
)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.determineImplicitName.

Called when the user supplied no explicit name/identifier for the given database object.
public String
handleExplicitName(NamingStrategy
The naming strategy in effect
strategy
,
String
The normalized explicit object name.
name
)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.handleExplicitName.

Called when the user has supplied an explicit name for the database object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entityNameback to summary
private final String entityName

Constructor Detail

EntityTableNamingStrategyHelperback to summary
private EntityTableNamingStrategyHelper(String entityName)

Method Detail

determineImplicitNameback to summary
public String determineImplicitName(NamingStrategy strategy)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.determineImplicitName.

Doc from org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.determineImplicitName.

Called when the user supplied no explicit name/identifier for the given database object.

Parameters
strategy:NamingStrategy

The naming strategy in effect

Returns:String

The implicit name

handleExplicitNameback to summary
public String handleExplicitName(NamingStrategy strategy, String name)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.handleExplicitName.

Doc from org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.handleExplicitName.

Called when the user has supplied an explicit name for the database object.

Parameters
strategy:NamingStrategy

The naming strategy in effect

name:String

The normalized explicit object name.

Returns:String

The strategy-handled name.

org.hibernate.cfg.annotations back to summary

private Class EntityBinder.EntityTableObjectNameSource

extends Object
implements ObjectNameSource
Class Inheritance
  • java.lang.Object
  • org.hibernate.cfg.annotations.EntityBinder.EntityTableObjectNameSource
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
EntityTableObjectNameSource(String explicitName, String entityName)

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

EntityTableObjectNameSourceback to summary
private EntityTableObjectNameSource(String explicitName, String entityName)

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.

org.hibernate.cfg.annotations back to summary

private Class EntityBinder.SecondaryTableNameSource

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

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
private

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

Constructor Detail

SecondaryTableNameSourceback to summary
private SecondaryTableNameSource(String explicitName)

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.

org.hibernate.cfg.annotations back to summary

private Class EntityBinder.SecondaryTableNamingStrategyHelper

extends Object
implements NamingStrategyHelper
Class Inheritance
  • java.lang.Object
  • org.hibernate.cfg.annotations.EntityBinder.SecondaryTableNamingStrategyHelper
All Implemented Interfaces
org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
determineImplicitName(NamingStrategy
The naming strategy in effect
strategy
)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.determineImplicitName.

Called when the user supplied no explicit name/identifier for the given database object.
public String
handleExplicitName(NamingStrategy
The naming strategy in effect
strategy
,
String
The normalized explicit object name.
name
)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.handleExplicitName.

Called when the user has supplied an explicit name for the database object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SecondaryTableNamingStrategyHelperback to summary
private SecondaryTableNamingStrategyHelper()

Method Detail

determineImplicitNameback to summary
public String determineImplicitName(NamingStrategy strategy)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.determineImplicitName.

Doc from org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.determineImplicitName.

Called when the user supplied no explicit name/identifier for the given database object.

Parameters
strategy:NamingStrategy

The naming strategy in effect

Returns:String

The implicit name

handleExplicitNameback to summary
public String handleExplicitName(NamingStrategy strategy, String name)

Implements org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.handleExplicitName.

Doc from org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper.handleExplicitName.

Called when the user has supplied an explicit name for the database object.

Parameters
strategy:NamingStrategy

The naming strategy in effect

name:String

The normalized explicit object name.

Returns:String

The strategy-handled name.