Z - the source typeX - the target typepublic class FetchParentImpl<Z,X> extends Object implements FetchParent<Z,X>, Joinable
FetchParent.| Constructor and Description |
|---|
FetchParentImpl(EntityTypeImpl<X> entity) |
FetchParentImpl(JoinedMapping<? super Z,?,X> mapping) |
| Modifier and Type | Method and Description |
|---|---|
<Y> FetchImpl<X,Y> |
fetch(PluralAttribute<? super X,?,Y> attribute) |
<Y> FetchImpl<X,Y> |
fetch(PluralAttribute<? super X,?,Y> attribute,
JoinType jt) |
<Y> FetchImpl<X,Y> |
fetch(SingularAttribute<? super X,Y> attribute) |
<Y> FetchImpl<X,Y> |
fetch(SingularAttribute<? super X,Y> attribute,
JoinType jt) |
<Y> FetchImpl<X,Y> |
fetch(String attributeName) |
<Y> FetchImpl<X,Y> |
fetch(String attributeName,
JoinType jt) |
String |
generateDiscrimination(boolean noQualification)
Returns the restriction based on discrimination.
|
String |
generateJpqlFetches(String parent)
Returns the description of the fetch.
|
void |
generateSqlJoins(AbstractCriteriaQueryImpl<?> query,
List<String> selfJoins)
Generates the self SQL joins fragments.
|
void |
generateSqlJoins(AbstractCriteriaQueryImpl<?> query,
Map<Joinable,String> joins,
boolean recurse)
Generates joins SQL fragment for the fetch chain.
|
String |
generateSqlSelect(AbstractCriteriaQueryImpl<?> query,
boolean selected,
boolean root)
Returns the generated SQL fragment.
|
String |
generateSqlSelect(AbstractCriteriaQueryImpl<?> query,
boolean selected,
boolean root,
MapJoinImpl.MapSelectType selectType)
Returns the generated SQL fragment.
|
EntityTypeImpl<?> |
getEntity()
Returns the entity of the joinable.
|
Set<Fetch<X,?>> |
getFetches() |
JoinedMapping<? super Z,?,X> |
getMapping()
Returns the mapping of the fetch.
|
String |
getPrimaryTableAlias(BaseQueryImpl<?> query)
Returns the alias of the primary table.
|
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(SessionImpl session,
ResultSet row)
Handles the row.
|
EntryImpl<Object,ManagedInstance<?>> |
handle(SessionImpl session,
ResultSet row,
MapJoinImpl.MapSelectType selectType)
Handles the row.
|
EntryImpl<Object,X> |
handleElementFetch(ResultSet row)
Handles the row
|
EntryImpl<Object,X> |
handleElementFetch(ResultSet row,
MapJoinImpl.MapSelectType selectType)
Handles the row
|
EntryImpl<Object,ManagedInstance<?>> |
handleFetch(SessionImpl session,
ResultSet row,
MapJoinImpl.MapSelectType selectType)
Handles the row.
|
<Y> FetchImpl<X,Y> |
join(String attributeName,
JoinType jt)
Joins instead of fetch.
|
public FetchParentImpl(EntityTypeImpl<X> entity)
entity - the entitypublic FetchParentImpl(JoinedMapping<? super Z,?,X> mapping)
mapping - the mappingpublic final <Y> FetchImpl<X,Y> fetch(PluralAttribute<? super X,?,Y> attribute)
fetch in interface FetchParent<Z,X>public final <Y> FetchImpl<X,Y> fetch(PluralAttribute<? super X,?,Y> attribute, JoinType jt)
fetch in interface FetchParent<Z,X>public final <Y> FetchImpl<X,Y> fetch(SingularAttribute<? super X,Y> attribute)
fetch in interface FetchParent<Z,X>public final <Y> FetchImpl<X,Y> fetch(SingularAttribute<? super X,Y> attribute, JoinType jt)
fetch in interface FetchParent<Z,X>public final <Y> FetchImpl<X,Y> fetch(String attributeName)
fetch in interface FetchParent<Z,X>public <Y> FetchImpl<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 quelifiednullpublic String generateJpqlFetches(String parent)
parent - the parentpublic void generateSqlJoins(AbstractCriteriaQueryImpl<?> query, List<String> selfJoins)
query - the queryselfJoins - the list of self joinspublic void generateSqlJoins(AbstractCriteriaQueryImpl<?> query, Map<Joinable,String> joins, boolean recurse)
query - the queryjoins - the map of joinsrecurse - recurse to fetch childrenpublic String generateSqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected, boolean root)
query - the queryselected - if the item is selectedroot - if the generation is at rootpublic String generateSqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected, boolean root, MapJoinImpl.MapSelectType selectType)
query - the queryselected - if the item is selectedroot - if the generation is at rootselectType - the select typepublic EntityTypeImpl<?> getEntity()
public final Set<Fetch<X,?>> getFetches()
getFetches in interface FetchParent<Z,X>public JoinedMapping<? super Z,?,X> getMapping()
null if the fetch is rootpublic String getPrimaryTableAlias(BaseQueryImpl<?> query)
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(SessionImpl session, ResultSet row) throws SQLException
session - the sessionrow - the current rowSQLException - thrown in case of an underlying SQL Errorpublic EntryImpl<Object,ManagedInstance<?>> handle(SessionImpl session, ResultSet row, MapJoinImpl.MapSelectType selectType) throws SQLException
session - the sessionrow - the current rowselectType - the map select typeSQLException - thrown in case of an underlying SQL Errorpublic EntryImpl<Object,X> handleElementFetch(ResultSet row) throws SQLException
row - the rowSQLException - thrown in case of an underlying SQL Errorpublic EntryImpl<Object,X> handleElementFetch(ResultSet row, MapJoinImpl.MapSelectType selectType) throws SQLException
row - the rowselectType - the select typeSQLException - thrown in case of an underlying SQL Errorpublic EntryImpl<Object,ManagedInstance<?>> handleFetch(SessionImpl session, ResultSet row, MapJoinImpl.MapSelectType selectType) throws SQLException
session - the sessionrow - the current rowselectType - the map select typeSQLException - thrown in case of an underlying SQL ErrorCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.