|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.templates.typemapping.SqlTypeWithJdbcType
public class SqlTypeWithJdbcType
The SQL type data for a column. Can contain additional information such as default size, scale and defaultValue. This class is immutable.
Constructor Summary | |
---|---|
SqlTypeWithJdbcType(SqlTypeWithJdbcType sqlType,
String size,
String scale,
String defaultValue)
Creates a new SqlType by copying another sql type. |
|
SqlTypeWithJdbcType(String sqlTypeName,
int jdbcType)
Creates a new SqlType with the given SQL Type. |
|
SqlTypeWithJdbcType(String sqlTypeName,
int jdbcType,
String size)
Creates a new SqlType with null scale and null default value. |
|
SqlTypeWithJdbcType(String sqlTypeName,
int jdbcType,
String size,
String scale)
Creates a new SqlType with null default value. |
|
SqlTypeWithJdbcType(String sqlTypeName,
int jdbcType,
String size,
String scale,
String defaultValue)
Creates a new SqlType. |
Method Summary | |
---|---|
String |
getDefaultValue()
|
int |
getJdbcType()
|
String |
getScale()
|
String |
getSize()
|
String |
getSqlTypeName()
|
String |
printSize()
Return the size and scale in brackets for use in an SQL script. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlTypeWithJdbcType(String sqlTypeName, int jdbcType)
sqlType
- the SQL name of the SQL type, not null.jdbcType
- the jdbc type as in java.sql.types
.
NullPointerException
- if sqlTypeName is null.public SqlTypeWithJdbcType(String sqlTypeName, int jdbcType, String size)
sqlTypeName
- the SQL name of the SQL type, not null.jdbcType
- the jdbc type as in java.sql.types
.size
- the default size of the columns with this SQL type.
Can be overridden in the column definition.
NullPointerException
- if sqlTypeName is null.public SqlTypeWithJdbcType(String sqlTypeName, int jdbcType, String size, String scale)
sqlTypeName
- the SQL name of the SQL type, not null.jdbcType
- the jdbc type as in java.sql.types
.size
- the default size of the columns with this SQL type.
Can be overridden in the column definition.scale
- the default scale of the columns with this SQL type.
Can be overridden in the column definition.
NullPointerException
- if sqlTypeName is null.public SqlTypeWithJdbcType(String sqlTypeName, int jdbcType, String size, String scale, String defaultValue)
sqlTypeName
- the SQL name of the SQL type, not null.jdbcType
- the jdbc type as in java.sql.types
.size
- the default size of the columns with this SQL type.
Can be overridden in the column definition.scale
- the default scale of the columns with this SQL type.
Can be overridden in the column definition.defaultValue
- the default "default value" of the columns with this
SQL type. Can be overridden in the column definition.
NullPointerException
- if sqlTypeName is null.public SqlTypeWithJdbcType(SqlTypeWithJdbcType sqlType, String size, String scale, String defaultValue)
sqlType
- the SQL type, to copy, not null.size
- the default size of the columns with this SQL type.
Can be overridden in the column definition.
If null, the size from sqlType is used.scale
- the default scale of the columns with this SQL type.
Can be overridden in the column definition.
If null, the scale from sqlType is used.defaultValue
- the default "default value" of the columns with this
SQL type. Can be overridden in the column definition.
If null, the defaultValue from sqlType is used.
NullPointerException
- if sqlType is null.Method Detail |
---|
public String getScale()
public String getSize()
public String getDefaultValue()
public String getSqlTypeName()
public int getJdbcType()
java.sql.types
.public String printSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |