Package | Description |
---|---|
org.apache.empire.db |
This package contains the core Empire-DB implementation classes.
|
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.dbms.oracle |
This package contains classes necessary to support the Oracle database system.
|
org.apache.empire.dbms.postgresql |
This package contains classes necessary to support the PostgreSQL database system.
|
Modifier and Type | Field and Description |
---|---|
protected List<DBCompareExpr> |
DBCommand.having |
protected List<DBCompareExpr> |
DBCommand.where |
Modifier and Type | Method and Description |
---|---|
protected DBCompareExpr |
DBCommand.findConstraintOn(List<DBCompareExpr> list,
DBColumnExpr colExpr)
finds a constraint on a particular column to the 'where' or 'having' collections
|
protected DBCompareExpr |
DBRowSet.getKeyConstraints(Object[] key)
Set the constraints for a single record from a supplied key
|
protected DBCompareExpr |
DBCommand.removeConstraintOn(List<DBCompareExpr> list,
DBColumnExpr colExpr)
removes a constraint on a particular column to the 'where' or 'having' collections
|
DBCompareExpr |
DBCommand.removeHavingConstraintOn(DBColumnExpr col)
removes a constraint on a particular column from the having clause
|
DBCompareExpr |
DBCommand.removeWhereConstraintOn(DBColumnExpr col)
removes a constraint on a particular column from the where clause
|
Modifier and Type | Method and Description |
---|---|
List<DBCompareExpr> |
DBCommand.getHavingConstraints()
Returns a copy of the defined having clauses.
|
List<DBCompareExpr> |
DBCommand.getWhereConstraints()
Returns a copy of the defined where clauses.
|
Modifier and Type | Method and Description |
---|---|
protected void |
DBCommand.appendCompareColExprs(DBRowSet table,
DBCompareExpr expr,
List<DBCompareColExpr> list)
Appends all nested DBCompareColExpr for a particular RowSet to a list
|
DBColumnExpr |
DBDatabase.caseWhen(DBCompareExpr condition,
Object trueValue,
Object falseValue)
Creates a case column expression
in the form "case when [condition] then [trueValue] else [falseValue] end"
This is a helper function to simplify client usage
|
DBCommand |
DBCommand.having(DBCompareExpr expr)
adds a constraint to the having clause.
|
DBCommand |
DBCommand.join(DBColumn[] left,
DBColumn[] right,
DBJoinType joinType,
DBCompareExpr... addlConstraints)
Multi-Column version of column based join expression
|
DBCommand |
DBCommand.join(DBColumnExpr left,
DBColumn right,
DBCompareExpr... addlConstraints)
Adds an inner join based on two columns to the list of join expressions.
|
DBCommand |
DBCommand.join(DBColumnExpr left,
DBColumn right,
DBJoinType joinType,
DBCompareExpr... addlConstraints)
Adds a join based on two columns to the list of join expressions.
|
DBCommand |
DBCommand.join(DBRowSet rowset,
DBCompareExpr cmp)
Adds an inner join based on a compare expression to the command.
|
DBCommand |
DBCommand.join(DBRowSet rowset,
DBCompareExpr cmp,
DBJoinType joinType)
Adds a join based on a compare expression to the command.
|
DBCommand |
DBCommand.joinLeft(DBColumnExpr left,
DBColumn right,
DBCompareExpr... addlConstraints)
Adds a left join based on two columns to the list of join expressions.
|
DBCommand |
DBCommand.joinRight(DBColumnExpr left,
DBColumn right,
DBCompareExpr... addlConstraints)
Adds a right join based on two columns to the list of join expressions.
|
DBCompareJoinExpr |
DBRowSet.on(DBCompareExpr cmp)
Creates a join expression based on a compare expression
|
<T> T |
DBUtils.queryBean(Class<T> beanType,
DBCompareExpr whereConstraints)
Queries a single bean based on a where constraint
|
<T> T |
DBUtils.queryBean(Class<T> beanType,
DBRowSet rowset,
DBCompareExpr whereConstraints)
Queries a single bean based on a where constraint
|
DBRecord |
DBRecord.read(DBCompareExpr whereConstraints)
Reads a record from the database
|
DBRecordBean |
DBRecordBean.read(DBContext context,
DBRowSet rowset,
DBCompareExpr whereConstraints)
Reads a record from the database
|
void |
DBRowSet.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints)
Reads a record from the database
|
void |
DBQuery.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints)
Creates a select SQL-Command of the query call the InitRecord method to execute the SQL-Command.
|
void |
DBCommandExpr.DBCmdQuery.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints)
throws ERR_NOTSUPPORTED
|
void |
DBRowSet.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints,
DBRowSet.PartialMode mode,
DBColumn... columns)
Reads the partial record for a given primary key from the database
|
protected void |
DBCommand.removeCommandParams(DBCompareExpr cmpExpr)
internally used to remove the command param used in a constraint
|
protected boolean |
DBCommand.removeConstraint(List<DBCompareExpr> list,
DBCompareExpr cmpExpr)
removes a constraint on a particular column to the 'where' or 'having' collections
|
boolean |
DBCommand.removeHavingConstraint(DBCompareExpr cmpExpr)
removes a constraint on a particular column from the where clause
|
boolean |
DBCommand.removeWhereConstraint(DBCompareExpr cmpExpr)
removes a constraint on a particular column from the where clause
|
protected void |
DBCommand.setConstraint(List<DBCompareExpr> list,
DBCompareExpr expr)
adds a constraint to the 'where' or 'having' collections
|
DBCaseExpr |
DBColumnExpr.when(DBCompareExpr compExpr,
Object otherwise)
Creates and returns a sql-expression for the SQL case-phrase.
|
DBCommand |
DBCommand.where(DBCompareExpr... exprs)
Adds a list of constraints to the where phrase of the sql statement
If another restriction already exists for the same column it will be replaced.
|
DBCommand |
DBCommand.where(DBCompareExpr expr)
Adds a constraint to the where phrase of the sql statement
If another restriction already exists for the same column it will be replaced.
|
Modifier and Type | Method and Description |
---|---|
void |
DBCommand.addWhereConstraints(List<DBCompareExpr> constraints)
Adds a list of constraints to the command.
|
DBColumnExpr |
DBDatabase.caseWhen(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseValue) |
protected DBCompareExpr |
DBCommand.findConstraintOn(List<DBCompareExpr> list,
DBColumnExpr colExpr)
finds a constraint on a particular column to the 'where' or 'having' collections
|
protected void |
DBCommand.removeAllCommandParams(List<DBCompareExpr> list)
internally used to remove all command params used in a list of constraints
|
protected boolean |
DBCommand.removeConstraint(List<DBCompareExpr> list,
DBCompareExpr cmpExpr)
removes a constraint on a particular column to the 'where' or 'having' collections
|
protected DBCompareExpr |
DBCommand.removeConstraintOn(List<DBCompareExpr> list,
DBColumnExpr colExpr)
removes a constraint on a particular column to the 'where' or 'having' collections
|
protected void |
DBCommand.setConstraint(List<DBCompareExpr> list,
DBCompareExpr expr)
adds a constraint to the 'where' or 'having' collections
|
Constructor and Description |
---|
DBCaseExpr(DBCompareExpr compExpr,
DBColumnExpr trueExpr,
DBColumnExpr elseExpr)
Constructs a DBCaseExpr
|
Constructor and Description |
---|
DBCaseWhenExpr(Map<DBCompareExpr,DBColumnExpr> whenMap,
DBColumnExpr elseExpr)
Constructs a DBCaseExpr
|
Modifier and Type | Class and Description |
---|---|
class |
DBCompareAndOrExpr
This class is used for combining two filter constraints by and / or operator
There is no need to explicitly create instances of this class. |
class |
DBCompareColExpr
This class is used for defining filter constraints based on a column expression in SQL
There is no need to explicitly create instances of this class. |
class |
DBCompareNotExpr
This class is used for defining filter constraints based on a column expression in SQL
There is no need to explicitly create instances of this class. |
class |
DBCompareParenthesisExpr
This class wraps an existing compare expression with parenthesis.
|
class |
DBExistsExpr
This class is used for building up the SQL-Command for the EXISTS syntax.
|
Modifier and Type | Field and Description |
---|---|
DBCompareExpr |
DBExistsExpr.compareExpr |
DBCompareExpr |
DBCompareNotExpr.expr |
protected DBCompareExpr |
DBCompareAndOrExpr.left |
protected DBCompareExpr |
DBCompareAndOrExpr.right |
Modifier and Type | Method and Description |
---|---|
DBCompareExpr |
DBExistsExpr.copy(DBCommand newCmd)
Copy Command
|
DBCompareExpr |
DBCompareParenthesisExpr.copy(DBCommand newCmd) |
DBCompareExpr |
DBCompareNotExpr.copy(DBCommand newCmd)
Copy Command
|
abstract DBCompareExpr |
DBCompareExpr.copy(DBCommand newCmd)
internally used for command cloning
|
DBCompareExpr |
DBCompareColExpr.copy(DBCommand newCmd)
Copy Command
|
DBCompareExpr |
DBCompareAndOrExpr.copy(DBCommand newCmd)
Copy Command
|
DBCompareExpr |
DBCompareNotExpr.getExpr()
Returns the wrapped expression
|
DBCompareExpr |
DBCompareAndOrExpr.getLeft() |
DBCompareExpr |
DBCompareAndOrExpr.getRight() |
DBCompareExpr |
DBCompareExpr.not()
Creates a sql-expression for the not() function.
|
DBCompareExpr |
DBCompareAndOrExpr.parenthesis()
wraps the current expression with parenthesis.
|
DBCompareExpr |
DBCompareParenthesisExpr.unwrap() |
Modifier and Type | Method and Description |
---|---|
DBCompareAndOrExpr |
DBCompareExpr.and(DBCompareExpr expr)
Creates a new DBCompareAndOrExpr object.
|
boolean |
DBExistsExpr.isMutuallyExclusive(DBCompareExpr other)
Returns wheter the constraint should replace another one or not.
|
boolean |
DBCompareParenthesisExpr.isMutuallyExclusive(DBCompareExpr other) |
boolean |
DBCompareNotExpr.isMutuallyExclusive(DBCompareExpr other)
Returns whether the constraint should replace another one or not.
|
abstract boolean |
DBCompareExpr.isMutuallyExclusive(DBCompareExpr other) |
boolean |
DBCompareColExpr.isMutuallyExclusive(DBCompareExpr other)
Returns whether the constraint should replace another one or not.
|
boolean |
DBCompareAndOrExpr.isMutuallyExclusive(DBCompareExpr other)
Returns whether the constraint should replace another one or not.
|
DBCompareAndOrExpr |
DBCompareExpr.or(DBCompareExpr expr)
Create a new DBCompareAndOrExpr object.
|
Constructor and Description |
---|
DBCompareAndOrExpr(DBCompareExpr left,
DBCompareExpr right,
boolean or)
Constructs a DBCompareColExpr object
|
DBCompareNotExpr(DBCompareExpr expr)
Constructs a DBCompareColExpr object
|
DBCompareParenthesisExpr(DBCompareExpr expr) |
DBExistsExpr(DBCommandExpr cmd,
DBCompareExpr compareExpr)
Constructs a DBExistsExpr object set the specified parameters to this object.
|
Modifier and Type | Field and Description |
---|---|
protected DBCompareExpr |
DBCompareJoinExpr.cmp |
DBCompareExpr |
DBColumnJoinExpr.compExpr |
Modifier and Type | Method and Description |
---|---|
DBCompareExpr |
DBCompareJoinExpr.getJoinConstraint() |
DBCompareExpr |
DBColumnJoinExpr.getWhere()
Returns any additional constraints to the join
|
Modifier and Type | Method and Description |
---|---|
DBColumnJoinExpr |
DBColumnJoinExpr.and(DBCompareExpr expr)
This function adds an additional constraint to the join.
|
void |
DBColumnJoinExpr.where(DBCompareExpr expr)
This function adds an additional constraint to the join.
|
Constructor and Description |
---|
DBCompareJoinExpr(DBRowSet rset,
DBCompareExpr cmp,
DBJoinType joinType)
Constructs a new DBJoinExprEx
|
Modifier and Type | Field and Description |
---|---|
protected DBCompareExpr |
DBCommandOracle.connectBy |
protected DBCompareExpr |
DBCommandOracle.startWith |
Modifier and Type | Method and Description |
---|---|
void |
DBCommandOracle.connectByPrior(DBCompareExpr expr) |
void |
DBCommandOracle.startWith(DBCompareExpr expr) |
Modifier and Type | Class and Description |
---|---|
class |
PostgresAtAt
PostgresAtAt
create a Postgres @@ comparator
|
Modifier and Type | Method and Description |
---|---|
DBCompareExpr |
PostgresAtAt.copy(DBCommand newCmd) |
Modifier and Type | Method and Description |
---|---|
protected void |
PostgresBoolAndOrExpr.appendName(StringBuilder buf,
DBCompareExpr expr) |
boolean |
PostgresAtAt.isMutuallyExclusive(DBCompareExpr other) |
DBColumnExpr |
DBCommandPostgres.pgBoolAnd(DBCompareExpr cmpExpr)
See https://www.postgresql.org/docs/current/textsearch-controls.html
|
DBColumnExpr |
DBCommandPostgres.pgBoolOr(DBCompareExpr cmpExpr)
See https://www.postgresql.org/docs/current/textsearch-controls.html
|
Constructor and Description |
---|
PostgresBoolAndOrExpr(DBCompareExpr cmpExpr,
boolean or) |
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.