|
||||||||||
| 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 java.lang.String |
candidateTableGroupName
Name of the table-group to use for the candidate(s) (optional, see SQLStatement). |
protected java.lang.Class |
candidateType
Candidate type to query. |
protected boolean |
includeSubclasses
Whether to include iteration through subclasses of the candidate. |
protected RDBMSManager |
storeMgr
Manager for the datastore. |
| Constructor Summary | |
|---|---|
AbstractStatementGenerator(RDBMSManager storeMgr,
java.lang.Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
java.lang.String candidateTableGroupName)
Constructor for the case where we select the candidate table. |
|
AbstractStatementGenerator(RDBMSManager storeMgr,
java.lang.Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
java.lang.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(java.lang.String name)
Whether the generator has a particular option set. |
StatementGenerator |
setOption(java.lang.String name)
Method to set a property. |
StatementGenerator |
unsetOption(java.lang.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 |
| Field Detail |
|---|
protected final RDBMSManager storeMgr
protected java.lang.Class candidateType
protected final boolean includeSubclasses
protected org.datanucleus.store.mapped.DatastoreClass candidateTable
protected org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias
protected java.lang.String candidateTableGroupName
| Constructor Detail |
|---|
public AbstractStatementGenerator(RDBMSManager storeMgr,
java.lang.Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
java.lang.String candidateTableGroupName)
storeMgr - Store ManagercandidateType - 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(RDBMSManager storeMgr,
java.lang.Class candidateType,
boolean subclasses,
org.datanucleus.store.mapped.DatastoreIdentifier candidateTableAlias,
java.lang.String candidateTableGroupName,
org.datanucleus.store.mapped.DatastoreContainerObject joinTable,
org.datanucleus.store.mapped.DatastoreIdentifier joinTableAlias,
org.datanucleus.store.mapped.mapping.JavaTypeMapping joinElementMapping)
storeMgr - Store ManagercandidateType - 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(java.lang.String name)
StatementGenerator
setOption in interface StatementGeneratorname - Name of the propertypublic StatementGenerator unsetOption(java.lang.String name)
StatementGenerator
unsetOption in interface StatementGeneratorname - Name of the propertypublic boolean hasOption(java.lang.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 | |||||||||