Package org.datanucleus.store.rdbms.sql
Interface SelectStatementGenerator
-
- All Known Implementing Classes:
AbstractSelectStatementGenerator,DiscriminatorStatementGenerator,UnionStatementGenerator
public interface SelectStatementGeneratorGenerator of SQL SELECT Statements.
-
-
Field Summary
Fields Modifier and Type Field Description static StringOPTION_ALLOW_NULLSOption to allow null values as elements of an array or collection.static StringOPTION_DONT_RESTRICT_DISCRIMOption to not add a WHERE clause to restrict to the discriminator value.static StringOPTION_INCLUDE_SOFT_DELETESOption to omit a WHERE clause restricting to non-soft-deleted objects (only relevant if the candidate has soft-delete enabled.static StringOPTION_RESTRICT_DISCRIMOption to add a WHERE clause to restrict to the discriminator value.static StringOPTION_SELECT_DN_TYPEOption to add "DN_TYPE" to the SELECT clause as kind of discriminator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SelectStatementgetStatement(org.datanucleus.ExecutionContext ec)Accessor for the statement.booleanhasOption(String name)Whether the generator has a particular option set.SelectStatementGeneratorsetOption(String name)Method to set a property.voidsetParentStatement(SQLStatement stmt)Method to set the parent statement.SelectStatementGeneratorunsetOption(String name)Method to unset a property.
-
-
-
Field Detail
-
OPTION_ALLOW_NULLS
static final String OPTION_ALLOW_NULLS
Option to allow null values as elements of an array or collection.- See Also:
- Constant Field Values
-
OPTION_SELECT_DN_TYPE
static final String OPTION_SELECT_DN_TYPE
Option to add "DN_TYPE" to the SELECT clause as kind of discriminator.- See Also:
- Constant Field Values
-
OPTION_RESTRICT_DISCRIM
static final String OPTION_RESTRICT_DISCRIM
Option to add a WHERE clause to restrict to the discriminator value.- See Also:
- Constant Field Values
-
OPTION_DONT_RESTRICT_DISCRIM
static final String OPTION_DONT_RESTRICT_DISCRIM
Option to not add a WHERE clause to restrict to the discriminator value.- See Also:
- Constant Field Values
-
OPTION_INCLUDE_SOFT_DELETES
static final String OPTION_INCLUDE_SOFT_DELETES
Option to omit a WHERE clause restricting to non-soft-deleted objects (only relevant if the candidate has soft-delete enabled.- See Also:
- Constant Field Values
-
-
Method Detail
-
getStatement
SelectStatement getStatement(org.datanucleus.ExecutionContext ec)
Accessor for the statement.- Parameters:
ec- ExecutionContext- Returns:
- The SQLStatement
-
setParentStatement
void setParentStatement(SQLStatement stmt)
Method to set the parent statement. Must be set before calling getStatement().- Parameters:
stmt- The parent statement
-
setOption
SelectStatementGenerator setOption(String name)
Method to set a property.- Parameters:
name- Name of the property- Returns:
- This generator
-
unsetOption
SelectStatementGenerator unsetOption(String name)
Method to unset a property.- Parameters:
name- Name of the property- Returns:
- This generator
-
hasOption
boolean hasOption(String name)
Whether the generator has a particular option set.- Parameters:
name- Name of the option- Returns:
- Whether it is set
-
-