public class SessionFactoryHelper extends Object
SessionFactoryImplementor during translation of an HQL query.| Constructor and Description | 
|---|
SessionFactoryHelper(SessionFactoryImplementor sfi)
Construct a new SessionFactoryHelper instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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,
                  JoinType 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. 
 | 
Type | 
findFunctionReturnType(String functionName,
                      SQLFunction sqlFunction,
                      antlr.collections.AST firstArgument)  | 
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. 
 | 
PropertyMapping | 
getCollectionPropertyMapping(String role)
Retrieve a PropertyMapping describing the given collection role. 
 | 
int | 
getColumnSpan(Type type)
Retrieve 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 inheritance 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. 
 | 
public SessionFactoryHelper(SessionFactoryImplementor sfi)
sfi - The SessionFactory impl to be encapsulated.public SessionFactoryImplementor getFactory()
public boolean hasPhysicalDiscriminatorColumn(Queryable persister)
persister - The persister to be checked.public String getImportedClassName(String className)
className - The potentially unqualified class namepublic 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 nameantlr.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 PropertyMapping getCollectionPropertyMapping(String role)
role - The collection role for which to retrieve the property mapping.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, JoinType 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 qualifying 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 locatepublic Type findFunctionReturnType(String functionName, antlr.collections.AST first)
functionName - The function name.first - The first argument expression.public Type findFunctionReturnType(String functionName, SQLFunction sqlFunction, antlr.collections.AST firstArgument)
public boolean isStrictJPAQLComplianceEnabled()
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.