Package | Description |
---|---|
org.clazzes.util.sql |
Utility package providing a simple framework to create SQL statements for various dialects.
|
org.clazzes.util.sql.criteria | |
org.clazzes.util.sql.dao |
Modifier and Type | Method and Description |
---|---|
String |
SQLStatementGenerator.delete(String tableName,
SQLCondition condition)
Generates a
DELETE statement for a given SQLDialect as follows:
DELETE FROM tableName [WHERE condition] |
String |
SQLStatementGenerator.innerJoin(String tableName1,
String tableName2,
SQLCondition joinCondition,
SQLCondition queryCondition,
SQLValue[] columnNames)
Generates a
SELECT/INNER JOIN statement for a given SQLDialect as follows:
SELECT columnList FROM tableName1 INNER JOIN tableName2 ON joinCondition [WHERE queryCondition] Whereby columnList is replaced by the wildcard character '* ' if it is null |
String |
SQLStatementGenerator.select(String tableName,
SQLValue[] columnNames,
SQLCondition condition)
Generates a
SELECT statement for the given SQLDialect as follows:
For columnNames == null :SELECT * FROM tableName [WHERE condition] For columnNames ! |
String |
SQLStatementGenerator.select(String tableName,
SQLValue[] columnNames,
SQLCondition condition,
SQLOrder[] orders)
Generates a
SELECT statement for the given SQLDialect as follows:
For columnNames == null :SELECT * FROM tableName [WHERE condition] For columnNames ! |
String |
SQLStatementGenerator.selectDistinct(String tableName,
SQLValue[] columnNames,
SQLCondition condition)
Generates a
SELECT DISTINCT statement for the given SQLDialect as follows:
For columnNames == null :SELECT DISTINCT * FROM tableName [WHERE condition] For columnNames ! |
String |
SQLStatementGenerator.selectDistinct(String tableName,
SQLValue[] columnNames,
SQLCondition condition,
SQLOrder[] orders)
Generates a
SELECT DISTINCT statement for the given SQLDialect as follows:
For columnNames == null :SELECT DISTINCT * FROM tableName [WHERE condition] For columnNames ! |
String |
SQLStatementGenerator.update(String tableName,
SQLValue[] columnNames,
SQLCondition condition)
Generates a
UPDATE statement for a given SQLDialect as follows:
UPDATE tableName SET columnName[0]=? |
Modifier and Type | Method and Description |
---|---|
static SQLCondition |
SQLCondition.and(SQLFragment... operands) |
protected static SQLCondition |
SQLCondition.and(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.eq(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.gt(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.gtEquals(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.in(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.isNull(SQLFragment operand1) |
static SQLCondition |
SQLCondition.like(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.lt(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.ltEquals(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.notEq(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.notLike(SQLFragment operand1,
SQLFragment operand2) |
static SQLCondition |
SQLCondition.notNull(SQLFragment operand1) |
static SQLCondition |
SQLCondition.or(SQLFragment... operands) |
protected static SQLCondition |
SQLCondition.or(SQLFragment operand1,
SQLFragment operand2) |
Modifier and Type | Method and Description |
---|---|
protected int |
AbstrBasicDAO.deleteWithCondition(SQLCondition condition,
StatementPreparer preparer)
Delete all POJOs, matching the given SQLCondition, prepared with the given StatementPreparer.
|
protected long |
AbstrBasicDAO.getListSize(SQLCondition condition,
StatementPreparer preparer)
Detects the number of POJOs that match would be returned by getList().
|
protected List<T> |
AbstrBasicDAO.getListWithCondition(SQLCondition condition,
StatementPreparer preparer)
Returns a list of POJOs, matching the given SQLCondition, prepared with the given StatementPreparer.
|
protected List<T> |
AbstrBasicDAO.getSubList(SQLCondition condition,
StatementPreparer preparer,
SQLOrder[] orders,
int rowsToSkip,
int maxRows)
Returns a list of POJOs, matching the given SQLCondition, prepared with the given StatementPreparer.
|
protected T |
AbstrBasicDAO.getUniqueWithCondition(SQLCondition condition,
StatementPreparer preparer)
Returns a POJO, matching the given SQLCondition, prepared with the given StatementPreparer.
|
protected int |
AbstrBasicDAO.streamListWithCondition(IEntityConsumer<T> entityConsumer,
SQLCondition condition,
StatementPreparer preparer)
Stream a list of POJOs, matching the given SQLCondition, prepared with the given StatementPreparer.
|
protected int |
AbstrBasicDAO.streamSubList(IEntityConsumer<T> entityConsumer,
SQLCondition condition,
StatementPreparer preparer,
SQLOrder[] orders,
int rowsToSkip,
int maxRows)
Stream a list of POJOs, matching the given SQLCondition, prepared with the given StatementPreparer.
|
Copyright © 2017 Clazzes.org. All rights reserved.