org.hibernate.persister.entity
Class AbstractPropertyMapping

java.lang.Object
  extended by org.hibernate.persister.entity.AbstractPropertyMapping
All Implemented Interfaces:
PropertyMapping
Direct Known Subclasses:
BasicEntityPropertyMapping, CompositeElementPropertyMapping

public abstract class AbstractPropertyMapping
extends Object
implements PropertyMapping

Basic implementation of the PropertyMapping contract.

Author:
Gavin King

Constructor Summary
AbstractPropertyMapping()
           
 
Method Summary
protected  void addPropertyPath(String path, Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates)
           
 String[] getColumnNames(String propertyName)
           
protected abstract  String getEntityName()
           
 String[] getIdentifierColumnNames()
           
 String[] getIdentifierColumnReaders()
           
 String[] getIdentifierColumnReaderTemplates()
           
protected  void initComponentPropertyPaths(String path, CompositeType type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates, Mapping factory)
           
protected  void initIdentifierPropertyPaths(String path, EntityType etype, String[] columns, String[] columnReaders, String[] columnReaderTemplates, Mapping factory)
           
protected  void initPropertyPaths(String path, Type type, String[] columns, String[] columnReaders, String[] columnReaderTemplates, String[] formulaTemplates, Mapping factory)
           
protected  QueryException propertyException(String propertyName)
           
 String[] toColumns(String propertyName)
          Given a property path, return the corresponding column name(s).
 String[] toColumns(String alias, String propertyName)
          Given a query alias and a property path, return the qualified column name
 Type toType(String propertyName)
          Given a component path expression, get the type of the property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.persister.entity.PropertyMapping
getType
 

Constructor Detail

AbstractPropertyMapping

public AbstractPropertyMapping()
Method Detail

getIdentifierColumnNames

public String[] getIdentifierColumnNames()

getIdentifierColumnReaderTemplates

public String[] getIdentifierColumnReaderTemplates()

getIdentifierColumnReaders

public String[] getIdentifierColumnReaders()

getEntityName

protected abstract String getEntityName()

toType

public Type toType(String propertyName)
            throws QueryException
Description copied from interface: PropertyMapping
Given a component path expression, get the type of the property

Specified by:
toType in interface PropertyMapping
Throws:
QueryException

propertyException

protected final QueryException propertyException(String propertyName)
                                          throws QueryException
Throws:
QueryException

getColumnNames

public String[] getColumnNames(String propertyName)

toColumns

public String[] toColumns(String alias,
                          String propertyName)
                   throws QueryException
Description copied from interface: PropertyMapping
Given a query alias and a property path, return the qualified column name

Specified by:
toColumns in interface PropertyMapping
Throws:
QueryException

toColumns

public String[] toColumns(String propertyName)
                   throws QueryException
Description copied from interface: PropertyMapping
Given a property path, return the corresponding column name(s).

Specified by:
toColumns in interface PropertyMapping
Throws:
QueryException

addPropertyPath

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

initPropertyPaths

protected void initPropertyPaths(String path,
                                 Type type,
                                 String[] columns,
                                 String[] columnReaders,
                                 String[] columnReaderTemplates,
                                 String[] formulaTemplates,
                                 Mapping factory)
                          throws MappingException
Throws:
MappingException

initIdentifierPropertyPaths

protected void initIdentifierPropertyPaths(String path,
                                           EntityType etype,
                                           String[] columns,
                                           String[] columnReaders,
                                           String[] columnReaderTemplates,
                                           Mapping factory)
                                    throws MappingException
Throws:
MappingException

initComponentPropertyPaths

protected void initComponentPropertyPaths(String path,
                                          CompositeType type,
                                          String[] columns,
                                          String[] columnReaders,
                                          String[] columnReaderTemplates,
                                          String[] formulaTemplates,
                                          Mapping factory)
                                   throws MappingException
Throws:
MappingException


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.