Package | Description |
---|---|
org.apache.empire.commons |
This package contains various common classes for error handling, specific data types and data type conversion.
|
org.apache.empire.data |
This package contains interfaces for data and metadata handling.
|
org.apache.empire.data.bean |
This package contains implmentations of Empire's data and metadata interfaces for JavaBeans of Data Tranfer Objects (DTO's).
|
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.validation | |
org.apache.empire.dbms | |
org.apache.empire.dbms.derby |
This package contains classes necessary to support the Apache Derby database system.
|
org.apache.empire.dbms.h2 |
This package contains classes necessary to support the H2 database system.
|
org.apache.empire.dbms.hsql |
This package contains classes necessary to support the HSQLDB database system.
|
org.apache.empire.dbms.mysql |
This package contains classes necessary to support the MySQL database system.
|
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.
|
org.apache.empire.dbms.sqlite | |
org.apache.empire.dbms.sqlserver |
This package contains classes necessary to support the Microsoft SQL-Server database system.
|
Modifier and Type | Method and Description |
---|---|
void |
Options.addXml(Element element,
DataType dataType)
Adds all these options to the xml element
|
Modifier and Type | Method and Description |
---|---|
static DataType |
DataType.fromJavaType(Class<?> javaType)
Returns the DataType from a given Java Type
If the type is not mapped, then DataType.UNKNOWN is returned
|
DataType |
ColumnExpr.getDataType()
Returns the column's data type.
|
static DataType |
DataType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DataType[] |
DataType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
boolean |
DataType.isCompatible(DataType other)
Returns whether or not two DataTypes are compatible
|
Modifier and Type | Method and Description |
---|---|
DataType |
BeanProperty.getDataType()
Returns the data type of the bean property.
|
Modifier and Type | Method and Description |
---|---|
protected BeanProperty |
BeanClass.addProp(String propname,
DataType dataType,
double size,
boolean required) |
protected BeanProperty |
BeanClass.addProp(String propname,
DataType dataType,
double size,
boolean required,
boolean readOnly) |
protected BeanProperty |
BeanClass.addProp(String propname,
DataType dataType,
double size,
boolean required,
String controlType) |
protected BeanProperty |
BeanClass.addProp(String propname,
DataType dataType,
double size,
boolean required,
String controlType,
boolean readOnly) |
protected boolean |
BeanResult.isPropertyAcessible(Method[] methods,
String property,
DataType dataType)
Checks if the property is accessible i.e. has a getter method on the beanType
|
Constructor and Description |
---|
BeanProperty(String name,
DataType dataType,
double size,
boolean required)
Constructs a bean property definition
|
BeanProperty(String name,
DataType dataType,
double size,
boolean required,
String controlType)
Constructs a bean property definition
|
BeanProperty(String name,
DataType dataType,
double size,
boolean required,
String controlType,
boolean readOnly)
Constructs a bean property definition
|
Modifier and Type | Field and Description |
---|---|
protected DataType |
DBView.DBViewColumn.dataType |
protected DataType |
DBTableColumn.type |
protected DataType |
DBCmdParam.type |
Modifier and Type | Method and Description |
---|---|
DataType |
DBDatabase.detectDataType(Object value)
Detects the DataType of a given value.
|
DataType |
DBView.DBViewColumn.getDataType() |
DataType |
DBTableColumn.getDataType()
Returns the data type.
|
DataType |
DBQueryColumn.getDataType() |
abstract DataType |
DBCommandExpr.getDataType()
Returns the DataType selected by this command if only one column is returned
If the command has more than one select expression DataType.UNKNOWN will be returned
|
DataType |
DBCommandExpr.DBCmdColumn.getDataType()
Returns the data type of the DBColumnExpr object.
|
DataType |
DBCommand.getDataType() |
DataType |
DBCombinedCmd.getDataType() |
abstract DataType |
DBColumnExpr.getDataType()
Returns the data type of this column expression.
|
DataType |
DBCmdParam.getDataType()
Returns the data type of the command parameter
|
Modifier and Type | Method and Description |
---|---|
void |
DBCmdParamList.add(DBCommand cmd,
DataType type,
Object value) |
protected DBView.DBViewColumn |
DBView.addColumn(String columnName,
DataType dataType)
Adds a column to the view.
|
protected DBView.DBViewColumn |
DBView.addColumn(String columnName,
DataType dataType,
double size)
Adds a column to the view.
|
DBTableColumn |
DBTable.addColumn(String columnName,
DataType type,
double size,
boolean required)
Creates a new table column and adds it to the table's column list
|
DBTableColumn |
DBTable.addColumn(String columnName,
DataType type,
double size,
boolean required,
Class<?> enumType)
Creates a new table column with Enum-Options and adds it to the table's column list
This overload should be used for column containing enum values which have no default value.
|
DBTableColumn |
DBTable.addColumn(String columnName,
DataType type,
double size,
boolean required,
Enum<?> enumValue)
Creates a new table column with Enum-Options and adds it to the table's column list
This overload should be used for column containing enum values which have a default value.
|
DBTableColumn |
DBTable.addColumn(String columnName,
DataType type,
double size,
boolean required,
Object defValue)
Creates a new DBTableColumn object and adds it to the column collection.
|
DBTableColumn |
DBTable.addColumn(String columnName,
DataType type,
double size,
boolean required,
Options options)
Creates a new table column with options and adds it to the table's column list
This overload should be used for column containing enum values which have no default value.
|
DBTableColumn |
DBTable.addColumn(String columnName,
DataType type,
double size,
boolean required,
Options options,
Object defValue)
Creates a new table column with options and adds it to the table's column list
This overload should be used for column containing enum values which have a default value.
|
DBCmdParam |
DBCommand.addParam(DataType type,
Object value)
Adds an command parameter which will be used in a prepared statement.
|
DBColumnExpr |
DBColumnExpr.aggregate(String template,
DataType returnType,
Object... params)
Creates and returns a function from an sql template
The template may consist of the following placeholders:
?
|
protected boolean |
DBDDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql)
appends the data type of a column
|
protected void |
DBSQLBuilder.appendSimpleValue(DataType type,
Object value)
Returns a sql string for a given value.
|
protected void |
DBSQLBuilder.appendStringLiteral(DataType type,
Object value)
encodes Text values for an SQL command string.
|
void |
DBSQLBuilder.appendTemplate(String template,
Object[] values,
DataType[] dataTypes,
long context,
String arraySep)
Expands an SQL template and adds it to the SQL command
|
void |
DBSQLBuilder.appendValue(DataType type,
Object value)
Appends the SQL representation of a value
|
void |
DBSQLBuilder.appendValue(DataType dataType,
Object value,
long context,
String arraySep)
Appends the SQL representation of a value
|
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.
|
protected DBTableColumn |
DBTable.createAndAppendColumn(String columnName,
DataType type,
double size,
boolean required,
Object defValue)
Creates a new Column object and appends it to the column list
|
DBColumnExpr |
DBColumnExpr.function(String template,
DataType returnType,
Object... params)
Creates and returns a function from an sql template
The template may consist of the following placeholders:
?
|
protected DBColumnExpr |
DBColumnExpr.getExprFromPhrase(DBSqlPhrase phrase,
Object[] params,
DataType dataType)
Creates a new DBFuncExpr from a given SQL-PRHASE and
optional additional parameters.
|
protected String |
DBSQLBuilder.getNumberString(Object value,
DataType type)
encodes a numeric value for an SQL command string.
|
DBValueExpr |
DBDatabase.getValueExpr(Object value,
DataType dataType)
Creates and returns a value object for the given scalar value.
|
<T> int |
DBUtils.querySimpleList(Class<T> c,
String sqlCmd,
Object[] sqlParams,
DataType dataType,
Collection<T> result,
int maxRows)
Adds the first column of a query result to a collection.
|
Object |
DBUtils.querySingleValue(String sqlCmd,
Object[] sqlParams,
DataType dataType,
boolean failOnNoResult)
Returns the value of the first row/column of a sql-query as an object.
|
protected Number |
DBDatabase.validateNumber(DBTableColumn column,
DataType type,
Number n) |
Constructor and Description |
---|
DBCmdParam(DBCommand cmd,
DataType type,
Object value)
Protected constructor used e.g. by DBCommand.addParam(...)
|
DBTableColumn(DBTable table,
DataType type,
String name,
double size,
boolean required,
boolean autoGenerated,
Object defValue)
Constructs a DBTableColumn object set the specified parameters to this object.
|
Modifier and Type | Field and Description |
---|---|
DataType |
DBScalarExpr.dataType |
protected DataType |
DBAbstractFuncExpr.dataType |
DataType |
DBValueExpr.type |
Modifier and Type | Method and Description |
---|---|
DataType |
DBVarArgsFuncExpr.getDataType() |
DataType |
DBValueExpr.getDataType()
Returns the data type of the DBColumnExpr object.
|
DataType |
DBScalarExpr.getDataType()
Returns the data type of the DBColumnExpr object.
|
DataType |
DBParenthesisExpr.getDataType()
Returns the data type of the DBColumnExpr object.
|
DataType |
DBCountExpr.getDataType()
Returns the data type: DT_INTEGER.
|
DataType |
DBConcatExpr.getDataType()
Returns the data type:
VARCHAR |
DataType |
DBCmdResultExpr.getDataType() |
DataType |
DBCaseWhenExpr.getDataType() |
DataType |
DBCaseExpr.getDataType() |
DataType |
DBCalcExpr.getDataType()
Returns the data type: DBDataType.DECIMAL.
|
DataType |
DBAliasExpr.getDataType()
Returns the data type of the DBColumnExpr object.
|
DataType |
DBAbstractFuncExpr.getDataType()
Returns the data type of the DBColumnExpr object.
|
Constructor and Description |
---|
DBAbstractFuncExpr(DBColumnExpr expr,
boolean isAggregate,
DataType dataType)
Constructs a new DBFuncExpr object set the specified parameters to this object.
|
DBConvertExpr(DBColumnExpr expr,
DataType dataType,
Object format)
Constructs a DBDecodeExpr
|
DBDecodeExpr(DBColumnExpr expr,
Map<?,?> valueMap,
Object elseExpr,
DataType dataType)
Constructs a DBDecodeExpr
|
DBFuncExpr(DBColumnExpr expr,
DBSqlPhrase phrase,
Object[] params,
DataType dataType)
Constructs a new DBFuncExpr object set the specified parameters to this object.
|
DBFuncExpr(DBColumnExpr expr,
String template,
Object[] params,
boolean isAggregate,
DataType dataType)
Constructs a new DBFuncExpr object set the specified parameters to this object.
|
DBScalarExpr(DBDatabase db,
String template,
Object[] params,
DataType dataType)
Constructs a new DBValueExpr object.
|
DBScalarExpr(DBDatabase db,
String template,
Object param,
DataType dataType)
Constructs a new DBValueExpr object.
|
DBValueExpr(DBDatabase db,
Object value,
DataType type)
Constructs a new DBValueExpr object.
|
DBVarArgsFuncExpr(DBDatabase db,
DataType dataType,
String template,
DBColumnExpr... cols) |
Modifier and Type | Method and Description |
---|---|
protected DataType |
DBModelParser.getEmpireDataType(int sqlType) |
Modifier and Type | Method and Description |
---|---|
void |
DBModelErrorLogger.columnTypeMismatch(DBColumn col,
DataType type)
handle columnTypeMismatch errors
|
void |
DBModelErrorHandler.columnTypeMismatch(DBColumn col,
DataType type)
This method is called when the type of a column in the Empire-db
definition does not match the database.
|
protected double |
DBModelParser.getColumnSize(DataType empireType,
ResultSet rs) |
Modifier and Type | Method and Description |
---|---|
String |
DBMSHandler.getConvertPhrase(DataType destType,
DataType srcType,
Object format)
Returns a data type convertion phrase template for this dbms
The returned template must contain a '?' |
Object |
DBMSHandlerBase.getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Reads a single column value from the given JDBC ResultSet and returns a value object of desired data type.
|
Object |
DBMSHandler.getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Reads a single column value from the given JDBC ResultSet and returns a value object of desired data type.
|
Object |
DBMSHandlerBase.querySingleValue(String sqlCmd,
Object[] sqlParams,
DataType dataType,
Connection conn)
Query a single value
|
Object |
DBMSHandler.querySingleValue(String sqlCmd,
Object[] sqlParams,
DataType dataType,
Connection conn)
Executes an select SQL-command that returns only one scalar value
if no row are returned by the query then ObjectUtils.NO_VALUE is returned
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
DerbyDDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql) |
String |
DBMSHandlerDerby.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
H2DDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql) |
String |
DBMSHandlerH2.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Modifier and Type | Method and Description |
---|---|
String |
DBMSHandlerHSql.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
MySQLDDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql) |
protected double |
MySQLDBModelParser.getColumnSize(DataType empireType,
ResultSet rs) |
String |
DBMSHandlerMySQL.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Modifier and Type | Method and Description |
---|---|
DataType |
OracleRowNumExpr.getDataType()
Returns the data type of the DBColumnExpr object.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
OracleDDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql) |
String |
DBMSHandlerOracle.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Object |
DBMSHandlerOracle.getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Gets the value of a sql ResultSet.
|
Modifier and Type | Method and Description |
---|---|
DataType |
PostgresBoolAndOrExpr.getDataType() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
PostgresDDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql) |
String |
DBMSHandlerPostgreSQL.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Object |
DBMSHandlerPostgreSQL.getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Postgre needs special handling for CLOBs and BLOB's
|
Constructor and Description |
---|
PostgresFuncExpr(DBColumnExpr expr,
PostgresSqlPhrase phrase,
Object[] params,
DataType dataType) |
Modifier and Type | Method and Description |
---|---|
String |
DBMSHandlerSQLite.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Object |
DBMSHandlerSQLite.getResultValue(ResultSet rset,
int columnIndex,
DataType dataType) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
MSSqlDDLGenerator.appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql) |
protected void |
DBMSHandlerMSSQL.DBSQLBuilderMSSQL.appendStringLiteral(DataType type,
Object value) |
String |
DBMSHandlerMSSQL.getConvertPhrase(DataType destType,
DataType srcType,
Object format) |
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.