|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.hql.ast.util.SessionFactoryHelper
public class SessionFactoryHelper
Helper for performing common and/or complex operations with the
SessionFactoryImplementor during translation of an HQL query.
| Constructor Summary | |
|---|---|
SessionFactoryHelper(SessionFactoryImplementor sfi)
Construct a new SessionFactoryHelper instance. |
|
| Method Summary | |
|---|---|
JoinSequence |
createCollectionJoinSequence(QueryableCollection collPersister,
String collectionName)
Create a join sequence rooted at the given collection. |
JoinSequence |
createJoinSequence()
Generate an empty join sequence instance. |
JoinSequence |
createJoinSequence(boolean implicit,
AssociationType associationType,
String tableAlias,
int joinType,
String[] columns)
Generate a join sequence representing the given association type. |
Type |
findFunctionReturnType(String functionName,
antlr.collections.AST first)
Find the function return type given the function name and the first argument expression node. |
static Queryable |
findQueryableUsingImports(SessionFactoryImplementor sfi,
String className)
Given a (potentially unqualified) class name, locate its persister. |
Queryable |
findQueryableUsingImports(String className)
Given a (potentially unqualified) class name, locate its persister. |
SQLFunction |
findSQLFunction(String functionName)
Locate a registered sql function by name. |
String[][] |
generateColumnNames(Type[] sqlResultTypes)
|
String |
getAssociatedEntityName(CollectionType collectionType)
Given a collection type, determine the entity name of the elements contained within instance of that collection. |
String[] |
getCollectionElementColumns(String role,
String roleAlias)
Retrieves the column names corresponding to the collection elements for the given collection role. |
QueryableCollection |
getCollectionPersister(String role)
Locate the collection persister by the collection role. |
int |
getColumnSpan(Type type)
Retreive the number of columns represented by this type. |
AssociationType |
getElementAssociationType(CollectionType collectionType)
Essentially the same as getElementType(org.hibernate.type.CollectionType), but requiring that the
element type be an association type. |
SessionFactoryImplementor |
getFactory()
Get a handle to the encapsulated SessionFactory. |
String |
getIdentifierOrUniqueKeyPropertyName(EntityType entityType)
Determine the name of the property for the entity encapsulated by the given type which represents the id or unique-key. |
String |
getImportedClassName(String className)
Given a (potentially unqualified) class name, locate its imported qualified name. |
boolean |
hasPhysicalDiscriminatorColumn(Queryable persister)
Does the given persister define a physical discriminator column for the purpose of inheritence discrimination? |
boolean |
isStrictJPAQLComplianceEnabled()
|
EntityPersister |
requireClassPersister(String name)
Locate the persister by class or entity name, requiring that such a persister exist. |
QueryableCollection |
requireQueryableCollection(String role)
Locate the collection persister by the collection role, requiring that such a persister exist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionFactoryHelper(SessionFactoryImplementor sfi)
sfi - The SessionFactory impl to be encapsualted.| Method Detail |
|---|
public SessionFactoryImplementor getFactory()
public boolean hasPhysicalDiscriminatorColumn(Queryable persister)
persister - The persister to be checked.
public String getImportedClassName(String className)
className - The potentially unqualified class name
public Queryable findQueryableUsingImports(String className)
className - The (potentially unqualified) class name.
public static Queryable findQueryableUsingImports(SessionFactoryImplementor sfi,
String className)
sfi - The session factory implementor.className - The (potentially unqualified) class name.
public EntityPersister requireClassPersister(String name)
throws antlr.SemanticException
name - The class or entity name
antlr.SemanticException - Indicates the persister could not be foundpublic QueryableCollection getCollectionPersister(String role)
role - The collection role name.
public QueryableCollection requireQueryableCollection(String role)
throws QueryException
role - The collection role name.
QueryException - Indicates that the collection persister could not be found.
public String[] getCollectionElementColumns(String role,
String roleAlias)
role - The collection roleroleAlias - The sql column-qualification alias (i.e., the table alias)
public JoinSequence createJoinSequence()
public JoinSequence createJoinSequence(boolean implicit,
AssociationType associationType,
String tableAlias,
int joinType,
String[] columns)
implicit - Should implicit joins (theta-style) or explicit joins (ANSI-style) be renderedassociationType - The type representing the thing to be joined into.tableAlias - The table alias to use in qualifing the join conditionsjoinType - The type of join to render (inner, outer, etc); see JoinFragmentcolumns - The columns making up the condition of the join.
public JoinSequence createCollectionJoinSequence(QueryableCollection collPersister,
String collectionName)
collPersister - The persister for the collection at which the join should be rooted.collectionName - The alias to use for qualifying column references.
public String getIdentifierOrUniqueKeyPropertyName(EntityType entityType)
entityType - The type representing the entity.
QueryException - Indicates such a property could not be found.public int getColumnSpan(Type type)
type - The type.
public String getAssociatedEntityName(CollectionType collectionType)
collectionType - The collection type to check.
public AssociationType getElementAssociationType(CollectionType collectionType)
getElementType(org.hibernate.type.CollectionType), but requiring that the
element type be an association type.
collectionType - The collection type to be checked.
public SQLFunction findSQLFunction(String functionName)
functionName - The name of the function to locate
public Type findFunctionReturnType(String functionName,
antlr.collections.AST first)
functionName - The function name.first - The first argument expression.
public String[][] generateColumnNames(Type[] sqlResultTypes)
public boolean isStrictJPAQLComplianceEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||