primaryTable
Primary table for this statement.
DeleteStatement
, InsertStatement
, SelectStatement
, UpdateStatement
The generated SQL is cached. Any use of a mutating method, changing the composition of the statement will clear the cached SQL, and it will be regenerated when
getSQLTextis called next.
protected String
protected org.datanucleus.ClassLoaderResolver
static final String
static final String
static final String
protected SQLTableNamer
protected SQLStatement
protected SQLTable
protected QueryGenerator
protected RDBMSStoreManager
protected boolean
protected SQLText
protected Map<String,SQLTableGroup>
protected static final Map<String,SQLTableNamer>
protected BooleanExpression
SQLStatement(SQLStatement parentStmt,
RDBMSStoreManager rdbmsMgr,
Table table,
DatastoreIdentifier alias,
String tableGroupName,
Map<String,Object> extensions)
void
addAndConditionToJoinForTable(SQLTable sqlTbl,
BooleanExpression andCondition,
boolean applyToUnions)
void
addExtension(String key,
Object value)
protected void
addJoin(SQLJoin.JoinType joinType,
SQLTable sourceTable,
SQLTable targetTable,
BooleanExpression joinCondition,
SQLJoin parentJoin)
org.datanucleus.ClassLoaderResolver
protected BooleanExpression
getJoinConditionForJoin(SQLTable sourceTable,
JavaTypeMapping sourceMapping,
JavaTypeMapping sourceParentMapping,
SQLTable targetTable,
JavaTypeMapping targetMapping,
JavaTypeMapping targetParentMapping,
Object[] discrimValues)
getJoinForTable(SQLTable sqlTbl)
getJoinTypeForTable(SQLTable sqlTbl)
int
int
getTableGroup(String groupName)
protected SQLTableNamer
getTableNamer(String namingSchema)
protected void
boolean
join(SQLJoin.JoinType joinType,
SQLTable sourceTable,
JavaTypeMapping sourceMapping,
JavaTypeMapping sourceParentMapping,
Table target,
String targetAlias,
JavaTypeMapping targetMapping,
JavaTypeMapping targetParentMapping,
Object[] discrimValues,
String tableGrpName,
boolean applyToUnions,
SQLJoin parentJoin)
join(SQLJoin.JoinType joinType,
SQLTable sourceTable,
JavaTypeMapping sourceMapping,
Table target,
String targetAlias,
JavaTypeMapping targetMapping,
Object[] discrimValues,
String tableGrpName)
join(SQLJoin.JoinType joinType,
SQLTable sourceTable,
JavaTypeMapping sourceMapping,
Table target,
String targetAlias,
JavaTypeMapping targetMapping,
Object[] discrimValues,
String tableGrpName,
boolean applyToUnions)
join(SQLJoin.JoinType joinType,
SQLTable sourceTable,
JavaTypeMapping sourceMapping,
Table target,
String targetAlias,
JavaTypeMapping targetMapping,
Object[] discrimValues,
String tableGrpName,
boolean applyToUnions,
SQLJoin parentJoin)
join(SQLJoin.JoinType joinType,
SQLTable sourceTable,
JavaTypeMapping sourceMapping,
Table target,
String targetAlias,
JavaTypeMapping targetMapping,
Object[] discrimValues,
String tableGrpName,
SQLJoin parentJoin)
join(SQLJoin.JoinType joinType,
SQLTable sourceTable,
Table target,
String targetAlias,
String tableGrpName,
BooleanExpression joinCondition,
boolean applyToUnions)
void
log(org.datanucleus.util.NucleusLogger logger)
protected void
putSQLTableInGroup(SQLTable sqlTbl,
String groupName,
SQLJoin.JoinType joinType)
removeCrossJoin(SQLTable targetSqlTbl)
void
setCandidateClassName(String name)
void
setClassLoaderResolver(org.datanucleus.ClassLoaderResolver clr)
void
void
whereAnd(BooleanExpression expr,
boolean applyToUnions)
void
whereOr(BooleanExpression expr,
boolean applyToUnions)
parentStmt
- Parent statementrdbmsMgr
- The datastore managertable
- The primary tablealias
- Alias for this tabletableGroupName
- Name of candidate table-group (if any). Uses "Group0" if not providedextensions
- Any extensions (optional)stmt
- The statement that may be parent, grandparent etc of this statementkey
- Extension keyvalue
- Value for the keykey
- Key for the extensionalias
- Aliastable
- The tabletable
- The tablegroupName
- Name of the table group where we should look for this tablegroupName
- Name of the groupjoinType
- Type of join.sourceTable
- SQLTable for the source (null implies primaryTable)sourceMapping
- Mapping in this table to join fromtarget
- Table to join totargetAlias
- Alias for the target table (if known)targetMapping
- Mapping in the other table to join to (also defines the table to join to)discrimValues
- Any discriminator values to apply for the joined table (null if not)tableGrpName
- Name of the table group for the target (null implies a new group)joinType
- Type of join.sourceTable
- SQLTable for the source (null implies primaryTable)sourceMapping
- Mapping in this table to join fromtarget
- Table to join totargetAlias
- Alias for the target table (if known)targetMapping
- Mapping in the other table to join to (also defines the table to join to)discrimValues
- Any discriminator values to apply for the joined table (null if not)tableGrpName
- Name of the table group for the target (null implies a new group)parentJoin
- Parent join when this join will be a sub-join (part of "join grouping")joinType
- Type of join.sourceTable
- SQLTable for the source (null implies primaryTable)sourceMapping
- Mapping in this table to join fromtarget
- Table to join totargetAlias
- Alias for the target table (if known)targetMapping
- Mapping in the other table to join to (also defines the table to join to)discrimValues
- Any discriminator values to apply for the joined table (null if not)tableGrpName
- Name of the table group for the target (null implies a new group)applyToUnions
- Whether to apply to any unioned statements (only applies to SELECT statements)joinType
- Type of join.sourceTable
- SQLTable for the source (null implies primaryTable)sourceMapping
- Mapping in this table to join fromtarget
- Table to join totargetAlias
- Alias for the target table (if known)targetMapping
- Mapping in the other table to join to (also defines the table to join to)discrimValues
- Any discriminator values to apply for the joined table (null if not)tableGrpName
- Name of the table group for the target (null implies a new group)applyToUnions
- Whether to apply to any unioned statements (only applies to SELECT statements)parentJoin
- Parent join when this join will be a sub-join (part of "join grouping")joinType
- Type of join.sourceTable
- SQLTable for the source (null implies primaryTable)sourceMapping
- Mapping in this table to join fromsourceParentMapping
- Optional, if this source mapping is a sub mapping (e.g interface impl).target
- Table to join totargetAlias
- Alias for the target table (if known)targetMapping
- Mapping in the other table to join to (also defines the table to join to)targetParentMapping
- Optional, if this source mapping is a sub mapping (e.g interface impl).discrimValues
- Any discriminator values to apply for the joined table (null if not)tableGrpName
- Name of the table group for the target (null implies a new group)applyToUnions
- Whether to apply to any unioned statements (only applies to SELECT statements)parentJoin
- Parent join when this join will be a sub-join (part of "join grouping")joinType
- Type of join.sourceTable
- SQLTable for the source (null implies primaryTable)target
- Table to join totargetAlias
- Alias for the target table (if known)tableGrpName
- Name of the table group for the target (null implies a new group)joinCondition
- On clause for the joinapplyToUnions
- Whether to apply to any unioned statements (only applies to SELECT statements)sqlTbl
- The table to checksqlTbl
- The tableandCondition
- The 'ON' condition to addapplyToUnions
- Whether to apply to unions (see SelectStatement)sqlTbl
- The table to checktargetSqlTbl
- The table to drop the cross join forsqlTbl
- SQLTable to addgroupName
- The groupjoinType
- type of join to start this table groupjoinType
- Type of join (INNER, LEFT OUTER, RIGHT OUTER, CROSS, NON-ANSI)sourceTable
- SQLTable to join fromtargetTable
- SQLTable to join tojoinCondition
- Condition for the joinparentJoin
- Optional parent join (which will mean this join becomes a sub-join)sourceTable
- Source tablesourceMapping
- Mapping in source tablesourceParentMapping
- Optional parent of this source mapping (if joining an impl of an interface)targetTable
- Target tabletargetMapping
- Mapping in target tabletargetParentMapping
- Optional parent of this target mapping (if joining an impl of an interface)discrimValues
- Optional discriminator values to further restrictnamingSchema
- Table naming schema to useexpr
- The conditionapplyToUnions
- whether to apply this and to any UNIONs in the statement (only applies to SELECT statements)expr
- The conditionapplyToUnions
- Whether to apply to unions (only applies to SELECT statements)logger
- The logger