public interface SelectBuilder
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addFrom(java.lang.String sRSFrom)
Adds list of tables to the select statement
|
java.lang.String |
addGroupBy(java.lang.String sGroupBy)
Adds group by clause to the select statement
|
java.lang.String |
addHaving(java.lang.String sRSHavingClause)
Adds having clause to the select statement
|
java.lang.String |
addHaving(java.lang.String objectId,
java.lang.String operator,
java.lang.String value)
Adds having clause to the select statement , can only pass String values and numbers ( did not test numbers but hope they will work as is )
|
java.lang.String |
addOrderBy(java.lang.String sRSOrderByClause)
Adds order by clause to the select statement
|
java.lang.String |
addRSColumns(java.util.ArrayList<RSColumn> rs)
Adds columns the select statement
|
java.lang.String |
addWhere(java.lang.String sRSWhereClause)
Adds where clause to the select statement
|
java.lang.String |
addWhere(java.lang.String objectId,
java.lang.String operator,
java.lang.String value)
Adds where clause to the select statement , can only pass String values and numbers ( did not test numbers but hope they will work as is )
|
java.lang.String |
buildWhereItem(java.lang.String objectId,
java.lang.String operator,
java.lang.String value)
Use this method to construct where item;
you can use it to pass result to the ResultSetInterface.getQueryCount() .
|
RSColumn |
createRSColumn(java.lang.String text,
boolean isExpression)
Creates new RSColumn object
|
int |
findRSColumn(java.lang.String objectId)
Tries to find column in the select based on it's objectId
|
java.util.ArrayList<RSColumn> |
getRSColumns()
returns back the ArrayList of RSColumn objects
|
java.lang.String |
getRSItemExprById(java.lang.String objectId)
Use this method to get RSItem text as it appears on the
original select statement
|
java.lang.String |
getSelect()
Returns current select statement
|
java.lang.String |
replaceGroupBy(java.lang.String sGroupBy)
Replaces group by clause in the select statement
|
java.lang.String |
replaceHaving(java.lang.String sRSHavingClause)
Replaces having clause to the select statement
|
java.lang.String |
replaceOrderBy(java.lang.String sRSOrderByClause)
Replaces order by clause to the select statement
|
java.lang.String |
replaceRSColumns(java.util.ArrayList<RSColumn> rs)
Replaces columns in the select statement
|
java.lang.String |
replaceWhere(java.lang.String sNewWhereClause)
Replaces where clause in the select statement
|
java.lang.String |
updateSelect(java.util.ArrayList<java.lang.String> rs,
java.lang.String sFrom,
java.lang.String sRSWhereClause,
java.lang.String sRSOrderByClause,
java.lang.String sRSHavingClause)
Modifies select statement
|
java.lang.String updateSelect(java.util.ArrayList<java.lang.String> rs, java.lang.String sFrom, java.lang.String sRSWhereClause, java.lang.String sRSOrderByClause, java.lang.String sRSHavingClause)
rs
- ArrayList of columns to add to the select statementsFrom
- comma separated list of tables to add to the select statementsRSWhereClause
- Where clause to add to the select statementsRSOrderByClause
- Order by clause to add to the select statementsRSHavingClause
- Having clause to add to the select statementjava.lang.String addRSColumns(java.util.ArrayList<RSColumn> rs)
rs
- ArrayList of RSColumn objects to add to the select statementjava.util.ArrayList<RSColumn> getRSColumns()
int findRSColumn(java.lang.String objectId)
objectId
- RSColumn createRSColumn(java.lang.String text, boolean isExpression)
text
- select statement column in form of sql expression or table columnisExpression
- indicates whether text represents an expression or table columnjava.lang.String replaceRSColumns(java.util.ArrayList<RSColumn> rs)
rs
- ArrayList of RSColumn objectsjava.lang.String addFrom(java.lang.String sRSFrom)
sRSFrom
- comma separated list of tables to add to the select statementjava.lang.String addWhere(java.lang.String sRSWhereClause)
sRSWhereClause
- Where clause to add to the select statementjava.lang.String replaceWhere(java.lang.String sNewWhereClause)
sNewWhereClause
- Where clause to add to the select statementjava.lang.String addOrderBy(java.lang.String sRSOrderByClause)
sRSOrderByClause
- Where clause to add to the select statementjava.lang.String replaceOrderBy(java.lang.String sRSOrderByClause)
sRSOrderByClause
- Where clause to add to the select statementjava.lang.String addHaving(java.lang.String sRSHavingClause)
sRSHavingClause
- Where clause to add to the select statementjava.lang.String replaceHaving(java.lang.String sRSHavingClause)
sRSHavingClause
- Where clause to add to the select statementjava.lang.String getSelect()
java.lang.String addGroupBy(java.lang.String sGroupBy)
sGroupBy
- Group by clause to add to the select statementjava.lang.String replaceGroupBy(java.lang.String sGroupBy)
sGroupBy
- new Group by clausejava.lang.String getRSItemExprById(java.lang.String objectId)
objectId
- object id of the rs itemjava.lang.String buildWhereItem(java.lang.String objectId, java.lang.String operator, java.lang.String value)
objectId
- object id of the result set columnoperator
- condition operator , usually = , see com.deltek.enterprise.system.serverapi.remoteapi.publicapi.WhereItem for list of all possible values ( that map to the operators in the Query dialog)value
- value you want to testjava.lang.String addWhere(java.lang.String objectId, java.lang.String operator, java.lang.String value)
objectId
- select item you need to add condition on , eg P.PROJ_ID if select looks like select P.PROJ_ID FRoM PROJ Poperator
- condition operator , usually = , see com.deltek.enterprise.system.serverapi.remoteapi.publicapi.WhereItem for list of all possible values ( that map to the operators in the Query dialog)value
- or null if condition doesnt accept valuejava.lang.String addHaving(java.lang.String objectId, java.lang.String operator, java.lang.String value)
objectId
- select item you need to add condition on , eg P.PROJ_ID if select looks like select P.PROJ_ID FRoM PROJ Poperator
- condition operator , usually = , see com.deltek.enterprise.system.serverapi.remoteapi.publicapi.WhereItem for list of all possible values ( that map to the operators in the Query dialog)value
- or null if condition doesnt accept value