Interface SelectStatementGenerator
- All Known Implementing Classes:
AbstractSelectStatementGenerator, DiscriminatorStatementGenerator, UnionStatementGenerator
public interface SelectStatementGenerator
Generator of SQL SELECT Statements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOption to allow null values as elements of an array or collection.static final StringOption to not add a WHERE clause to restrict to the discriminator value.static final StringOption to omit a WHERE clause restricting to non-soft-deleted objects (only relevant if the candidate has soft-delete enabled.static final StringOption to add a WHERE clause to restrict to the discriminator value.static final StringOption to add "DN_TYPE" to the SELECT clause as kind of discriminator. -
Method Summary
Modifier and TypeMethodDescriptiongetStatement(org.datanucleus.ExecutionContext ec) Accessor for the statement.booleanWhether the generator has a particular option set.Method to set a property.voidMethod to set the parent statement.unsetOption(String name) Method to unset a property.
-
Field Details
-
OPTION_ALLOW_NULLS
Option to allow null values as elements of an array or collection.- See Also:
-
OPTION_SELECT_DN_TYPE
Option to add "DN_TYPE" to the SELECT clause as kind of discriminator.- See Also:
-
OPTION_RESTRICT_DISCRIM
Option to add a WHERE clause to restrict to the discriminator value.- See Also:
-
OPTION_DONT_RESTRICT_DISCRIM
Option to not add a WHERE clause to restrict to the discriminator value.- See Also:
-
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:
-
-
Method Details
-
getStatement
Accessor for the statement.- Parameters:
ec- ExecutionContext- Returns:
- The SQLStatement
-
setParentStatement
Method to set the parent statement. Must be set before calling getStatement().- Parameters:
stmt- The parent statement
-
setOption
Method to set a property.- Parameters:
name- Name of the property- Returns:
- This generator
-
unsetOption
Method to unset a property.- Parameters:
name- Name of the property- Returns:
- This generator
-
hasOption
Whether the generator has a particular option set.- Parameters:
name- Name of the option- Returns:
- Whether it is set
-