Top Fields Constructors Methods
org.hibernate.cfg

public Class BinderHelper

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.util.ArrayList, .Collections, .HashMap, .HashSet, .Iterator, .List, .Map, .Properties, .Set, .StringTokenizer, javax.persistence.GeneratedValue, .GenerationType, .Index, .SequenceGenerator, .TableGenerator, .UniqueConstraint, org.hibernate.AnnotationException, .AssertionFailure, .MappingException, org.hibernate.annotations.AnyMetaDef, .AnyMetaDefs, .MetaValue, .SqlFragmentAlias, org.hibernate.annotations.common.reflection.XAnnotatedElement, .XClass, .XPackage, .XProperty, org.hibernate.boot.model.IdGeneratorStrategyInterpreter, .IdentifierGeneratorDefinition, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.cfg.annotations.EntityBinder, .Nullability, .TableBinder, org.hibernate.id.IdentifierGenerator, .MultipleHiLoPerTableGenerator, .PersistentIdentifierGenerator, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.StringHelper, org.hibernate.mapping.Any, .Collection, .Column, .Component, .Join, .MappedSuperclass, .PersistentClass, .Property, .SimpleValue, .SyntheticProperty, .Table, .ToOne, .Value, org.jboss.logging.Logger

Author
Emmanuel Bernard

Field Summary

Modifier and TypeField and Description
public static final String
private static final CoreMessageLogger
private static final Logger
public static final Set<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
bindAnyMetaDef(AnyMetaDef defAnn, MetadataBuildingContext context)

Deprecated as a consequence of AnyMetaDef being deprecated.
public static void
public static Any
buildAnyValue(String anyMetaDefName, Ejb3JoinColumn[] columns, Column metaColumn, PropertyData inferredData, boolean cascadeOnDelete, boolean lazy, Nullability nullability, PropertyHolder propertyHolder, EntityBinder entityBinder, boolean optional, MetadataBuildingContext context)

private static void
checkAnyMetaDefValidity(boolean mustHaveName, AnyMetaDef defAnn, XAnnotatedElement annotatedElement)

Deprecated as a consequence of AnyMetaDef being deprecated.
public static void
createSyntheticPropertyReference(Ejb3JoinColumn[] columns, PersistentClass ownerEntity, PersistentClass associatedEntity, Value value, boolean inverse, MetadataBuildingContext context)

public static Object
findColumnOwner(PersistentClass persistentClass, String columnName, MetadataBuildingContext context)

Find the column owner (ie PersistentClass or Join) of columnName.

private static List<Property>
public static Property
findPropertyByName(PersistentClass associatedClass, String propertyName)

Retrieve the property by path in a recursive way, including IdentifierProperty in the loop If propertyName is null or empty, the IdentifierProperty is returned

public static Property
findPropertyByName(Component component, String propertyName)

Retrieve the property by path in a recursive way

private static IdentifierGeneratorDefinition
public static MappedSuperclass
getMappedSuperclassOrNull(XClass declaringClass, Map<XClass, InheritanceState> inheritanceStatePerClass, MetadataBuildingContext context)

public static String
pack-priv static PropertyData
getPropertyOverriddenByMapperOrMapsId(boolean isId, PropertyHolder propertyHolder, String propertyName, MetadataBuildingContext buildingContext)

public static String
getRelativePath(PropertyHolder propertyHolder, String propertyName)

private static GenerationType
public static boolean
isEmptyAnnotationValue(String annotationString)

public static boolean
public static void
makeIdGenerator(SimpleValue id, XProperty idXProperty, String generatorType, String generatorName, MetadataBuildingContext buildingContext, Map<String, IdentifierGeneratorDefinition> localGenerators)

apply an id generator to a SimpleValue

public static void
makeIdGenerator(SimpleValue id, XProperty idXProperty, String generatorType, String generatorName, MetadataBuildingContext buildingContext, IdentifierGeneratorDefinition foreignKGeneratorDefinition)

apply an id generator to a SimpleValue

private static void
matchColumnsByProperty(Property property, Map<Column, Set<Property>> columnsToProperty)

public static Property
shallowCopy(Property property)

create a property copy reusing the same value

public static Map<String, String>
public static Map<String, String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ANNOTATION_STRING_DEFAULTback to summary
public static final String ANNOTATION_STRING_DEFAULT
LOGback to summary
private static final CoreMessageLogger LOG
logback to summary
private static final Logger log
PRIMITIVE_NAMESback to summary
public static final Set<String> PRIMITIVE_NAMES

Constructor Detail

BinderHelperback to summary
private BinderHelper()

Method Detail

bindAnyMetaDefback to summary
private static void bindAnyMetaDef(AnyMetaDef defAnn, MetadataBuildingContext context)

Deprecated

as a consequence of AnyMetaDef being deprecated. See corresponding docs for further information.

bindAnyMetaDefsback to summary
public static void bindAnyMetaDefs(XAnnotatedElement annotatedElement, MetadataBuildingContext context)
buildAnyValueback to summary
public static Any buildAnyValue(String anyMetaDefName, Ejb3JoinColumn[] columns, Column metaColumn, PropertyData inferredData, boolean cascadeOnDelete, boolean lazy, Nullability nullability, PropertyHolder propertyHolder, EntityBinder entityBinder, boolean optional, MetadataBuildingContext context)
checkAnyMetaDefValidityback to summary
private static void checkAnyMetaDefValidity(boolean mustHaveName, AnyMetaDef defAnn, XAnnotatedElement annotatedElement)

Deprecated

as a consequence of AnyMetaDef being deprecated. See corresponding docs for further information.

createSyntheticPropertyReferenceback to summary
public static void createSyntheticPropertyReference(Ejb3JoinColumn[] columns, PersistentClass ownerEntity, PersistentClass associatedEntity, Value value, boolean inverse, MetadataBuildingContext context)
findColumnOwnerback to summary
public static Object findColumnOwner(PersistentClass persistentClass, String columnName, MetadataBuildingContext context)

Find the column owner (ie PersistentClass or Join) of columnName. If columnName is null or empty, persistentClass is returned

findPropertiesByColumnsback to summary
private static List<Property> findPropertiesByColumns(Object columnOwner, Ejb3JoinColumn[] columns, MetadataBuildingContext context)
findPropertyByNameback to summary
public static Property findPropertyByName(PersistentClass associatedClass, String propertyName)

Retrieve the property by path in a recursive way, including IdentifierProperty in the loop If propertyName is null or empty, the IdentifierProperty is returned

findPropertyByNameback to summary
public static Property findPropertyByName(Component component, String propertyName)

Retrieve the property by path in a recursive way

getIdentifierGeneratorback to summary
private static IdentifierGeneratorDefinition getIdentifierGenerator(String name, XProperty idXProperty, Map<String, IdentifierGeneratorDefinition> localGenerators, MetadataBuildingContext buildingContext)
getMappedSuperclassOrNullback to summary
public static MappedSuperclass getMappedSuperclassOrNull(XClass declaringClass, Map<XClass, InheritanceState> inheritanceStatePerClass, MetadataBuildingContext context)
getPathback to summary
public static String getPath(PropertyHolder holder, PropertyData property)
getPropertyOverriddenByMapperOrMapsIdback to summary
pack-priv static PropertyData getPropertyOverriddenByMapperOrMapsId(boolean isId, PropertyHolder propertyHolder, String propertyName, MetadataBuildingContext buildingContext)
getRelativePathback to summary
public static String getRelativePath(PropertyHolder propertyHolder, String propertyName)
interpretGenerationTypeback to summary
private static GenerationType interpretGenerationType(GeneratedValue generatedValueAnn)
Annotations
@SuppressWarnings:ConstantConditions
isEmptyAnnotationValueback to summary
public static boolean isEmptyAnnotationValue(String annotationString)
isEmptyOrNullAnnotationValueback to summary
public static boolean isEmptyOrNullAnnotationValue(String annotationString)
makeIdGeneratorback to summary
public static void makeIdGenerator(SimpleValue id, XProperty idXProperty, String generatorType, String generatorName, MetadataBuildingContext buildingContext, Map<String, IdentifierGeneratorDefinition> localGenerators)

apply an id generator to a SimpleValue

makeIdGeneratorback to summary
public static void makeIdGenerator(SimpleValue id, XProperty idXProperty, String generatorType, String generatorName, MetadataBuildingContext buildingContext, IdentifierGeneratorDefinition foreignKGeneratorDefinition)

apply an id generator to a SimpleValue

matchColumnsByPropertyback to summary
private static void matchColumnsByProperty(Property property, Map<Column, Set<Property>> columnsToProperty)
shallowCopyback to summary
public static Property shallowCopy(Property property)

create a property copy reusing the same value

toAliasEntityMapback to summary
public static Map<String, String> toAliasEntityMap(SqlFragmentAlias[] aliases)
toAliasTableMapback to summary
public static Map<String, String> toAliasTableMap(SqlFragmentAlias[] aliases)