|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.query.AbstractIteratorStatement
org.jpox.store.query.UnionIteratorStatement
Class to generate a QueryStatement for iterating through the elements of a Set. This can be in an Extent/Query for example where the user has selected a candidate class and to include/exclude subclasses. The generated query statement typically contains UNIONs for each of the possible classes involved.
To give an example, lets assume that we have class A which is the candidate and this has a subclass B. We want to find all objects of the candidate type and optionally its subclasses and we want information about what type the object is (A or B). The query will be of the form
SELECT THIS.A_ID,'org.jpox.samples.A' as JPOXMETADATA, THIS.COLUMN1, THIS.COLUMN2 FROM A THIS LEFT OUTER JOIN B SUBELEMENT0 ON SUBELEMENT0.B_ID = THIS.A_ID WHERE SUBELEMENT0.B_ID IS NULL UNION SELECT THIS.A_ID,'org.jpox.samples.B' as JPOXMETADATA, THIS.COLUMN1, THIS.COLUMN2 FROM A THIS INNER JOIN B 'ELEMENT' ON 'ELEMENT'.B_ID = THIS.A_ID
Nested Class Summary | |
static interface |
UnionIteratorStatement.AssociationEnd
One side of an association. |
Field Summary |
Fields inherited from class org.jpox.store.query.AbstractIteratorStatement |
candidateFullClassName, candidateTable, clr, dba, includeSubclasses, LOCALISER, storeMgr |
Constructor Summary | |
UnionIteratorStatement(ClassLoaderResolver clr,
java.lang.Class candidateType,
boolean includeSubclasses,
StoreManager storeMgr,
UnionIteratorStatement.AssociationEnd source)
Constructor. |
|
UnionIteratorStatement(ClassLoaderResolver clr,
java.lang.Class candidateType,
boolean includeSubclasses,
StoreManager storeMgr,
UnionIteratorStatement.AssociationEnd source,
boolean withMetadata)
Constructor. |
|
UnionIteratorStatement(ClassLoaderResolver clr,
java.lang.Class candidateType,
boolean includeSubclasses,
StoreManager storeMgr,
UnionIteratorStatement.AssociationEnd source,
java.lang.Boolean withMetadata)
Constructor. |
Method Summary | |
QueryExpression |
getQueryStatement()
Accessor for the Query Statement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UnionIteratorStatement(ClassLoaderResolver clr, java.lang.Class candidateType, boolean includeSubclasses, StoreManager storeMgr, UnionIteratorStatement.AssociationEnd source)
clr
- The ClassLoaderResolvercandidateType
- the candidate is who are are looking toincludeSubclasses
- if the subclasses of the candidate should be
included in the resultstoreMgr
- the store managersource
- the source for the associationpublic UnionIteratorStatement(ClassLoaderResolver clr, java.lang.Class candidateType, boolean includeSubclasses, StoreManager storeMgr, UnionIteratorStatement.AssociationEnd source, boolean withMetadata)
clr
- The ClassLoaderResolvercandidateType
- the candidate is who we are looking toincludeSubclasses
- if the subclasses of the candidate should be
included in the resultstoreMgr
- the store managersource
- the source for the associationwithMetadata
- if has subclasses, include the metadata in the querypublic UnionIteratorStatement(ClassLoaderResolver clr, java.lang.Class candidateType, boolean includeSubclasses, StoreManager storeMgr, UnionIteratorStatement.AssociationEnd source, java.lang.Boolean withMetadata)
clr
- The ClassLoaderResolvercandidateType
- the candidate is who we are looking toincludeSubclasses
- if the subclasses of the candidate should be
included in the resultstoreMgr
- the store managersource
- the source for the associationwithMetadata
- if has subclasses, include the metadata in the queryMethod Detail |
public QueryExpression getQueryStatement()
getQueryStatement
in class AbstractIteratorStatement
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |