createCollectionJoinSequence
public JoinSequence createCollectionJoinSequence(QueryableCollection collPersister,
String collectionName)
Create a join sequence rooted at the given collection.
collPersister
- The persister for the collection at which the join should be rooted.collectionName
- The alias to use for qualifying column references.
- The generated join sequence.
createJoinSequence
public JoinSequence createJoinSequence()
Generate an empty join sequence instance.
- The generate join sequence.
createJoinSequence
public JoinSequence createJoinSequence(boolean implicit,
AssociationType associationType,
String tableAlias,
int joinType,
String[] columns)
Generate a join sequence representing the given association type.
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 JoinFragment
columns
- The columns making up the condition of the join.
- The generated join sequence.
findFunctionReturnType
public Type findFunctionReturnType(String functionName,
AST first)
Find the function return type given the function name and the first argument expression node.
functionName
- The function name.first
- The first argument expression.
- the function return type given the function name and the first argument expression node.
findQueryableUsingImports
public Queryable findQueryableUsingImports(String className)
Given a (potentially unqualified) class name, locate its persister.
className
- The (potentially unqualified) class name.
- The defined persister for this class, or null if none found.
findQueryableUsingImports
public static Queryable findQueryableUsingImports(SessionFactoryImplementor sfi,
String className)
Given a (potentially unqualified) class name, locate its persister.
sfi
- The session factory implementor.className
- The (potentially unqualified) class name.
- The defined persister for this class, or null if none found.
findSQLFunction
public SQLFunction findSQLFunction(String functionName)
Locate a registered sql function by name.
functionName
- The name of the function to locate
- The sql function, or null if not found.
generateColumnNames
public String[][] generateColumnNames(Type[] sqlResultTypes)
getAssociatedEntityName
public String getAssociatedEntityName(CollectionType collectionType)
Given a collection type, determine the entity name of the elements
contained within instance of that collection.
collectionType
- The collection type to check.
- The entity name of the elements of this collection.
getCollectionElementColumns
public String[] getCollectionElementColumns(String role,
String roleAlias)
Retrieves the column names corresponding to the collection elements for the given
collection role.
role
- The collection roleroleAlias
- The sql column-qualification alias (i.e., the table alias)
- the collection element columns
getCollectionPersister
public QueryableCollection getCollectionPersister(String role)
Locate the collection persister by the collection role.
role
- The collection role name.
- The defined CollectionPersister for this collection role, or null.
getColumnSpan
public int getColumnSpan(Type type)
Retreive the number of columns represented by this type.
getElementAssociationType
public AssociationType getElementAssociationType(CollectionType collectionType)
Essentially the same as SessionFactoryHelper
, but requiring that the
element type be an association type.
collectionType
- The collection type to be checked.
- The AssociationType of the elements of the collection.
getFactory
public SessionFactoryImplementor getFactory()
Get a handle to the encapsulated SessionFactory.
- The encapsulated SessionFactory.
getIdentifierOrUniqueKeyPropertyName
public 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.
entityType
- The type representing the entity.
- The corresponding property name
getImportedClassName
public String getImportedClassName(String className)
Given a (potentially unqualified) class name, locate its imported qualified name.
className
- The potentially unqualified class name
- The qualified class name.
hasPhysicalDiscriminatorColumn
public boolean hasPhysicalDiscriminatorColumn(Queryable persister)
Does the given persister define a physical discriminator column
for the purpose of inheritence discrimination?
persister
- The persister to be checked.
- True if the persister does define an actual discriminator column.
isStrictJPAQLComplianceEnabled
public boolean isStrictJPAQLComplianceEnabled()
requireClassPersister
public EntityPersister requireClassPersister(String name)
throws SemanticException
Locate the persister by class or entity name, requiring that such a persister
exist.
name
- The class or entity name
- The defined persister for this entity
requireQueryableCollection
public QueryableCollection requireQueryableCollection(String role)
throws QueryException
Locate the collection persister by the collection role, requiring that
such a persister exist.
role
- The collection role name.
- The defined CollectionPersister for this collection role.
QueryException
- Indicates that the collection persister could not be found.