Z - the source typeX - the target typepublic abstract class AbstractFrom<Z,X> extends ParentPath<Z,X> implements javax.persistence.criteria.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,
javax.persistence.criteria.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> javax.persistence.criteria.Fetch<X,Y> |
fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attribute) |
<Y> javax.persistence.criteria.Fetch<X,Y> |
fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attribute,
javax.persistence.criteria.JoinType jt) |
<Y> javax.persistence.criteria.Fetch<X,Y> |
fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute) |
<Y> javax.persistence.criteria.Fetch<X,Y> |
fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute,
javax.persistence.criteria.JoinType jt) |
<Y> javax.persistence.criteria.Fetch<X,Y> |
fetch(String attributeName) |
<Y> javax.persistence.criteria.Fetch<X,Y> |
fetch(String attributeName,
javax.persistence.criteria.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.
|
javax.persistence.criteria.From<Z,X> |
getCorrelationParent() |
EntityTypeImpl<X> |
getEntity()
Returns the entity of the from.
|
Set<javax.persistence.criteria.Fetch<X,?>> |
getFetches() |
FetchParentImpl<Z,X> |
getFetchRoot()
Returns the fetchRoot of the AbstractFrom.
|
Set<javax.persistence.criteria.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(javax.persistence.metamodel.CollectionAttribute<? super X,Y> collection) |
<Y> CollectionJoinImpl<X,Y> |
join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> collection,
javax.persistence.criteria.JoinType jt) |
<Y> ListJoinImpl<X,Y> |
join(javax.persistence.metamodel.ListAttribute<? super X,Y> list) |
<Y> ListJoinImpl<X,Y> |
join(javax.persistence.metamodel.ListAttribute<? super X,Y> list,
javax.persistence.criteria.JoinType jt) |
<K,V> MapJoinImpl<X,K,V> |
join(javax.persistence.metamodel.MapAttribute<? super X,K,V> map) |
<K,V> MapJoinImpl<X,K,V> |
join(javax.persistence.metamodel.MapAttribute<? super X,K,V> map,
javax.persistence.criteria.JoinType jt) |
<Y> SetJoinImpl<X,Y> |
join(javax.persistence.metamodel.SetAttribute<? super X,Y> set) |
<Y> SetJoinImpl<X,Y> |
join(javax.persistence.metamodel.SetAttribute<? super X,Y> set,
javax.persistence.criteria.JoinType jt) |
<Y> AbstractJoin<X,Y> |
join(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute) |
<Y> AbstractJoin<X,Y> |
join(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute,
javax.persistence.criteria.JoinType jt) |
<Y> AbstractJoin<X,Y> |
join(String attributeName) |
<Y> AbstractJoin<X,Y> |
join(String attributeName,
javax.persistence.criteria.JoinType jt) |
<Y> CollectionJoinImpl<X,Y> |
joinCollection(String attributeName) |
<Y> CollectionJoinImpl<X,Y> |
joinCollection(String attributeName,
javax.persistence.criteria.JoinType jt) |
<Y> ListJoinImpl<X,Y> |
joinList(String attributeName) |
<Y> ListJoinImpl<X,Y> |
joinList(String attributeName,
javax.persistence.criteria.JoinType jt) |
<K,V> MapJoinImpl<X,K,V> |
joinMap(String attributeName) |
<K,V> MapJoinImpl<X,K,V> |
joinMap(String attributeName,
javax.persistence.criteria.JoinType jt) |
<Y> SetJoinImpl<X,Y> |
joinSet(String attributeName) |
<Y> SetJoinImpl<X,Y> |
joinSet(String attributeName,
javax.persistence.criteria.JoinType jt) |
void |
select(boolean selected)
Updates the selected status.
|
javax.persistence.criteria.Expression<Class<? extends X>> |
type() |
get, get, get, get, getColumnAlias, getExpression, getMappingcannotDereference, getParentPath, getRootPathas, getConverter, in, in, in, in, isNotNull, isNull, notIn, notIn, notIn, notIn, setConverteralias, getAlias, getCompoundSelectionItems, isCompoundSelectiongetJavaTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitjoin, join, joinCollection, joinCollection, joinList, joinList, joinMap, joinMap, joinSet, joinSetget, get, get, get, getModel, getParentPathas, in, in, in, in, isNotNull, isNullpublic AbstractFrom(AbstractFrom<?,Z> parent, TypeImpl<X> type, JoinedMapping<? super Z,?,X> mapping, javax.persistence.criteria.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> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attribute)
public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attribute, javax.persistence.criteria.JoinType jt)
public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute)
public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute, javax.persistence.criteria.JoinType jt)
public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(String attributeName, javax.persistence.criteria.JoinType jt)
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 EntityTypeImpl<X> getEntity()
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()
public boolean isEntityList()
isEntityList in class AbstractSelection<X>public <Y> CollectionJoinImpl<X,Y> join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> collection)
public <Y> CollectionJoinImpl<X,Y> join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> collection, javax.persistence.criteria.JoinType jt)
public <Y> ListJoinImpl<X,Y> join(javax.persistence.metamodel.ListAttribute<? super X,Y> list)
public <Y> ListJoinImpl<X,Y> join(javax.persistence.metamodel.ListAttribute<? super X,Y> list, javax.persistence.criteria.JoinType jt)
public <K,V> MapJoinImpl<X,K,V> join(javax.persistence.metamodel.MapAttribute<? super X,K,V> map)
public <K,V> MapJoinImpl<X,K,V> join(javax.persistence.metamodel.MapAttribute<? super X,K,V> map, javax.persistence.criteria.JoinType jt)
public <Y> SetJoinImpl<X,Y> join(javax.persistence.metamodel.SetAttribute<? super X,Y> set)
public <Y> SetJoinImpl<X,Y> join(javax.persistence.metamodel.SetAttribute<? super X,Y> set, javax.persistence.criteria.JoinType jt)
public <Y> AbstractJoin<X,Y> join(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute)
public <Y> AbstractJoin<X,Y> join(javax.persistence.metamodel.SingularAttribute<? super X,Y> attribute, javax.persistence.criteria.JoinType jt)
public <Y> AbstractJoin<X,Y> join(String attributeName)
public <Y> AbstractJoin<X,Y> join(String attributeName, javax.persistence.criteria.JoinType jt)
public <Y> CollectionJoinImpl<X,Y> joinCollection(String attributeName)
public <Y> CollectionJoinImpl<X,Y> joinCollection(String attributeName, javax.persistence.criteria.JoinType jt)
public <Y> ListJoinImpl<X,Y> joinList(String attributeName)
public <Y> ListJoinImpl<X,Y> joinList(String attributeName, javax.persistence.criteria.JoinType jt)
public <K,V> MapJoinImpl<X,K,V> joinMap(String attributeName)
public <K,V> MapJoinImpl<X,K,V> joinMap(String attributeName, javax.persistence.criteria.JoinType jt)
public <Y> SetJoinImpl<X,Y> joinSet(String attributeName)
public <Y> SetJoinImpl<X,Y> joinSet(String attributeName, javax.persistence.criteria.JoinType jt)
public void select(boolean selected)
selected - if selectedCopyright © 2012-2013 Batoo. All Rights Reserved.