Package org.datanucleus.store.rdbms.sql
Interface SelectStatementGenerator
- All Known Implementing Classes:
AbstractSelectStatementGenerator
,DiscriminatorStatementGenerator
,UnionStatementGenerator
public interface SelectStatementGenerator
Generator of SQL SELECT Statements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Option to allow null values as elements of an array or collection.static final String
Option to not add a WHERE clause to restrict to the discriminator value.static final String
Option to omit a WHERE clause restricting to non-soft-deleted objects (only relevant if the candidate has soft-delete enabled.static final String
Option to add a WHERE clause to restrict to the discriminator value.static final String
Option 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.boolean
Whether the generator has a particular option set.Method to set a property.void
Method 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
-