|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.sql.AbstractStatementGenerator
public abstract class AbstractStatementGenerator
Abstract generator of SQLStatements. Based around a candidate(s) and optionally including subclasses. If the candidate type has no table of its own (using "subclass-table") and there isn't a single subclass with its own table then throws a NucleusException since there is no root table to select. Accepts options controlling the generation of the SQL.
| Field Summary | |
|---|---|
protected org.datanucleus.store.mapped.DatastoreClass |
candidateTable
Table where the candidate objects are stored. |
protected org.datanucleus.store.mapped.DatastoreIdentifier |
candidateTableAlias
Alias for the candidate table in the SQL statement. |
protected String |
candidateTableGroupName
Name of the table-group to use for the candidate(s) (optional, see SQLStatement). |
protected Class |
candidateType
Candidate type to query. |
protected org.datanucleus.ClassLoaderResolver |
clr
ClassLoader resolver. |
protected boolean |
includeSubclasses
Whether to include iteration through subclasses of the candidate. |
protected SQLStatement |
parentStmt
Parent statement. |
protected RDBMSStoreManager |
storeMgr
Manager for the datastore. |
| Fields inherited from interface org.datanucleus.store.rdbms.sql.StatementGenerator |
|---|
OPTION_ALLOW_NULLS, OPTION_RESTRICT_DISCRIM, OPTION_SELECT_NUCLEUS_TYPE |
| Constructor Summary | |
|---|---|
AbstractStatementGenerator(RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr,
Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
String candidateTableGroupName)
Constructor for the case where we select the candidate table. |
|
AbstractStatementGenerator(RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr,
Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
String candidateTableGroupName,
org.datanucleus.store.mapped.DatastoreContainerObject joinTable,
org.datanucleus.store.mapped.DatastoreIdentifier joinTableAlias,
org.datanucleus.store.mapped.mapping.JavaTypeMapping joinElementMapping)
Constructor for the case where we select the join table and join to the candidate table. |
|
| Method Summary | |
|---|---|
boolean |
hasOption(String name)
Whether the generator has a particular option set. |
StatementGenerator |
setOption(String name)
Method to set a property. |
StatementGenerator |
unsetOption(String name)
Method to unset a property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.datanucleus.store.rdbms.sql.StatementGenerator |
|---|
getStatement, setParentStatement |
| Field Detail |
|---|
protected final RDBMSStoreManager storeMgr
protected final org.datanucleus.ClassLoaderResolver clr
protected SQLStatement parentStmt
protected Class candidateType
protected final boolean includeSubclasses
protected org.datanucleus.store.mapped.DatastoreClass candidateTable
protected org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias
protected String candidateTableGroupName
| Constructor Detail |
|---|
public AbstractStatementGenerator(RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr,
Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
String candidateTableGroupName)
storeMgr - Store Managerclr - ClassLoader resolvercandidateType - Candidate root typesubclasses - Whether to include subclassescandidateTableAlias - Alias for the candidate (optional)candidateTableGroupName - Name of the table group for the candidate(s) (optional)
public AbstractStatementGenerator(RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr,
Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
String candidateTableGroupName,
org.datanucleus.store.mapped.DatastoreContainerObject joinTable,
org.datanucleus.store.mapped.DatastoreIdentifier joinTableAlias,
org.datanucleus.store.mapped.mapping.JavaTypeMapping joinElementMapping)
storeMgr - Store Managerclr - ClassLoader resolvercandidateType - Candidate root typesubclasses - Whether to include subclassescandidateTableAlias - Alias for the candidate (optional)candidateTableGroupName - Name of the table group for the candidate(s) (optional)joinTable - Join tablejoinTableAlias - Alias for the join tablejoinElementMapping - Mapping to the candidate from the join table| Method Detail |
|---|
public StatementGenerator setOption(String name)
StatementGenerator
setOption in interface StatementGeneratorname - Name of the propertypublic StatementGenerator unsetOption(String name)
StatementGenerator
unsetOption in interface StatementGeneratorname - Name of the propertypublic boolean hasOption(String name)
StatementGenerator
hasOption in interface StatementGeneratorname - Name of the option
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||