@GenerateDto(dtoPackage="net.datenwerke.rs.base.client.dbhelper.dto", additionalFields=, poso2DtoPostProcessors=DatabaseHelper2DtoPostProcessor.class) public abstract class DatabaseHelper extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
DatabaseHelper.ResultSetObjectHandler |
Constructor and Description |
---|
DatabaseHelper() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
aggregateFunction(AggregateFunction function,
java.lang.String columnName) |
Query |
buildQuery(QueryBuilder builder) |
java.lang.String |
buildQueryToString(QueryBuilder builder) |
boolean |
canChangeReadOnlyFlagAfterConnectionCreation() |
java.lang.String |
conditionIn(java.lang.String column,
java.util.List<java.lang.String> data,
boolean caseSensitive) |
boolean |
containsWildcard(java.lang.String data) |
java.lang.String |
createDummyQuery() |
QueryBuilder |
createNestedQuery(java.lang.String innerQuery,
java.util.Map<java.lang.String,ParameterValue> parameteReplacementMap,
QueryReplacementHelper queryReplacementHelper,
java.util.List<java.lang.String> plainColumnNames) |
DatabaseHelper.ResultSetObjectHandler |
createResultSetHandler(java.sql.ResultSet resultSet,
java.sql.Connection con) |
java.lang.String |
escapeString(java.lang.String string) |
java.lang.String |
getDescription() |
abstract java.lang.String |
getDescriptor()
A unique descriptor that is not longer than 32 characters.
|
abstract java.lang.String |
getDriver() |
java.lang.String |
getIdentifierQuoteChar() |
abstract java.lang.String |
getName() |
AggregateHavingQuery |
getNewAggregateHavingQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService columnNamingService) |
AndQueryCondition |
getNewAndQueryCondition(QryCondition first,
QryCondition second) |
ColumnFilterQuery |
getNewColumnFilterQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService uniqueNameService) |
ColumnQuery |
getNewColumnQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService baseNameService,
ColumnNamingService uniqueNameService) |
CountQuery |
getNewCountQuery(Query nestedQuery) |
EqualQueryCondition |
getNewEqualQueryCondition(Column column,
java.lang.Object data,
QueryBuilder queryBuilder) |
FilterWhereQuery |
getNewFilterWhereQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService columnNamingService) |
GreaterEqualQueryCondition |
getNewGreaterEqualQueryCondition(Column column,
java.lang.Object data,
QueryBuilder queryBuilder) |
GreaterQueryCondition |
getNewGreaterQueryCondition(Column column,
java.lang.Object data,
QueryBuilder queryBuilder) |
InnerFilterWhereQuery |
getNewInnerFilterWhereQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService uniqueNameService) |
InQueryCondition |
getNewInQueryCondition(Column column,
java.util.Collection dataCollection,
QueryBuilder queryBuilder) |
IsNullQueryCondition |
getNewIsNullQueryCndition(Column column) |
LessEqualQueryCondition |
getNewLessEqualQueryCondition(Column column,
java.lang.Object data,
QueryBuilder queryBuilder) |
LessQueryCondition |
getNewLessQueryCondition(Column column,
java.lang.Object data,
QueryBuilder queryBuilder) |
LikeQueryCondition |
getNewLikeQueryCondition(Column column,
java.lang.Object data,
QueryBuilder queryBuilder) |
LimitQuery |
getNewLimitQuery(Query nestedQuery,
QueryBuilder queryBuilder) |
NotQueryCondition |
getNewNotQueryCondition(QryCondition inner) |
OffsetQuery |
getNewOffsetQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService columnNamingService) |
OrderLimitQuery |
getNewOrderLimitQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService columnNamingService) |
OrderOffsetQuery |
getNewOrderOffsetQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService columnNamingService) |
OrderQuery |
getNewOrderQuery(Query nestedQuery,
QueryBuilder queryBuilder,
ColumnNamingService columnNamingService) |
OrQueryCondition |
getNewOrQueryCondition(QryCondition first,
QryCondition second) |
java.lang.String |
getStringQuoteChar() |
static java.lang.Class<?> |
mapSQLTypeToJava(int columnType) |
java.lang.String |
nestedSelect(java.lang.String innerQuery) |
java.lang.String |
parseWildcardNumber(java.lang.String odata) |
java.lang.String |
prepareColumnForComparison(java.lang.String name,
Column column)
Can be used to put a function on top of a column for comparision (for example
clobs in oracle need a to_char).
|
java.lang.String |
prepareColumnForDistinctQuery(java.lang.String name,
Column col) |
java.lang.String |
prepareColumnForSorting(java.lang.String name,
Column column) |
java.lang.String |
quoteAlias(java.lang.String alias) |
@ExposeMethodToClient public abstract java.lang.String getDriver()
@ExposeMethodToClient public abstract java.lang.String getDescriptor()
@ExposeMethodToClient public abstract java.lang.String getName()
@ExposeMethodToClient public java.lang.String getDescription()
public java.lang.String getStringQuoteChar()
public java.lang.String getIdentifierQuoteChar()
public DatabaseHelper.ResultSetObjectHandler createResultSetHandler(java.sql.ResultSet resultSet, java.sql.Connection con) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String buildQueryToString(QueryBuilder builder)
public Query buildQuery(QueryBuilder builder)
public java.lang.String aggregateFunction(AggregateFunction function, java.lang.String columnName)
public java.lang.String quoteAlias(java.lang.String alias)
public java.lang.String escapeString(java.lang.String string)
public java.lang.String conditionIn(java.lang.String column, java.util.List<java.lang.String> data, boolean caseSensitive)
public boolean containsWildcard(java.lang.String data)
public java.lang.String parseWildcardNumber(java.lang.String odata)
public java.lang.String nestedSelect(java.lang.String innerQuery)
public java.lang.String prepareColumnForComparison(java.lang.String name, Column column)
name
- column
- public java.lang.String prepareColumnForSorting(java.lang.String name, Column column)
public java.lang.String prepareColumnForDistinctQuery(java.lang.String name, Column col)
public static java.lang.Class<?> mapSQLTypeToJava(int columnType)
public QueryBuilder createNestedQuery(java.lang.String innerQuery, java.util.Map<java.lang.String,ParameterValue> parameteReplacementMap, QueryReplacementHelper queryReplacementHelper, java.util.List<java.lang.String> plainColumnNames)
public AggregateHavingQuery getNewAggregateHavingQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService columnNamingService)
public ColumnFilterQuery getNewColumnFilterQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService uniqueNameService)
public ColumnQuery getNewColumnQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService baseNameService, ColumnNamingService uniqueNameService)
public CountQuery getNewCountQuery(Query nestedQuery)
public FilterWhereQuery getNewFilterWhereQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService columnNamingService)
public InnerFilterWhereQuery getNewInnerFilterWhereQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService uniqueNameService)
public LimitQuery getNewLimitQuery(Query nestedQuery, QueryBuilder queryBuilder)
public OrderLimitQuery getNewOrderLimitQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService columnNamingService)
public OrderOffsetQuery getNewOrderOffsetQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService columnNamingService)
public OffsetQuery getNewOffsetQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService columnNamingService)
public OrderQuery getNewOrderQuery(Query nestedQuery, QueryBuilder queryBuilder, ColumnNamingService columnNamingService)
public AndQueryCondition getNewAndQueryCondition(QryCondition first, QryCondition second)
public EqualQueryCondition getNewEqualQueryCondition(Column column, java.lang.Object data, QueryBuilder queryBuilder)
public GreaterQueryCondition getNewGreaterQueryCondition(Column column, java.lang.Object data, QueryBuilder queryBuilder)
public GreaterEqualQueryCondition getNewGreaterEqualQueryCondition(Column column, java.lang.Object data, QueryBuilder queryBuilder)
public LessQueryCondition getNewLessQueryCondition(Column column, java.lang.Object data, QueryBuilder queryBuilder)
public LessEqualQueryCondition getNewLessEqualQueryCondition(Column column, java.lang.Object data, QueryBuilder queryBuilder)
public InQueryCondition getNewInQueryCondition(Column column, java.util.Collection dataCollection, QueryBuilder queryBuilder)
public LikeQueryCondition getNewLikeQueryCondition(Column column, java.lang.Object data, QueryBuilder queryBuilder)
public NotQueryCondition getNewNotQueryCondition(QryCondition inner)
public IsNullQueryCondition getNewIsNullQueryCndition(Column column)
public OrQueryCondition getNewOrQueryCondition(QryCondition first, QryCondition second)
public boolean canChangeReadOnlyFlagAfterConnectionCreation()
public java.lang.String createDummyQuery()