|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.araneaframework.backend.list.helper.BaseListSqlHelper
org.araneaframework.backend.list.helper.ListSqlHelper
org.araneaframework.backend.list.helper.PostgreListSqlHelper
Extends the ListSqLHelper to support PostgreSQL database
queries.
| Nested Class Summary |
| Nested classes inherited from class org.araneaframework.backend.list.helper.BaseListSqlHelper |
BaseListSqlHelper.BeanResultReader, BaseListSqlHelper.CountSqlCallback, BaseListSqlHelper.ItemRangeSqlCallback, BaseListSqlHelper.ListItemsDataCallback |
| Field Summary | |
protected String |
countSqlQuery
|
protected SqlStatement |
statement
|
| Fields inherited from class org.araneaframework.backend.list.helper.ListSqlHelper |
converterBasedColumnReader, log, mappingNamingStrategyAndFields, prefixMapNamingStrategy, standardFields, standardValueConverter |
| Fields inherited from class org.araneaframework.backend.list.helper.BaseListSqlHelper |
DEFAULT_RANGE_START, ds, fields, filterExpr, filterSqlExpr, itemRangeCount, itemRangeStart, namingStrategy, orderExpr, orderSqlExpr, resultSetColumnReader, valueConverter, variableResolver |
| Constructor Summary | |
PostgreListSqlHelper()
|
|
PostgreListSqlHelper(DataSource dataSource)
|
|
PostgreListSqlHelper(DataSource dataSource,
ListQuery query)
|
|
PostgreListSqlHelper(ListQuery query)
|
|
| Method Summary | |
void |
addNullParam(int valueType)
Adds a NULL PreparedStatement parameter for
later setting. |
void |
addStatementParam(Object param)
Adds a PreparedStatement parameter for later setting. |
void |
addStatementParams(List params)
Adds PreparedStatement parameters for later setting. |
protected StandardExpressionToSqlExprBuilder |
createFilterSqlExpressionBuilder()
Creates new filtering SQL Expression builder. |
protected SqlStatement |
getCountSqlStatement()
Returns the total count SQL query String and parameters. |
protected SqlExpression |
getFieldsSqlExpression()
Returns the fields SqlExpression, which can be used in
"SELECT" clause. |
protected SqlStatement |
getRangeSqlStatement()
Returns the itme range SQL query String and parameters. |
void |
setCountSqlQuery(String countSqlQuery)
Sets the SQL query used to count the items in the database. |
void |
setSqlQuery(String sqlQuery)
Sets the SQL query that will be used to retrieve the item range from the list and count the items. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected SqlStatement statement
protected String countSqlQuery
| Constructor Detail |
public PostgreListSqlHelper(DataSource dataSource,
ListQuery query)
public PostgreListSqlHelper(DataSource dataSource)
public PostgreListSqlHelper(ListQuery query)
public PostgreListSqlHelper()
| Method Detail |
protected SqlStatement getCountSqlStatement()
BaseListSqlHelper
getCountSqlStatement in class BaseListSqlHelperprotected SqlStatement getRangeSqlStatement()
BaseListSqlHelper
getRangeSqlStatement in class BaseListSqlHelperprotected SqlExpression getFieldsSqlExpression()
BaseListSqlHelperSqlExpression, which can be used in
"SELECT" clause.
getFieldsSqlExpression in class BaseListSqlHelperSqlExpression, which can be used in
"SELECT" clause.protected StandardExpressionToSqlExprBuilder createFilterSqlExpressionBuilder()
BaseListSqlHelper
createFilterSqlExpressionBuilder in class BaseListSqlHelperpublic void setCountSqlQuery(String countSqlQuery)
BaseListSqlHelperBy default, total items count and items range queries are constructed automatically based on the original query. This method should only be used, if it can considerably boost the perfomacne of count query.
setCountSqlQuery in class BaseListSqlHelpercountSqlQuery - the SQL query used to count the items in the database.public void setSqlQuery(String sqlQuery)
BaseListSqlHelper
ListQuery filter and order conditions are not added
automatically. To add them, use getDatabaseFilter* and
getDatabaseOrder* methods.
For simpler cases, use
one of the setSimpleSqlQuery methods instead.
setSqlQuery in class BaseListSqlHelpersqlQuery - the SQL query that will be used to retrieve the item range
from the list and count the items.public void addNullParam(int valueType)
BaseListSqlHelperNULL PreparedStatement parameter for
later setting.
This method should not be used with one of the
setSimpleSqlQuery methods.
addNullParam in class BaseListSqlHelpervalueType - the type of the NULL value.public void addStatementParam(Object param)
BaseListSqlHelperPreparedStatement parameter for later setting.
This method should not be used with one of the
setSimpleSqlQuery methods.
addStatementParam in class BaseListSqlHelperparam - a PreparedStatement parameter.public void addStatementParams(List params)
BaseListSqlHelperPreparedStatement parameters for later setting.
This method should not be used with one of the
setSimpleSqlQuery methods.
addStatementParams in class BaseListSqlHelperparams - PreparedStatement parameters.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||