Top Description Fields Constructors Methods
org.hibernate.persister.entity

public abstract Class AbstractPropertyMapping

extends Object
implements PropertyMapping
Class Inheritance
All Implemented Interfaces
org.hibernate.persister.entity.PropertyMapping
Known Direct Subclasses
org.hibernate.persister.entity.BasicEntityPropertyMapping, org.hibernate.persister.collection.CompositeElementPropertyMapping
Imports
java.util.HashMap, .HashSet, .Map, .Set, org.hibernate.MappingException, .QueryException, org.hibernate.boot.spi.MetadataImplementor, org.hibernate.engine.spi.Mapping, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.mapping.Collection, .PersistentClass, org.hibernate.sql.Template, org.hibernate.type.AnyType, .AssociationType, .CollectionType, .CompositeType, .EmbeddedComponentType, .EntityType, .ManyToOneType, .OneToOneType, .SpecialOneToOneType, .Type

Basic implementation of the PropertyMapping contract.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final Map<String, String[]>
private final Map<String, String[]>
private final Map<String, String[]>
private Set<String>
private final Map<String, String[]>
private static final CoreMessageLogger
private final Map<String, Type>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
addPropertyPath(String path, Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates)

Only kept around for compatibility reasons since this seems to be API.
protected void
addPropertyPath(String path, Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates, Mapping factory)

private static String
extendPath(String path, String property)

public String[]
getColumnNames(String propertyName)

private PersistentClass
private Type
getCommonType(MetadataImplementor metadata, EntityType entityType1, EntityType entityType2)

protected abstract String
public String[]
public String[]
public String[]
private boolean
hasNonIdentifierPropertyNamedId(final EntityType entityType, final Mapping factory)

protected void
initComponentPropertyPaths(final String path, final CompositeType type, final String[] columns, final String[] columnReaders, final String[] columnReaderTemplates, String[] formulaTemplates, final Mapping factory)

protected void
initIdentifierPropertyPaths(final String path, final EntityType etype, final String[] columns, final String[] columnReaders, final String[] columnReaderTemplates, final Mapping factory)

protected void
initIdentifierPropertyPaths(final String path, final EntityType etype, final String[] columns, final String[] columnReaders, final String[] columnReaderTemplates, final String[] formulaTemplates, final Mapping factory)

protected void
initPropertyPaths(final String path, final Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, final String[] formulaTemplates, final Mapping factory)

private void
logDuplicateRegistration(String path, Type existingType, Type type)

private void
logIncompatibleRegistration(String path, Type existingType, Type type)

protected final QueryException
propertyException(String propertyName)

public String[]
toColumns(String alias, String propertyName)

Implements org.hibernate.persister.entity.PropertyMapping.toColumns.

Obtain aliased column/formula fragments for the specified property path.
public String[]
toColumns(String propertyName)

Implements org.hibernate.persister.entity.PropertyMapping.toColumns.

Given a property path, return the corresponding column name(s).
public Type
toType(String propertyName)

Implements org.hibernate.persister.entity.PropertyMapping.toType.

Given a component path expression, get the type of the property
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnReadersByPropertyPathback to summary
private final Map<String, String[]> columnReadersByPropertyPath
columnReaderTemplatesByPropertyPathback to summary
private final Map<String, String[]> columnReaderTemplatesByPropertyPath
columnsByPropertyPathback to summary
private final Map<String, String[]> columnsByPropertyPath
duplicateIncompatiblePathsback to summary
private Set<String> duplicateIncompatiblePaths
formulaTemplatesByPropertyPathback to summary
private final Map<String, String[]> formulaTemplatesByPropertyPath
LOGback to summary
private static final CoreMessageLogger LOG
typesByPropertyPathback to summary
private final Map<String, Type> typesByPropertyPath

Constructor Detail

AbstractPropertyMappingback to summary
public AbstractPropertyMapping()

Method Detail

addPropertyPathback to summary
protected void addPropertyPath(String path, Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates)

Only kept around for compatibility reasons since this seems to be API.

Annotations
@Deprecated
addPropertyPathback to summary
protected void addPropertyPath(String path, Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates, Mapping factory)
extendPathback to summary
private static String extendPath(String path, String property)
getColumnNamesback to summary
public String[] getColumnNames(String propertyName)
getCommonPersistentClassback to summary
private PersistentClass getCommonPersistentClass(PersistentClass clazz1, PersistentClass clazz2)
getCommonTypeback to summary
private Type getCommonType(MetadataImplementor metadata, EntityType entityType1, EntityType entityType2)
getEntityNameback to summary
protected abstract String getEntityName()
getIdentifierColumnNamesback to summary
public String[] getIdentifierColumnNames()
getIdentifierColumnReadersback to summary
public String[] getIdentifierColumnReaders()
getIdentifierColumnReaderTemplatesback to summary
public String[] getIdentifierColumnReaderTemplates()
hasNonIdentifierPropertyNamedIdback to summary
private boolean hasNonIdentifierPropertyNamedId(final EntityType entityType, final Mapping factory)
initComponentPropertyPathsback to summary
protected void initComponentPropertyPaths(final String path, final CompositeType type, final String[] columns, final String[] columnReaders, final String[] columnReaderTemplates, String[] formulaTemplates, final Mapping factory) throws MappingException
initIdentifierPropertyPathsback to summary
protected void initIdentifierPropertyPaths(final String path, final EntityType etype, final String[] columns, final String[] columnReaders, final String[] columnReaderTemplates, final Mapping factory) throws MappingException
initIdentifierPropertyPathsback to summary
protected void initIdentifierPropertyPaths(final String path, final EntityType etype, final String[] columns, final String[] columnReaders, final String[] columnReaderTemplates, final String[] formulaTemplates, final Mapping factory) throws MappingException
initPropertyPathsback to summary
protected void initPropertyPaths(final String path, final Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, final String[] formulaTemplates, final Mapping factory) throws MappingException
logDuplicateRegistrationback to summary
private void logDuplicateRegistration(String path, Type existingType, Type type)
logIncompatibleRegistrationback to summary
private void logIncompatibleRegistration(String path, Type existingType, Type type)
propertyExceptionback to summary
protected final QueryException propertyException(String propertyName) throws QueryException
toColumnsback to summary
public String[] toColumns(String alias, String propertyName) throws QueryException

Implements org.hibernate.persister.entity.PropertyMapping.toColumns.

Doc from org.hibernate.persister.entity.PropertyMapping.toColumns.

Obtain aliased column/formula fragments for the specified property path.

toColumnsback to summary
public String[] toColumns(String propertyName) throws QueryException

Implements org.hibernate.persister.entity.PropertyMapping.toColumns.

Doc from org.hibernate.persister.entity.PropertyMapping.toColumns.

Given a property path, return the corresponding column name(s).

toTypeback to summary
public Type toType(String propertyName) throws QueryException

Implements org.hibernate.persister.entity.PropertyMapping.toType.

Doc from org.hibernate.persister.entity.PropertyMapping.toType.

Given a component path expression, get the type of the property