Uses of Class
org.apache.empire.db.expr.column.DBCaseExpr
Packages that use DBCaseExpr
Package
Description
This package contains the core Empire-DB implementation classes.
This package contains SQL-generator classes for column expressions.
-
Uses of DBCaseExpr in org.apache.empire.db
Methods in org.apache.empire.db that return DBCaseExprModifier and TypeMethodDescriptionDBDatabase.caseMap(DBColumnExpr column, Object cmpValue, Object trueValue, Object falseValue) Creates a SQL case expression in the form "case [Expr] when [compareValue] then [trueValue] else [elseValue] end"DBDatabase.caseMap(DBColumnExpr column, Map<? extends Object, ? extends Object> valueMap, Object elseValue) Creates a SQL case expression in the form "case [Expr] when [mapKey] then [mapValue] else [elseValue] end"DBDatabase.caseMap(DBColumnExpr column, Options options, Object elseValue) Creates a SQL case expression in the form "case [Expr] when [optionValue] then [optionText] else [elseValue] end"DBDatabase.caseWhen(Map<DBCompareExpr, ? extends Object> whenMap, Object elseValue) Creates a SQL case expression in the form "case when [mapKey] then [mapValue] else [elseValue] end"DBDatabase.caseWhen(DBCompareExpr condition, Object trueValue, Object falseValue) Creates a SQL case expression in the form "case when [condition] then [trueValue] else [falseValue] end" This is a helper function to simplify client usageDBDatabase.caseWhenNull(DBColumnExpr column, Object trueValue, Object falseValue) Creates a SQL case expression that check whether a column or column expression is null "case when [condition] is null then [trueValue] else [falseValue] end" This is a helper function to simplify client usagefinal DBCaseExprDBColumnExpr.when(DBCompareExpr compExpr, Object otherwise) Creates and returns a sql-expression for the SQL case-phrase.
The result will be in the form:
"case when [compExpr] then [this] else [otherwise] end" -
Uses of DBCaseExpr in org.apache.empire.db.expr.column
Subclasses of DBCaseExpr in org.apache.empire.db.expr.columnModifier and TypeClassDescriptionclassThis class is used to create a SQL CASE constraint in the form of case {expr} when {value1} then {result1} when {value2} then {result2} ...classThis class is used to create a SQL CASE constraint in the form of case when {cond1} then {result1} when {cond2} then {result2} ...