|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate.persister.AbstractPropertyMapping net.sf.hibernate.persister.AbstractEntityPersister net.sf.hibernate.persister.NormalizedEntityPersister
A ClassPersister implementing the normalized "table-per-subclass" mapping strategy.
Field Summary |
Fields inherited from class net.sf.hibernate.persister.AbstractEntityPersister |
ENTITY_CLASS |
Fields inherited from interface net.sf.hibernate.persister.ClassPersister |
ENTITY_ID |
Constructor Summary | |
NormalizedEntityPersister(PersistentClass model,
SessionFactoryImplementor factory)
|
Method Summary | |
int |
countSubclassProperties()
How many properties are there, for this class and all subclasses. |
protected int |
dehydrate(Serializable id,
Object[] fields,
boolean[] includeProperty,
PreparedStatement[] statements,
SessionImplementor session)
Marshall the fields of a persistent instance to a prepared statement |
void |
delete(Serializable id,
Object version,
Object object,
SessionImplementor session)
Delete an object |
int |
enableJoinedFetch(int i)
May this property be fetched using an SQL outerjoin. |
String |
fromJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the from clause part of any joins (optional operation) |
String |
fromTableFragment(String alias)
Get the main from table fragment, given a query alias. |
protected String |
generateConcreteSelectString()
|
protected String[] |
generateDeleteStrings()
Generate the SQL that deletes rows by id (and version) |
protected String[] |
generateInsertStrings(boolean identityInsert,
boolean[] includeProperty)
Generate the SQL that inserts rows |
protected String |
generateLockString()
Generate the SQL that pessimistic locks a row by id (and version) |
protected String[] |
generateUpdateStrings(boolean[] includeProperty)
Generate the SQL that updates rows by id (and version) |
protected String[] |
getActualPropertyColumnNames(int i)
|
protected String |
getConcreteSelectString()
Generate the SQL that selects a row by id, excluding subclasses |
String |
getDiscriminatorAlias()
|
String |
getDiscriminatorColumnName()
Get the name of the column used as a discriminator |
Object |
getDiscriminatorSQLValue()
Get the discriminator value for this particular concrete subclass, as a string that may be embedded in a select statement |
Type |
getDiscriminatorType()
Get the discriminator type |
protected String |
getFormulaTemplate(int i)
|
String[] |
getIdentifierColumnNames()
Get the names of columns used to persist the identifier |
String[] |
getPropertyColumnNames(int i)
Get the column names for the numbered property of this class |
Serializable[] |
getPropertySpaces()
Returns an array of objects that identify spaces in which properties of this class instance are persisted. |
protected int |
getPropertyTableNumber(String propertyName)
|
protected String[] |
getSQLDeleteStrings()
The queries that delete rows by id (and version) |
protected String[] |
getSQLIdentityInsertStrings()
The queries that insert rows, letting the database generate an id |
protected String[] |
getSQLInsertStrings()
The queries that insert rows with a given id |
protected String[] |
getSQLUpdateStrings()
The queries that update rows by id (and version) |
Class |
getSubclassForDiscriminatorValue(Object value)
Get the concrete subclass corresponding to the given discriminator value |
String[] |
getSubclassPropertyColumnNames(int i)
Return the column names used to persist the numbered property of the class or a subclass. |
String |
getSubclassPropertyName(int i)
Get the name of the numbered property of the class or a subclass. |
String |
getSubclassPropertyTableName(int i)
Return the table name used to persist the numbered property of the class or a subclass. |
Type |
getSubclassPropertyType(int i)
Get the type of the numbered property of the class or a subclass. |
String |
getTableName()
The table to join to. |
protected String |
getVersionedTableName()
|
protected String |
getVersionSelectString()
|
protected void |
handlePath(String path,
Type type)
|
Serializable |
insert(Object[] fields,
boolean[] notNull,
String[] sql,
Object object,
SessionImplementor session)
Persist an object, using a natively generated identifier |
Serializable |
insert(Object[] fields,
Object object,
SessionImplementor session)
Persist an instance, using a natively generated identifier (optional operation) |
void |
insert(Serializable id,
Object[] fields,
boolean[] notNull,
String[] sql,
Object object,
SessionImplementor session)
Persist an object |
void |
insert(Serializable id,
Object[] fields,
Object object,
SessionImplementor session)
Persist an instance |
boolean |
isCacheInvalidationRequired()
Should we always invalidate the cache instead of recaching updated state |
boolean |
isDefinedOnSubclass(int i)
Is this property defined on a subclass of the mapped class. |
Object |
load(Serializable id,
Object optionalObject,
LockMode lockMode,
SessionImplementor session)
Load an instance using either the forUpdateLoader or the outer joining loader, depending upon the value of the lock parameter |
void |
postInstantiate()
Finish the initialization of this object, once all ClassPersisters have been instantiated. |
String |
propertySelectFragment(String alias,
String suffix)
Given a query alias and an identifying suffix, render the property select fragment. |
String |
queryWhereFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the where clause fragment, given a query alias |
String[] |
toColumns(String alias,
int i)
Given the number of a property of a subclass, and a table alias, return the aliased column names. |
String[] |
toColumns(String alias,
String property)
Given a query alias and a property path, return the qualified column name |
protected void |
update(Serializable id,
Object[] fields,
boolean[] includeProperty,
boolean[] includeTable,
Object oldVersion,
Object object,
String[] sql,
SessionImplementor session)
|
void |
update(Serializable id,
Object[] fields,
int[] dirtyFields,
Object[] oldFields,
Object oldVersion,
Object object,
SessionImplementor session)
Update an object |
String |
whereJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the where clause part of any joins (optional operation) |
Methods inherited from class net.sf.hibernate.persister.AbstractPropertyMapping |
addFormulaPropertyPath, addPropertyPath, initComponentPropertyPaths, initIdentifierPropertyPaths, initPropertyPaths, initPropertyPaths, toType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.hibernate.persister.PropertyMapping |
toType |
Constructor Detail |
public NormalizedEntityPersister(PersistentClass model, SessionFactoryImplementor factory) throws HibernateException
Method Detail |
public void postInstantiate() throws MappingException
ClassPersister
MappingException
public boolean isDefinedOnSubclass(int i)
OuterJoinLoadable
public String getDiscriminatorColumnName()
OuterJoinLoadable
public String getDiscriminatorAlias()
getDiscriminatorAlias
in class AbstractEntityPersister
public Type getSubclassPropertyType(int i)
OuterJoinLoadable
public String getSubclassPropertyName(int i)
OuterJoinLoadable
public int countSubclassProperties()
OuterJoinLoadable
public String getSubclassPropertyTableName(int i)
OuterJoinLoadable
public String[] getSubclassPropertyColumnNames(int i)
OuterJoinLoadable
public String[] getPropertyColumnNames(int i)
AbstractEntityPersister
getPropertyColumnNames
in class AbstractEntityPersister
public Type getDiscriminatorType()
Loadable
public Object getDiscriminatorSQLValue()
Queryable
public Class getSubclassForDiscriminatorValue(Object value)
Loadable
public int enableJoinedFetch(int i)
OuterJoinLoadable
public Serializable[] getPropertySpaces()
ClassPersister
protected final String[] getSQLDeleteStrings()
protected final String[] getSQLInsertStrings()
protected final String[] getSQLIdentityInsertStrings()
protected final String[] getSQLUpdateStrings()
protected final String getVersionSelectString()
getVersionSelectString
in class AbstractEntityPersister
protected String[] generateDeleteStrings()
protected String[] generateInsertStrings(boolean identityInsert, boolean[] includeProperty)
protected String[] generateUpdateStrings(boolean[] includeProperty)
protected String generateLockString()
generateLockString
in class AbstractEntityPersister
protected String getConcreteSelectString()
getConcreteSelectString
in class AbstractEntityPersister
protected String generateConcreteSelectString()
protected int dehydrate(Serializable id, Object[] fields, boolean[] includeProperty, PreparedStatement[] statements, SessionImplementor session) throws SQLException, HibernateException
SQLException
HibernateException
public Object load(Serializable id, Object optionalObject, LockMode lockMode, SessionImplementor session) throws HibernateException
HibernateException
public Serializable insert(Object[] fields, Object object, SessionImplementor session) throws HibernateException
ClassPersister
HibernateException
public void insert(Serializable id, Object[] fields, Object object, SessionImplementor session) throws HibernateException
ClassPersister
HibernateException
public void insert(Serializable id, Object[] fields, boolean[] notNull, String[] sql, Object object, SessionImplementor session) throws HibernateException
HibernateException
public Serializable insert(Object[] fields, boolean[] notNull, String[] sql, Object object, SessionImplementor session) throws HibernateException
HibernateException
public void delete(Serializable id, Object version, Object object, SessionImplementor session) throws HibernateException
HibernateException
public void update(Serializable id, Object[] fields, int[] dirtyFields, Object[] oldFields, Object oldVersion, Object object, SessionImplementor session) throws HibernateException
HibernateException
protected void update(Serializable id, Object[] fields, boolean[] includeProperty, boolean[] includeTable, Object oldVersion, Object object, String[] sql, SessionImplementor session) throws HibernateException
HibernateException
protected int getPropertyTableNumber(String propertyName)
protected void handlePath(String path, Type type)
handlePath
in class AbstractPropertyMapping
public String fromTableFragment(String alias)
OuterJoinLoadable
public String getTableName()
Joinable
public String[] toColumns(String alias, String property) throws QueryException
PropertyMapping
toColumns
in interface PropertyMapping
toColumns
in class AbstractPropertyMapping
QueryException
public String[] toColumns(String alias, int i)
OuterJoinLoadable
public String propertySelectFragment(String alias, String suffix)
Queryable
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
Joinable
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
Joinable
public String queryWhereFragment(String alias, boolean innerJoin, boolean includeSubclasses) throws MappingException
Queryable
MappingException
public String[] getIdentifierColumnNames()
OuterJoinLoadable
getIdentifierColumnNames
in interface OuterJoinLoadable
getIdentifierColumnNames
in class AbstractEntityPersister
protected String[] getActualPropertyColumnNames(int i)
getActualPropertyColumnNames
in class AbstractEntityPersister
protected String getFormulaTemplate(int i)
getFormulaTemplate
in class AbstractEntityPersister
public boolean isCacheInvalidationRequired()
ClassPersister
protected String getVersionedTableName()
getVersionedTableName
in class AbstractEntityPersister
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |