Package | Description |
---|---|
org.apache.empire.db |
This package contains the core Empire-DB implementation classes.
|
org.apache.empire.db.derby |
This package contains classes necessary to support the Apache Derby database system.
|
org.apache.empire.db.expr.column |
This package contains SQL-generator classes for column expressions.
|
org.apache.empire.db.expr.compare |
This package contains SQL-generator classes for compare expressions used in the where and having clause.
|
org.apache.empire.db.expr.join |
This package contains SQL-generator classes for join expressions used in the from clause.
|
org.apache.empire.db.expr.order | |
org.apache.empire.db.h2 |
This package contains classes necessary to support the H2 database system.
|
org.apache.empire.db.hsql |
This package contains classes necessary to support the HSQLDB database system.
|
org.apache.empire.db.mysql |
This package contains classes necessary to support the MySQL database system.
|
org.apache.empire.db.oracle |
This package contains classes necessary to support the Oracle database system.
|
org.apache.empire.db.postgresql |
This package contains classes necessary to support the PostgreSQL database system.
|
org.apache.empire.db.sqlite | |
org.apache.empire.db.sqlserver |
This package contains classes necessary to support the Microsoft SQL-Server database system.
|
Modifier and Type | Class and Description |
---|---|
class |
DBColumn
This is the base class for all database columns that have a physical representation.
|
protected static class |
DBCommandExpr.DBCmdColumn
This class wraps a column of sql command in a special command column object.
|
protected static class |
DBQuery.DBQueryExprColumn
DBQueryExprColumn
|
class |
DBQueryColumn |
class |
DBTableColumn
This class represent one column of a table.
|
static class |
DBView.DBViewColumn
DBViewColumn
|
Modifier and Type | Field and Description |
---|---|
protected DBColumnExpr |
DBView.DBViewColumn.expr |
protected DBColumnExpr |
DBQueryColumn.expr |
Modifier and Type | Field and Description |
---|---|
protected List<DBColumnExpr> |
DBCommand.groupBy |
protected List<DBColumnExpr> |
DBCommand.select |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBColumnExpr.abs()
Creates and returns a sql-expression for the absolute abs() function.
|
DBColumnExpr |
DBColumnExpr.append(Object value)
Creates a new DBConcatExpr object with the specified value.
|
DBColumnExpr |
DBColumnExpr.as(DBColumn column)
creates a new DBAliasExpr which renames the current expression to the name of the supplied column.
|
DBColumnExpr |
DBColumnExpr.as(String alias)
creates a new DBAliasExpr which renames the current expression to the supplied name.
|
DBColumnExpr |
DBColumnExpr.avg()
Creates and returns an aggregation function object
which returns the average value for the current expression over a group of rows.
|
DBColumnExpr |
DBDatabase.caseWhen(DBCompareExpr condition,
Object trueValue,
Object falseValue)
Creates a case column expression
"case when
|
DBColumnExpr |
DBDatabase.caseWhen(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseValue) |
DBColumnExpr |
DBDatabase.caseWhenNull(DBColumnExpr expr,
Object trueValue,
Object falseValue)
Creates a case column expression that check whether a column or column expression is null
"case when
|
DBColumnExpr |
DBColumnExpr.ceiling()
Create and returns an expression for the SQL-function ceil()
|
DBColumnExpr |
DBColumnExpr.coalesce(Object nullValue)
Creates a sql-expression for the nvl() or coalesce() function.
|
DBColumnExpr |
DBColumnExpr.convertTo(DataType dataType)
Creates and returns a new DBFuncExpr object that will
convert the current column to the destination data type specified.
|
DBColumnExpr |
DBColumnExpr.convertTo(DataType dataType,
Object format)
Creates a new DBFuncExpr object that will convert
the current column to the destination data type specified.
|
DBColumnExpr |
DBRowSet.count()
Returns a new DBCountExpr object.
|
DBColumnExpr |
DBColumnExpr.count()
Creates and returns an expression for the SQL "count()" function
which returns the number of rows in the result set.
|
DBColumnExpr |
DBColumnExpr.countDistinct()
Creates and returns an expression for the SQL "count()" function
which returns the number of unique values in the result set.
|
DBColumnExpr |
DBColumnExpr.day()
Creates and returns an function object that
calculates the day of a date value.
|
DBColumnExpr |
DBColumnExpr.decode(Map<?,?> valueMap,
Object otherwise)
Creates and returns a sql-expression that compares the current column expression with
a list of values and returns the corresponding alternative value.
|
DBColumnExpr |
DBColumnExpr.decode(Object key1,
Object value1,
Object otherwise) |
DBColumnExpr |
DBColumnExpr.decode(Object key1,
Object value1,
Object key2,
Object value2,
Object otherwise) |
DBColumnExpr |
DBColumnExpr.decode(Object key1,
Object value1,
Object key2,
Object value2,
Object key3,
Object value3,
Object otherwise) |
DBColumnExpr |
DBColumnExpr.decode(Options options) |
DBColumnExpr |
DBColumnExpr.decode(Options options,
Object otherwise) |
DBColumnExpr |
DBColumn.decodeEnum()
Creates and returns a sql-expression that maps enum values by name or ordinal to their string representation
|
DBColumnExpr |
DBColumnExpr.decodeEnum(Class<? extends Enum<?>> enumType,
String otherwise)
Creates and returns a sql-expression that maps enum values by name or ordinal to their string representation
|
DBColumnExpr |
DBColumn.decodeSort(boolean defaultToEnd)
Creates and returns a sql-expression that maps enum values from name to ordinal
|
DBColumnExpr |
DBColumnExpr.decodeSort(Class<? extends Enum<?>> enumType,
boolean defaultToEnd)
Creates and returns a sql-expression that maps enum values from name to ordinal
This is useful for sorting.
|
DBColumnExpr |
DBColumnExpr.floor()
Create and returns an expression for the SQL-function floor()
|
DBColumnExpr |
DBColumnExpr.format(String format)
Formats a column-expression using a format string
This function is intended for formatting numbers.
|
protected DBColumnExpr |
DBCommandExpr.getCmdColumn(DBColumnExpr col)
returns column expression that is specific for to this command and detached from its source.
|
DBColumnExpr |
DBReader.getColumnExpr(int iColumn)
Get the column Expression at position
|
protected DBColumnExpr |
DBRowSet.getColumnExprAt(int index)
Returns the column expression at a given column index
Allow overrides in derived classes
|
protected DBColumnExpr |
DBQuery.getColumnExprAt(int index) |
protected DBColumnExpr[] |
DBReader.getColumnExprList()
Access the column expression list
|
DBColumnExpr |
DBQueryColumn.getExpr() |
protected DBColumnExpr |
DBColumnExpr.getExprFromPhrase(int phrase,
Object[] params,
DBColumn updateColumn,
boolean isAggregate) |
protected DBColumnExpr |
DBColumnExpr.getExprFromPhrase(int phrase,
Object[] params,
DBColumn updateColumn,
boolean isAggregate,
DataType dataType)
Creates a new DBFuncExpr from a given SQL-PRHASE and
optional additional parameters.
|
abstract DBColumnExpr |
DBDatabaseDriver.getNextSequenceValueExpr(DBTableColumn column)
Returns an expression for creating a sequence value.
|
abstract DBColumnExpr[] |
DBCommandExpr.getSelectExprList() |
DBColumnExpr[] |
DBCommand.getSelectExprList()
Returns an array of all select expressions
|
DBColumnExpr[] |
DBCombinedCmd.getSelectExprList()
Calls the method dbDBCommandExpr.getSelectExprList from the private variable 'left'.
|
DBColumnExpr |
DBView.DBViewColumn.getSourceColumnExpr() |
DBColumnExpr |
DBColumnExpr.indexOf(Object str)
Creates and returns a sql-expression that returns the position of a string in the current column expression.
|
DBColumnExpr |
DBColumnExpr.indexOf(Object str,
DBExpr fromPos)
Creates and returns a sql-expression that returns the position of a string in the current column expression.
|
DBColumnExpr |
DBColumnExpr.indexOf(Object str,
int fromPos)
Overloaded.
|
DBColumnExpr |
DBColumnExpr.length()
Creates and returns a sql-expression that returns the string length of this expression.
|
DBColumnExpr |
DBColumnExpr.lower()
Creates and returns a function object which
converts the current expression to lower case.
|
DBColumnExpr |
DBColumnExpr.max()
Creates and returns an aggregation function object
which returns the maximum value for the current expression over a group of rows.
|
DBColumnExpr |
DBColumnExpr.min()
Creates and returns an aggregation function object
which returns the minimum value for the current expression over a group of rows.
|
DBColumnExpr |
DBColumnExpr.modulo(Object divisor)
Creates a sql-expression for the modulo or mod() function.
|
DBColumnExpr |
DBColumnExpr.month()
Creates and returns an function object that
calculates the month of a date value.
|
DBColumnExpr |
DBColumnExpr.nvl(Object nullValue)
Deprecated.
Outdated oracle syntax - use coalesce instead
|
DBColumnExpr |
DBColumnExpr.parenthesis()
Creates and returns a function object which
encloses the current expression in parenthesis.
|
DBColumnExpr |
DBColumn.qualified()
returns an expression that renames the column with its alias name
|
DBColumnExpr |
DBColumnExpr.replace(Object match,
Object replace)
Creates and returns a sql-expression for the replace(...) function.
|
DBColumnExpr |
DBColumnExpr.reverse()
Creates and returns a sql-expression for the reverse(...) function.
|
DBColumnExpr |
DBColumnExpr.round(int decimals)
Creates and returns an function object that
rounds a number espression with the given decimals.
|
DBColumnExpr |
DBColumnExpr.substring(DBExpr pos)
Creates and returns a sql-expression for the substring(...) function.
|
DBColumnExpr |
DBColumnExpr.substring(DBExpr pos,
DBExpr count)
Creates and returns a sql-expression for the substring(...) function.
|
DBColumnExpr |
DBColumnExpr.substring(DBExpr pos,
int count)
Overloaded.
|
DBColumnExpr |
DBColumnExpr.substring(int pos)
Overloaded.
|
DBColumnExpr |
DBColumnExpr.substring(int pos,
DBExpr count)
Overloaded.
|
DBColumnExpr |
DBColumnExpr.substring(int pos,
int count)
Overloaded.
|
DBColumnExpr |
DBColumnExpr.sum()
Creates and returns an aggregation function object
which calculates the sum for the current expression over a group of rows.
|
DBColumnExpr |
DBColumnExpr.toChar()
Creates a new DBFuncExpr object (to_char SQL statement)
with the parameters prefix = "to_char(" and postfix = ")"
|
DBColumnExpr |
DBColumnExpr.toChar(String format)
Creates a new DBFuncExpr object (to_char SQL statement)
with the parameters prefix = "to_char(" and postfix = ", *
'"+format+"')"
|
DBColumnExpr |
DBColumnExpr.trim()
Creates and returns a sql-expression for the trim() function.
|
DBColumnExpr |
DBColumnExpr.trimLeft()
Creates and returns a sql-expression for the ltrim() function.
|
DBColumnExpr |
DBColumnExpr.trimRight()
Creates and returns a sql-expression for the rtrim() function.
|
DBColumnExpr |
DBColumnExpr.trunc(int decimals)
Creates and returns an function object that
truncates a number espression with the given decimals.
|
DBColumnExpr |
DBColumnExpr.upper()
Creates and returns a function object which
converts the current expression to upper case.
|
DBColumnExpr |
DBColumnExpr.year()
Creates and returns an function object that
calculates the year of a date value.
|
Modifier and Type | Method and Description |
---|---|
List<DBColumnExpr> |
DBCommand.getSelectExpressions()
Returns all select expressions as unmodifiable list
|
Modifier and Type | Method and Description |
---|---|
protected DBView.DBViewColumn |
DBView.addColumn(String columnName,
DBColumnExpr columnExpr)
Adds a column to the view.
|
DBCmdParam |
DBCommand.addParam(DBColumnExpr colExpr,
Object value)
Adds an command parameter which will be used in a prepared statement.
|
DBColumnExpr |
DBDatabase.caseWhen(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseValue) |
DBColumnExpr |
DBDatabase.caseWhenNull(DBColumnExpr expr,
Object trueValue,
Object falseValue)
Creates a case column expression that check whether a column or column expression is null
"case when
|
DBQueryColumn |
DBQuery.column(DBColumnExpr expr)
This is a convenience shortcut for findQueryColumn
|
boolean |
DBCommand.containsSelect(DBColumnExpr selExpr)
returns whether or not a command contains a select expression
|
protected DBQueryColumn |
DBQuery.createQueryColumn(DBColumnExpr expr,
int index)
factory method for column expressions in order to allow overrides
|
DBQueryColumn |
DBQuery.findQueryColumn(DBColumnExpr expr)
This function provides the query column object for a particular query command expression
|
DBView.DBViewColumn |
DBView.findViewColumn(DBColumnExpr expr)
This function searchs for equal columns given by the specified DBColumnExpr object.
|
protected DBColumnExpr |
DBCommandExpr.getCmdColumn(DBColumnExpr col)
returns column expression that is specific for to this command and detached from its source.
|
protected String |
DBCommandExpr.getInsertInto(DBTable table,
DBColumnExpr[] select,
List<DBColumnExpr> columns)
Create the insert into SQL-Command which copies data
from a select statement to a destination table.
|
void |
DBCommand.groupBy(DBColumnExpr... exprs)
Adds a list of columns to the group by phrase of an sql statement.
|
boolean |
DBCommand.hasSelectExpr(DBColumnExpr expr)
returns whether or not the command has a specific select expression
|
protected void |
DBReader.init(DBDatabase db,
DBColumnExpr[] colList,
ResultSet rset)
Initialize the reader from an open JDBC-ResultSet
|
DBColumnJoinExpr |
DBCommand.join(DBColumnExpr left,
DBColumn right)
Adds an inner join based on two columns to the list of join expressions.
|
DBColumnJoinExpr |
DBCommand.join(DBColumnExpr left,
DBColumnExpr right,
DBJoinType joinType)
Adds a join based on two columns to the list of join expressions.
|
void |
DBCommandExpr.orderBy(DBColumnExpr... exprs)
Adds a list of columns to the orderBy clause in ascending order
|
void |
DBCommandExpr.orderBy(DBColumnExpr expr,
boolean desc)
Adds an order by with ascending or descending order
|
protected void |
DBCommand.removeConstraintOn(List<DBCompareExpr> list,
DBColumnExpr col)
removes a constraint on a particular column to the 'where' or 'having' collections
|
void |
DBCommand.removeHavingConstraintOn(DBColumnExpr col)
removes a constraint on a particular column from the having clause
|
void |
DBCommand.removeSelect(DBColumnExpr... exprs)
removes one or more expressions from the Select expression list
|
void |
DBCommand.removeWhereConstraintOn(DBColumnExpr col)
removes a constraint on a particular column from the where clause
|
void |
DBCommand.replaceSelect(DBColumnExpr replExpr,
DBColumnExpr replWith)
replaces a select expression with another or removes a select expression
In order to remove the expression, set the replWith parameter to null
If the replace expression is not found, an ItemNotFoundException is thrown
|
void |
DBCommand.select(DBColumnExpr... exprs)
Adds a list of columns to the select phrase of an sql statement.
|
void |
DBCommand.select(DBColumnExpr expr)
Adds a DBColumnExpr object to the Vector: 'select'.
|
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabase.caseWhen(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseValue) |
protected String |
DBCommandExpr.getInsertInto(DBTable table,
DBColumnExpr[] select,
List<DBColumnExpr> columns)
Create the insert into SQL-Command which copies data
from a select statement to a destination table.
|
String |
DBCommandExpr.getInsertInto(DBTable table,
List<DBColumnExpr> columns)
Create the insert into SQL-Command which copies
data from a select statement to a destination table.
|
void |
DBCommand.groupBy(Collection<? extends DBColumnExpr> columns)
Adds a collection of columns to the group by phrase of an sql statement.
|
void |
DBCommand.select(Collection<? extends DBColumnExpr> columns)
Adds a collection of columns to the select phrase of an sql statement.
|
Constructor and Description |
---|
DBCmdColumn(DBRowSet query,
DBColumnExpr expr)
Constructs a new DBCmdColumn object
|
DBCmdQuery(DBCommandExpr cmd,
DBColumnExpr[] colList)
Creates a new DBCmdQueryObject
|
DBQueryColumn(DBQuery query,
String name,
DBColumnExpr expr)
Constructs a DBQueryColumn object set the specified parameters to this object.
|
DBQueryExprColumn(DBQuery q,
String name,
DBColumnExpr expr) |
DBViewColumn(DBView view,
String name,
DBColumnExpr expr,
double size)
Constructs a DBViewColumn object set the specified parameters to this object.
|
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverDerby.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Class and Description |
---|---|
class |
DBAbstractFuncExpr
This implements some basic functionality for SQL functions based on a column expression
|
class |
DBAliasExpr
This class allows column renaming in SQL.
|
class |
DBCalcExpr
This class is used for performing calculations in SQL
It handles the mathematical operations ("+", "-", "*", "/") for the current column. |
class |
DBCaseExpr
This class is used to add the "case when ?
|
class |
DBCaseWhenExpr
This class is used to create a SQL CASE constraint in the form of
case when {cond1} then {result1}
when {cond2} then {result2}
...
|
class |
DBConcatExpr
This class is used for performing string concatenation in SQL
There is no need to explicitly create instances of this class. |
class |
DBConvertExpr
This class is used to convert a value to a different data type.
|
class |
DBCountExpr
This class is used to add the "count" statement to the SQL-Command.
|
class |
DBDecodeExpr
This class is used to decode a set of keys to the corresponding target values.
|
class |
DBFuncExpr
This class is used for performing various SQL functions on a column or column expression.
|
class |
DBScalarExpr
This class is used for declaring scalar functions in SQL (like e.g. random).
|
class |
DBValueExpr
This class is used for declaring constant values in SQL.
|
Modifier and Type | Field and Description |
---|---|
DBColumnExpr |
DBValueExpr.column |
protected DBColumnExpr |
DBAbstractFuncExpr.expr |
protected DBColumnExpr |
DBConcatExpr.left |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBAliasExpr.getExpr()
This helper function returns the underlying column expression.
|
Constructor and Description |
---|
DBAbstractFuncExpr(DBColumnExpr expr,
DBColumn updateColumn,
boolean isAggregate,
DataType dataType)
Constructs a new DBFuncExpr object set the specified parameters to this object.
|
DBAliasExpr(DBColumnExpr expr,
String alias)
Constructs a DBAliasExpr object combine the DBColumnExpr object with the alias name.
|
DBCalcExpr(DBColumnExpr expr,
String op,
Object value)
Constructs a DBCalcExpr object Sets the mathematical operations ("+", "-", "*", "/")
for the specified DBColumnExpr object and value. |
DBCaseExpr(DBCompareExpr compExpr,
DBColumnExpr trueExpr,
DBColumnExpr elseExpr)
Constructs a DBCaseExpr
|
DBCaseWhenExpr(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseExpr)
Constructs a DBCaseExpr
|
DBConcatExpr(DBColumnExpr left,
Object right)
Constructs a new DBConcatExpr object set the specified parameters to this object.
|
DBConvertExpr(DBColumnExpr expr,
DataType dataType,
Object format)
Constructs a DBDecodeExpr
|
DBCountExpr(DBColumnExpr expr,
boolean distinct)
Constructs a DBCountExpr.
|
DBDecodeExpr(DBColumnExpr expr,
Map<?,?> valueMap,
Object elseExpr,
DataType dataType)
Constructs a DBDecodeExpr
|
DBFuncExpr(DBColumnExpr expr,
int phrase,
Object[] params,
DBColumn updateColumn,
boolean isAggregate,
DataType dataType)
Constructs a new DBFuncExpr object set the specified parameters to this object.
|
DBFuncExpr(DBColumnExpr expr,
String template,
Object[] params,
DBColumn updateColumn,
boolean isAggregate,
DataType dataType)
Constructs a new DBFuncExpr object set the specified parameters to this object.
|
DBValueExpr(DBColumnExpr col,
Object value)
Construct a new DBValueExpr object set the specified parameters to this object.
|
Constructor and Description |
---|
DBCaseWhenExpr(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseExpr)
Constructs a DBCaseExpr
|
Modifier and Type | Field and Description |
---|---|
protected DBColumnExpr |
DBCompareColExpr.expr |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBCompareColExpr.getColumnExpr()
Gets the DBColumnExpr object
|
Constructor and Description |
---|
DBCompareColExpr(DBColumnExpr expr,
DBCmpType op,
Object value)
Constructs a DBCompareColExpr object set the specified parameters to this object.
|
Modifier and Type | Field and Description |
---|---|
protected DBColumnExpr |
DBColumnJoinExpr.left |
protected DBColumnExpr |
DBColumnJoinExpr.right |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBColumnJoinExpr.getLeft()
returns the left join expression
|
DBColumnExpr |
DBColumnJoinExpr.getRight()
returns the right join expression
|
Modifier and Type | Method and Description |
---|---|
DBJoinExpr |
DBColumnJoinExpr.and(DBColumnExpr c1,
DBColumnExpr c2)
This function adds an additional constraint to the join.
|
Constructor and Description |
---|
DBColumnJoinExpr(DBColumnExpr left,
DBColumnExpr right,
DBJoinType type)
Constructs a new DBJoinExpr object initialize this object with
the left and right column and the data type of the join
expression.
|
Modifier and Type | Field and Description |
---|---|
protected DBColumnExpr |
DBOrderByExpr.expr |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBOrderByExpr.getColumnExpr() |
Constructor and Description |
---|
DBOrderByExpr(DBColumnExpr expr,
boolean desc)
Construct a new DBOrderByInfo object set the specified
parameters to this object.
|
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverH2.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverHSql.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverMySQL.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Class and Description |
---|---|
class |
OracleRowNumExpr
implements a column expression for the Oracle rownum function
|
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverOracle.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverPostgreSQL.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverSQLite.getNextSequenceValueExpr(DBTableColumn column) |
Modifier and Type | Method and Description |
---|---|
DBColumnExpr |
DBDatabaseDriverMSSQL.getNextSequenceValueExpr(DBTableColumn column) |
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.