Top Fields Constructors Methods
org.hibernate.cfg

public Class BinderHelper

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .HashMap, .HashSet, .Iterator, .List, .Map, .Properties, .Set, .StringTokenizer, org.hibernate.AnnotationException, .AssertionFailure, .MappingException, org.hibernate.annotations.AnyMetaDef, .AnyMetaDefs, .MetaValue, org.hibernate.annotations.common.reflection.XAnnotatedElement, .XClass, .XPackage, org.hibernate.cfg.annotations.EntityBinder, .Nullability, .TableBinder, org.hibernate.id.MultipleHiLoPerTableGenerator, .PersistentIdentifierGenerator, org.hibernate.mapping.Any, .Collection, .Column, .Component, .IdGenerator, .Join, .PersistentClass, .Property, .SimpleValue, .SyntheticProperty, .Table, .ToOne, .Value, .MappedSuperclass, org.hibernate.util.StringHelper, org.slf4j.Logger, .LoggerFactory

Author
Emmanuel Bernard

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
public static void
bindAnyMetaDefs(XAnnotatedElement annotatedElement, Mappings mappings)

public static Any
buildAnyValue(String anyMetaDefName, Ejb3JoinColumn[] columns, Column metaColumn, PropertyData inferredData, boolean cascadeOnDelete, Nullability nullability, PropertyHolder propertyHolder, EntityBinder entityBinder, boolean optional, Mappings mappings)

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

public static void
createSyntheticPropertyReference(Ejb3JoinColumn[] columns, PersistentClass ownerEntity, PersistentClass associatedEntity, Value value, boolean inverse, Mappings mappings)

public static Object
findColumnOwner(PersistentClass persistentClass, String columnName, Mappings mappings)

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

private static List<Property>
findPropertiesByColumns(Object columnOwner, Ejb3JoinColumn[] columns, Mappings mappings)

public static Property
findPropertyByName(PersistentClass associatedClass, String propertyName)

Retrieve the property by path in a recursive way, including IndetifierProperty 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

public static MappedSuperclass
getMappedSuperclassOrNull(XClass declaringClass, Map<XClass, InheritanceState> inheritanceStatePerClass, Mappings mappings)

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

public static String
getRelativePath(PropertyHolder propertyHolder, String propertyName)

public static boolean
isEmptyAnnotationValue(String annotationString)

public static void
makeIdGenerator(SimpleValue id, String generatorType, String generatorName, Mappings mappings, Map<String, IdGenerator> localGenerators)

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

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 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, Mappings mappings)
bindAnyMetaDefsback to summary
public static void bindAnyMetaDefs(XAnnotatedElement annotatedElement, Mappings mappings)
buildAnyValueback to summary
public static Any buildAnyValue(String anyMetaDefName, Ejb3JoinColumn[] columns, Column metaColumn, PropertyData inferredData, boolean cascadeOnDelete, Nullability nullability, PropertyHolder propertyHolder, EntityBinder entityBinder, boolean optional, Mappings mappings)
checkAnyMetaDefValidityback to summary
private static void checkAnyMetaDefValidity(boolean mustHaveName, AnyMetaDef defAnn, XAnnotatedElement annotatedElement)
createSyntheticPropertyReferenceback to summary
public static void createSyntheticPropertyReference(Ejb3JoinColumn[] columns, PersistentClass ownerEntity, PersistentClass associatedEntity, Value value, boolean inverse, Mappings mappings)
findColumnOwnerback to summary
public static Object findColumnOwner(PersistentClass persistentClass, String columnName, Mappings mappings)

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, Mappings mappings)
findPropertyByNameback to summary
public static Property findPropertyByName(PersistentClass associatedClass, String propertyName)

Retrieve the property by path in a recursive way, including IndetifierProperty 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

getMappedSuperclassOrNullback to summary
public static MappedSuperclass getMappedSuperclassOrNull(XClass declaringClass, Map<XClass, InheritanceState> inheritanceStatePerClass, Mappings mappings)
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, Mappings mappings)
getRelativePathback to summary
public static String getRelativePath(PropertyHolder propertyHolder, String propertyName)
isEmptyAnnotationValueback to summary
public static boolean isEmptyAnnotationValue(String annotationString)
makeIdGeneratorback to summary
public static void makeIdGenerator(SimpleValue id, String generatorType, String generatorName, Mappings mappings, Map<String, IdGenerator> localGenerators)

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