org.datanucleus.store.rdbms.sql
Interface StatementGenerator

All Known Implementing Classes:
AbstractStatementGenerator, DiscriminatorStatementGenerator, UnionStatementGenerator

public interface StatementGenerator

Generator of SQLStatements.


Field Summary
static String OPTION_ALLOW_NULLS
          Option to allow null values as elements of an array or collection.
static String OPTION_RESTRICT_DISCRIM
          Option to add a WHERE clause to restrict to the discriminator value.
static String OPTION_SELECT_NUCLEUS_TYPE
          Option to add "NUCLEUS_TYPE" to the SELECT clause as kind of discriminator.
 
Method Summary
 SQLStatement getStatement()
          Accessor for the statement.
 boolean hasOption(String name)
          Whether the generator has a particular option set.
 StatementGenerator setOption(String name)
          Method to set a property.
 void setParentStatement(SQLStatement stmt)
          Method to set the parent statement.
 StatementGenerator unsetOption(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_NUCLEUS_TYPE

static final String OPTION_SELECT_NUCLEUS_TYPE
Option to add "NUCLEUS_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
Method Detail

getStatement

SQLStatement getStatement()
Accessor for the statement.

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

StatementGenerator setOption(String name)
Method to set a property.

Parameters:
name - Name of the property

unsetOption

StatementGenerator unsetOption(String name)
Method to unset a property.

Parameters:
name - Name of the property

hasOption

boolean hasOption(String name)
Whether the generator has a particular option set.

Parameters:
name - Name of the option
Returns:
Whether it is set


Copyright © 2012. All Rights Reserved.