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.columnNameList(SQLValue[] columnNames,
boolean placeholders)
Generates a list of column names from the given
String array in the appropriate dialect. |
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.insert(String tableName,
SQLValue[] columnNames)
Generates a
INSERT statement for the given SQLDialect as follows:
INSERT INTO tableName (columnName[0], columnName[1], ... columnName[n]) VALUES (? |
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 | Field and Description |
---|---|
static SQLValue |
SQLValue.INSERT_VALUE |
Modifier and Type | Method and Description |
---|---|
static SQLValue[] |
SQLValue.columnList(String tableName,
String... columnNames)
Convenience method to create a list of
SQLValue s representing columns from one table |
static SQLValue |
SQLValue.integerValue(long longValue)
Creates a
SQLValue representing a long constant. |
static SQLValue |
SQLValue.stringValue(String value)
Creates a
SQLValue representing a string constant. |
static SQLValue |
SQLValue.tableColumn(String tableName,
String columnName)
Create a
SQLValue representation of an arbitrary table column |
static SQLValue[] |
SQLValue.valueList(SQLValue... values)
Convenience method to create a list of
SQLValue s |
Modifier and Type | Method and Description |
---|---|
static SQLValue[] |
SQLValue.valueList(SQLValue... values)
Convenience method to create a list of
SQLValue s |
Modifier and Type | Method and Description |
---|---|
protected SQLValue |
AbstrIdDAO.getSQLValueForId(Serializable id) |
Copyright © 2017 Clazzes.org. All rights reserved.