Z - the source typeX - the target typepublic abstract class AbstractFrom<Z,X> extends ParentPath<Z,X> implements From<Z,X>, Joinable
Serves as a factory for Joins of associations, embeddables, and collections belonging to the type, and for Paths of attributes belonging to the type.
| Constructor and Description |
|---|
AbstractFrom(AbstractFrom<?,Z> parent,
TypeImpl<X> type,
JoinedMapping<? super Z,?,X> mapping,
JoinType joinType)
Constructor for joined types
|
AbstractFrom(EntityTypeImpl<X> entity)
Constructor for root types
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureAlias(BaseQueryImpl<?> query)
Ensure that the alias is assigned.
|
<Y> Fetch<X,Y> |
fetch(PluralAttribute<? super X,?,Y> attribute) |
<Y> Fetch<X,Y> |
fetch(PluralAttribute<? super X,?,Y> attribute,
JoinType jt) |
<Y> Fetch<X,Y> |
fetch(SingularAttribute<? super X,Y> attribute) |
<Y> Fetch<X,Y> |
fetch(SingularAttribute<? super X,Y> attribute,
JoinType jt) |
<Y> Fetch<X,Y> |
fetch(String attributeName) |
<Y> Fetch<X,Y> |
fetch(String attributeName,
JoinType jt) |
String |
generateDiscrimination(boolean noQualification)
Returns the restriction based on discrimination.
|
String |
generateJpqlJoins(AbstractCriteriaQueryImpl<?> criteriaQuery)
Returns the JPQL joins fragment.
|
String |
generateJpqlRestriction(BaseQueryImpl<?> query)
Returns the JPQL where fragment.
|
String |
generateJpqlSelect(AbstractCriteriaQueryImpl<?> query,
boolean selected)
Returns the JPQL select fragment.
|
void |
generateSqlJoins(AbstractCriteriaQueryImpl<?> query,
Map<Joinable,String> joins)
Generates SQL joins fragment.
|
String |
generateSqlSelect(AbstractCriteriaQueryImpl<?> query,
boolean selected)
Returns the SQL select fragment.
|
From<Z,X> |
getCorrelationParent() |
EntityTypeImpl<X> |
getEntity()
Returns the entity of the from.
|
Set<Fetch<X,?>> |
getFetches() |
FetchParentImpl<Z,X> |
getFetchRoot()
Returns the fetchRoot of the AbstractFrom.
|
Set<Join<X,?>> |
getJoins() |
String[] |
getSqlRestrictionFragments(BaseQueryImpl<?> query)
Returns the SQL restriction fragments.
|
String[] |
getSqlRestrictionFragments(BaseQueryImpl<?> query,
MapJoinImpl.MapSelectType selectType)
Returns the SQL restriction in pairs of table alias and column.
|
String |
getTableAlias(BaseQueryImpl<?> query,
AbstractTable table)
Returns the alias for the table.
|
X |
handle(QueryImpl<?> query,
SessionImpl session,
ResultSet row)
Handles the row.
|
boolean |
isCorrelated() |
boolean |
isEntityList()
Returns if the selection is comprises of entities only.
|
<Y> CollectionJoinImpl<X,Y> |
join(CollectionAttribute<? super X,Y> collection) |
<Y> CollectionJoinImpl<X,Y> |
join(CollectionAttribute<? super X,Y> collection,
JoinType jt) |
<Y> ListJoinImpl<X,Y> |
join(ListAttribute<? super X,Y> list) |
<Y> ListJoinImpl<X,Y> |
join(ListAttribute<? super X,Y> list,
JoinType jt) |
<K,V> MapJoinImpl<X,K,V> |
join(MapAttribute<? super X,K,V> map) |
<K,V> MapJoinImpl<X,K,V> |
join(MapAttribute<? super X,K,V> map,
JoinType jt) |
<Y> SetJoinImpl<X,Y> |
join(SetAttribute<? super X,Y> set) |
<Y> SetJoinImpl<X,Y> |
join(SetAttribute<? super X,Y> set,
JoinType jt) |
<Y> AbstractJoin<X,Y> |
join(SingularAttribute<? super X,Y> attribute) |
<Y> AbstractJoin<X,Y> |
join(SingularAttribute<? super X,Y> attribute,
JoinType jt) |
<Y> AbstractJoin<X,Y> |
join(String attributeName) |
<Y> AbstractJoin<X,Y> |
join(String attributeName,
JoinType jt) |
<Y> CollectionJoinImpl<X,Y> |
joinCollection(String attributeName) |
<Y> CollectionJoinImpl<X,Y> |
joinCollection(String attributeName,
JoinType jt) |
<Y> ListJoinImpl<X,Y> |
joinList(String attributeName) |
<Y> ListJoinImpl<X,Y> |
joinList(String attributeName,
JoinType jt) |
<K,V> MapJoinImpl<X,K,V> |
joinMap(String attributeName) |
<K,V> MapJoinImpl<X,K,V> |
joinMap(String attributeName,
JoinType jt) |
<Y> SetJoinImpl<X,Y> |
joinSet(String attributeName) |
<Y> SetJoinImpl<X,Y> |
joinSet(String attributeName,
JoinType jt) |
void |
select(boolean selected)
Updates the selected status.
|
Expression<Class<? extends X>> |
type() |
get, get, get, get, getExpression, getMappingcannotDereference, getParentPath, getRootPathas, getConverter, in, in, in, in, isNotNull, isNull, setConverteralias, getAlias, getCompoundSelectionItems, isCompoundSelectiongetJavaTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, get, get, get, getModel, getParentPathas, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, isCompoundSelectiongetAlias, getJavaTypepublic AbstractFrom(AbstractFrom<?,Z> parent, TypeImpl<X> type, JoinedMapping<? super Z,?,X> mapping, JoinType joinType)
parent - the parenttype - the joined typemapping - the join mappingjoinType - the join typepublic AbstractFrom(EntityTypeImpl<X> entity)
entity - the entityprotected void ensureAlias(BaseQueryImpl<?> query)
query - the criteria querypublic <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> attribute)
fetch in interface FetchParent<Z,X>public <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> attribute, JoinType jt)
fetch in interface FetchParent<Z,X>public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> attribute)
fetch in interface FetchParent<Z,X>public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> attribute, JoinType jt)
fetch in interface FetchParent<Z,X>public <Y> Fetch<X,Y> fetch(String attributeName)
fetch in interface FetchParent<Z,X>public <Y> Fetch<X,Y> fetch(String attributeName, JoinType jt)
fetch in interface FetchParent<Z,X>public String generateDiscrimination(boolean noQualification)
noQualification - if the fields should not be qualifiednullpublic String generateJpqlJoins(AbstractCriteriaQueryImpl<?> criteriaQuery)
criteriaQuery - the criteria querypublic String generateJpqlRestriction(BaseQueryImpl<?> query)
generateJpqlRestriction in class AbstractExpression<X>query - the querypublic String generateJpqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected)
generateJpqlSelect in class AbstractSelection<X>query - the criteria queryselected - if the selection is selectedpublic void generateSqlJoins(AbstractCriteriaQueryImpl<?> query, Map<Joinable,String> joins)
query - the queryjoins - the map of joinspublic String generateSqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected)
generateSqlSelect in class AbstractSelection<X>query - the queryselected - if the selection is selectedpublic From<Z,X> getCorrelationParent()
getCorrelationParent in interface From<Z,X>public EntityTypeImpl<X> getEntity()
public Set<Fetch<X,?>> getFetches()
getFetches in interface FetchParent<Z,X>public FetchParentImpl<Z,X> getFetchRoot()
getFetchRoot in class ParentPath<Z,X>public String[] getSqlRestrictionFragments(BaseQueryImpl<?> query)
getSqlRestrictionFragments in class AbstractSelection<X>query - the querypublic String[] getSqlRestrictionFragments(BaseQueryImpl<?> query, MapJoinImpl.MapSelectType selectType)
query - the queryselectType - the select typepublic String getTableAlias(BaseQueryImpl<?> query, AbstractTable table)
if table does not have an alias, it is generated.
getTableAlias in interface Joinablequery - the querytable - the tablepublic X handle(QueryImpl<?> query, SessionImpl session, ResultSet row) throws SQLException
handle in class AbstractSelection<X>query - the querysession - the sessionrow - the rowSQLException - thrown in case of an underlying SQL Errorpublic boolean isCorrelated()
isCorrelated in interface From<Z,X>public boolean isEntityList()
isEntityList in class AbstractSelection<X>public <Y> CollectionJoinImpl<X,Y> join(CollectionAttribute<? super X,Y> collection)
public <Y> CollectionJoinImpl<X,Y> join(CollectionAttribute<? super X,Y> collection, JoinType jt)
public <Y> ListJoinImpl<X,Y> join(ListAttribute<? super X,Y> list)
public <Y> ListJoinImpl<X,Y> join(ListAttribute<? super X,Y> list, JoinType jt)
public <K,V> MapJoinImpl<X,K,V> join(MapAttribute<? super X,K,V> map)
public <K,V> MapJoinImpl<X,K,V> join(MapAttribute<? super X,K,V> map, JoinType jt)
public <Y> SetJoinImpl<X,Y> join(SetAttribute<? super X,Y> set)
public <Y> SetJoinImpl<X,Y> join(SetAttribute<? super X,Y> set, JoinType jt)
public <Y> AbstractJoin<X,Y> join(SingularAttribute<? super X,Y> attribute)
public <Y> AbstractJoin<X,Y> join(SingularAttribute<? super X,Y> attribute, JoinType jt)
public <Y> AbstractJoin<X,Y> join(String attributeName)
public <Y> AbstractJoin<X,Y> join(String attributeName, JoinType jt)
public <Y> CollectionJoinImpl<X,Y> joinCollection(String attributeName)
joinCollection in interface From<Z,X>public <Y> CollectionJoinImpl<X,Y> joinCollection(String attributeName, JoinType jt)
joinCollection in interface From<Z,X>public <Y> ListJoinImpl<X,Y> joinList(String attributeName)
public <Y> ListJoinImpl<X,Y> joinList(String attributeName, JoinType jt)
public <K,V> MapJoinImpl<X,K,V> joinMap(String attributeName)
public <K,V> MapJoinImpl<X,K,V> joinMap(String attributeName, JoinType jt)
public <Y> SetJoinImpl<X,Y> joinSet(String attributeName)
public <Y> SetJoinImpl<X,Y> joinSet(String attributeName, JoinType jt)
public void select(boolean selected)
selected - if selectedCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.