public abstract class QueryPlan extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ACT_DELETE |
static int |
ACT_INSERT |
static int |
ACT_NOOP |
static int |
ACT_SELECT |
static int |
ACT_UPDATE |
protected int |
action |
protected ClassDesc |
config |
protected static ResourceBundle |
messages
I18N message handler.
|
protected static int |
ST_BUILT |
ArrayList |
statements
Array of Statement.
|
protected int |
status
Bitmask containing one of
ST_BUILT,
SelectQueryPlan.ST_C_BUILT, SelectQueryPlan.ST_OC_BUILT,
SelectQueryPlan.ST_JOINED |
protected SQLStoreManager |
store |
protected ArrayList |
tables
Array of QueryTable.
|
| Constructor and Description |
|---|
QueryPlan(ActionDesc desc,
SQLStoreManager store) |
| Modifier and Type | Method and Description |
|---|---|
QueryTable |
addQueryTable(TableDesc tableDesc) |
QueryTable |
addQueryTable(org.netbeans.modules.dbschema.TableElement tableElement,
ClassDesc persistenceConfig)
Identifies a database table which will become part of this
query plan.
|
void |
addQueryTables(ArrayList queryTables)
Add all the tables from
queryTables to the current
query plan. |
protected Statement |
addStatement(QueryTable t) |
abstract void |
build() |
protected Statement |
createStatement(QueryTable t) |
QueryTable |
findQueryTable(TableDesc tableDesc)
Finds the QueryTable object that this query plan is using
to describe the TableDesc indicated by the tableDesc parameter.
|
QueryTable |
findQueryTable(org.netbeans.modules.dbschema.TableElement tableElement)
Finds the QueryTable object that this query plan is using
to describe the TableElement indicated by the tableElement parameter.
|
int |
getAction() |
ClassDesc |
getConfig() |
protected Statement |
getStatement(QueryTable t) |
ArrayList |
getStatements() |
protected abstract Statement |
newStatement() |
protected void |
processStatements()
This method goes through the statement list and tries to set up relationship
between statements based on secondary table keys.
|
public static final int ACT_UPDATE
public static final int ACT_INSERT
public static final int ACT_DELETE
public static final int ACT_SELECT
public static final int ACT_NOOP
protected static final int ST_BUILT
public ArrayList statements
protected ClassDesc config
protected int status
ST_BUILT,
SelectQueryPlan.ST_C_BUILT, SelectQueryPlan.ST_OC_BUILT,
SelectQueryPlan.ST_JOINEDprotected int action
protected SQLStoreManager store
protected ArrayList tables
protected static final ResourceBundle messages
public QueryPlan(ActionDesc desc, SQLStoreManager store)
public QueryTable addQueryTable(TableDesc tableDesc)
public QueryTable addQueryTable(org.netbeans.modules.dbschema.TableElement tableElement, ClassDesc persistenceConfig)
tableElement - Identifies which table is being added.persistenceConfig - If we are adding a foreign table the persistenceConfig parameter
holds the PersistenceConfig for the foreign Persistence Class.public void addQueryTables(ArrayList queryTables)
queryTables to the current
query plan. Useful when transfering tables when joining query plans
together.queryTables - Query tables from the foreign plan to be added.public QueryTable findQueryTable(org.netbeans.modules.dbschema.TableElement tableElement)
public QueryTable findQueryTable(TableDesc tableDesc)
public ArrayList getStatements()
protected Statement addStatement(QueryTable t)
protected abstract Statement newStatement()
protected Statement createStatement(QueryTable t)
protected Statement getStatement(QueryTable t)
public abstract void build()
protected void processStatements()
public int getAction()
public ClassDesc getConfig()
Copyright © 2019. All rights reserved.