public class SizedForBitDataDomain extends Domain
Supports the Derby / DB2 / SQL92 standard for defining Binary data fields with either CHAR(#) FOR BIT DATA or VARCHAR(#) FOR BIT DATA. This can be used in Platform implimentors initialize() methods, by using lines like:
setSchemaDomainMapping(new SizedForBitDataDomain(
SchemaType.BINARY, "CHAR", "1"));
setSchemaDomainMapping(new SizedForBitDataDomain(
SchemaType.VARBINARY, "VARCHAR"));
This will cause the Column.getSqlString() method to produce items similar to:
CHAR(#) FOR BIT DATA
VARCHAR(#)FOR BIT DATA
Where: # is the size= schema attribute or a default size specified in the constructor.
Note that this is dependent on the platform implimentation correctly defining BINARY and VARBINARY as having a size attribute in the "hasSize()" method.
| 构造器和说明 |
|---|
SizedForBitDataDomain() |
SizedForBitDataDomain(Domain domain) |
SizedForBitDataDomain(SchemaType type) |
SizedForBitDataDomain(SchemaType type,
java.lang.String sqlType) |
SizedForBitDataDomain(SchemaType type,
java.lang.String sqlType,
java.lang.String size) |
SizedForBitDataDomain(SchemaType type,
java.lang.String sqlType,
java.lang.String size,
java.lang.String scale) |
SizedForBitDataDomain(java.lang.String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
printSize()
Returns the size postfix for the base SQL Column type.
|
copy, getDefaultSetting, getDefaultValue, getDescription, getName, getScale, getSize, getSqlType, getType, loadFromXML, replaceDefaultValue, replaceScale, replaceSize, replaceType, setDefaultValue, setDescription, setName, setScale, setSize, setSqlType, setType, setTypepublic SizedForBitDataDomain()
org.apache.torque.engine.database.model.Domain#Domain()public SizedForBitDataDomain(java.lang.String name)
org.apache.torque.engine.database.model.Domain#Domain(String)public SizedForBitDataDomain(SchemaType type)
org.apache.torque.engine.database.model.Domain#Domain(SchemaType)public SizedForBitDataDomain(SchemaType type, java.lang.String sqlType)
Domain(SchemaType, String)public SizedForBitDataDomain(SchemaType type, java.lang.String sqlType, java.lang.String size, java.lang.String scale)
Domain(SchemaType, String, String, String)public SizedForBitDataDomain(SchemaType type, java.lang.String sqlType, java.lang.String size)
Domain(SchemaType, String, String)public SizedForBitDataDomain(Domain domain)
Domain(Domain)