public abstract class SqlTable extends SqlTableIdentity
Modifier and Type | Class and Description |
---|---|
class |
SqlTable.Database
The Class Database.
|
class |
SqlTable.Indices
The Class Indices.
|
static class |
SqlTable.Sql
The Class Sql.
|
class |
SqlTable.Util
The Class Util.
|
TableExpression.Utils
Modifier and Type | Field and Description |
---|---|
protected SqlField[] |
cachedFields
The cached fields.
|
protected String[] |
columnNames
The column names.
|
protected DatabaseGateway<?> |
databaseGateway
The database gateway.
|
SqlTable.Database |
db
The db.
|
static String |
LABEL_METHOD_BitmapIndex
The Constant LABEL_METHOD_BitmapIndex.
|
static String |
LABEL_METHOD_ForeignKey
The Constant LABEL_METHOD_ForeignKey.
|
static String |
LABEL_METHOD_Index
The Constant LABEL_METHOD_Index.
|
static String |
LABEL_METHOD_PrimaryKey
The Constant LABEL_METHOD_PrimaryKey.
|
static String |
LABEL_METHOD_UniqueIndex
The Constant LABEL_METHOD_UniqueIndex.
|
protected static String |
NOT_NULL
The Constant NOT_NULL.
|
protected static String |
NULL
The Constant NULL.
|
protected SqlPrimaryKey |
primaryKey
The primary key.
|
protected static String |
UNIQUE
The Constant UNIQUE.
|
SqlTable.Util |
util
The util.
|
Constructor and Description |
---|
SqlTable(SqlTable table,
String alias)
Instantiates a new sql table.
|
SqlTable(String schema,
String name,
String alias)
Instantiates a new sql table.
|
SqlTable(String schema,
String name,
String alias,
String[] columnNames)
Instantiates a new sql table.
|
Modifier and Type | Method and Description |
---|---|
SqlTable |
AS(String newAlias)
AS.
|
protected static SqlField |
BIGINT(String... params)
BIGINT.
|
protected static SqlField |
BINARY(int length,
String... params)
BINARY.
|
protected static SqlIndex |
BitmapIndex(Object... columnList)
Bitmap index.
|
protected static SqlField |
BLOB(int length,
String... params)
BLOB.
|
protected static SqlField |
BOOLEAN(String... params)
BOOLEAN.
|
protected static SqlField |
CHAR(int length,
String... params)
CHAR.
|
protected static SqlField |
CLOB(int length,
String... params)
CLOB.
|
protected static SqlField |
createColumn(SQL.DATATYPE type,
int length,
Integer precision,
Integer scale,
Object... params)
Creates the column.
|
protected static SqlField |
createColumn(String name,
SQL.DATATYPE type,
int length)
Creates the column.
|
protected static SqlField |
createColumn(String name,
SQL.DATATYPE type,
int length,
Integer precision,
Integer scale,
boolean notNull,
boolean unique,
String defaultValue)
Creates the column.
|
protected static SqlField |
DATE(String... params)
DATE.
|
protected static SqlField |
DECIMAL(Integer precision,
Integer scale,
String... params)
DECIMAL.
|
protected static SqlField |
DECIMAL(Integer precision,
String... params)
DECIMAL.
|
protected static SqlField |
DECIMAL(String... params)
DECIMAL.
|
protected static SqlField |
DOUBLE(String... params)
DOUBLE.
|
protected static SqlField |
FLOAT(String... params)
FLOAT.
|
protected static SqlIndex |
ForeignKey(Object... columnList)
Foreign key.
|
protected DatabaseGateway<?> |
getDatabaseGateway()
Gets the database gateway.
|
protected SqlTable.Database |
getDbIntern()
Gets the db intern.
|
protected SqlTable.Indices |
getIndicesIntern()
Gets the indices intern.
|
protected SqlTable |
getTopLevelInstance()
Gets the top level instance.
|
protected static SqlIndex |
Index(Object... columnList)
Index.
|
protected void |
initializeColumns()
Initialize columns.
|
protected void |
initializeIndices()
Initialize indices.
|
protected static SqlField |
INT(String... params)
INT.
|
protected static SqlField |
LONGVARBINARY(int length,
String... params)
LONGVARBINARY.
|
protected static SqlField |
LONGVARCHAR(int length,
String... params)
LONGVARCHAR.
|
protected static SqlField |
NCHAR(int length,
String... params)
NCHAR.
|
protected static SqlField |
NUMERIC(Integer precision,
Integer scale,
String... params)
NUMERIC.
|
protected static SqlField |
NUMERIC(Integer precision,
String... params)
NUMERIC.
|
protected static SqlField |
NUMERIC(String... params)
NUMERIC.
|
protected static SqlField |
NVARCHAR(int length,
String... params)
NVARCHAR.
|
protected static SqlPrimaryKey |
PrimaryKey(Object... columnList)
Primary key.
|
protected static SqlField |
REAL(String... params)
REAL.
|
protected SELECT[] |
selectFromHirarchieFlat(Object[] columns)
Select from hirarchie flat.
|
protected SELECT |
selectFromHirarchieHirarchical(Object[] columns)
Select from hirarchie hirarchical.
|
protected static SqlField |
SMALLINT(String... params)
SMALLINT.
|
SqlTable.Sql |
sql() |
protected static SqlField |
TIME(String... params)
TIME.
|
protected static SqlField |
TIMESTAMP(String... params)
TIMESTAMP.
|
protected static SqlField |
TINYINT(String... params)
TINYINT.
|
protected static SqlIndex |
UniqueIndex(Object... columnList)
Unique index.
|
protected static SqlField |
VARBINARY(int length,
String... params)
VARBINARY.
|
protected static SqlField |
VARCHAR(int length,
String... params)
VARCHAR.
|
equals, hashCode
toString
public static final String LABEL_METHOD_PrimaryKey
public static final String LABEL_METHOD_ForeignKey
public static final String LABEL_METHOD_Index
public static final String LABEL_METHOD_BitmapIndex
public static final String LABEL_METHOD_UniqueIndex
protected static final String NULL
protected static final String NOT_NULL
protected static final String UNIQUE
public final SqlTable.Database db
public final SqlTable.Util util
protected DatabaseGateway<?> databaseGateway
protected SqlField[] cachedFields
protected String[] columnNames
protected SqlPrimaryKey primaryKey
public SqlTable(String schema, String name, String alias)
schema
- the schemaname
- the namealias
- the aliaspublic SqlTable(SqlTable table, String alias)
table
- the tablealias
- the aliasprotected static SqlField createColumn(SQL.DATATYPE type, int length, Integer precision, Integer scale, Object... params)
type
- the typelength
- the lengthprecision
- the precisionscale
- the scaleparams
- the paramsprotected static SqlField createColumn(String name, SQL.DATATYPE type, int length)
name
- the nametype
- the typelength
- the lengthprotected static SqlField createColumn(String name, SQL.DATATYPE type, int length, Integer precision, Integer scale, boolean notNull, boolean unique, String defaultValue)
name
- the nametype
- the typelength
- the lengthprecision
- the precisionscale
- the scalenotNull
- the not nullunique
- the uniquedefaultValue
- the default valueprotected static final SqlField TINYINT(String... params)
params
- the paramsprotected static final SqlField SMALLINT(String... params)
params
- the paramsprotected static final SqlField INT(String... params)
params
- the paramsprotected static final SqlField BIGINT(String... params)
params
- the paramsprotected static final SqlField BOOLEAN(String... params)
params
- the paramsprotected static final SqlField CHAR(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField VARCHAR(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField NCHAR(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField NVARCHAR(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField BINARY(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField VARBINARY(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField REAL(String... params)
params
- the paramsprotected static final SqlField FLOAT(String... params)
params
- the paramsprotected static final SqlField DOUBLE(String... params)
params
- the paramsprotected static final SqlField NUMERIC(String... params)
params
- the paramsprotected static final SqlField NUMERIC(Integer precision, String... params)
precision
- the precisionparams
- the paramsprotected static final SqlField NUMERIC(Integer precision, Integer scale, String... params)
precision
- the precisionscale
- the scaleparams
- the paramsprotected static final SqlField DECIMAL(String... params)
params
- the paramsprotected static final SqlField DECIMAL(Integer precision, String... params)
precision
- the precisionparams
- the paramsprotected static final SqlField DECIMAL(Integer precision, Integer scale, String... params)
precision
- the precisionscale
- the scaleparams
- the paramsprotected static final SqlField TIME(String... params)
params
- the paramsprotected static final SqlField DATE(String... params)
params
- the paramsprotected static final SqlField TIMESTAMP(String... params)
params
- the paramsprotected static final SqlField LONGVARCHAR(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField LONGVARBINARY(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField BLOB(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlField CLOB(int length, String... params)
length
- the lengthparams
- the paramsprotected static final SqlPrimaryKey PrimaryKey(Object... columnList)
columnList
- the column listprotected static final SqlIndex ForeignKey(Object... columnList)
columnList
- the column listprotected static final SqlIndex Index(Object... columnList)
columnList
- the column listprotected static final SqlIndex BitmapIndex(Object... columnList)
columnList
- the column listprotected static final SqlIndex UniqueIndex(Object... columnList)
columnList
- the column listpublic SqlTable.Sql sql()
sql
in class SqlTableIdentity
public SqlTable AS(String newAlias) throws SQLEngineException
TableExpression
AS
in interface TableExpression
AS
in class SqlTableIdentity
newAlias
- SQLEngineException
SqlTableIdentity.AS(java.lang.String)
protected SqlTable getTopLevelInstance()
SqlTableIdentity
getTopLevelInstance
in class SqlTableIdentity
SqlTableIdentity.getTopLevelInstance()
protected void initializeColumns()
forceInitialize
- the force initializeprotected void initializeIndices()
forceInitialize
- the force initializeprotected DatabaseGateway<?> getDatabaseGateway()
protected SqlTable.Database getDbIntern()
protected SqlTable.Indices getIndicesIntern()
protected SELECT selectFromHirarchieHirarchical(Object[] columns)
columns
- the columnsCopyright © 2003–2021 XDEV Software. All rights reserved.