public class DBQueryDef extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BUILD_ERROR
A generic error during parsing and building
|
static int |
BUILD_OK
The query was built ok with no errors
|
static int |
BUILD_TOO_COMPLEX_JOINS
Was unable to convert a set of complex ORs to a standard format
|
static int |
BUILD_TOO_COMPLEX_WHERE
More than likely the where clause had a mix of ANDs and ORs
|
protected boolean |
mIsAdv |
protected java.util.Vector |
mJoins |
protected java.util.Vector |
mSelects |
protected java.util.Vector |
mTables |
protected DBWhereIFace |
mWhere |
Constructor and Description |
---|
DBQueryDef()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSelectItem(DBSelectTableModelItem aItem)
Adds an item to the selects vector
|
void |
addTable(DBQueryDefTable aItem)
Adds table DBQueryDefTable item to "table" list
|
void |
addTable(int aId,
java.lang.String aName,
int aX,
int aY)
Adds table item to "table" list, it will create a new DBQueryDefTable
object
|
void |
addTable(java.lang.String aName)
Adds table item to "from" list
|
void |
clear()
Clears all the vectors and the where object
|
java.util.Vector |
getJoins()
Returns a vector of pairs of items, meaning this vector MUST have an even
number of items.
|
java.util.Vector |
getSelects()
The vector of items representing the the items to be disdplayed
The items are object of class DBSelectTableModelItem |
java.util.Vector |
getTables()
Returns a vector of table names that would represent the "table" portion
|
DBWhereIFace |
getWhere()
A copy of the where object and all of its children.
|
boolean |
isAdv()
Returns whether it considers the query to be "advanced"
An advanced query is one that was built with the advanced tab and then saved out. |
void |
setIsAdv(boolean aIsAdv)
Sets the hint as to whether it is an advanced query
|
void |
setJoins(java.util.Vector aJoins)
Sets a vector of DBSelectTableModelItem "pairs", assumes that the vector
always holds an even number of elements, one left and right in pairs
|
void |
setWhere(DBWhereIFace aItem)
Sets the where object
|
public static final int BUILD_OK
public static final int BUILD_ERROR
public static final int BUILD_TOO_COMPLEX_WHERE
public static final int BUILD_TOO_COMPLEX_JOINS
protected boolean mIsAdv
protected java.util.Vector mSelects
protected java.util.Vector mTables
protected java.util.Vector mJoins
protected DBWhereIFace mWhere
public DBQueryDef()
public boolean isAdv()
public void setIsAdv(boolean aIsAdv)
aIsAdv
- The mIsAdv to set.public void addSelectItem(DBSelectTableModelItem aItem)
aItem
- public void setWhere(DBWhereIFace aItem)
aItem
- public DBWhereIFace getWhere()
public java.util.Vector getSelects()
public java.util.Vector getJoins()
public void setJoins(java.util.Vector aJoins)
aJoins
- the join vectorpublic void addTable(int aId, java.lang.String aName, int aX, int aY)
aId
- id of tableaName
- name of tableaX
- x coordaY
- y coordpublic void addTable(java.lang.String aName)
aName
- name of tablepublic void addTable(DBQueryDefTable aItem)
aItem
- DBQueryDefTable itempublic java.util.Vector getTables()
public void clear()