org.castor.ddlgen.typeinfo
Class OptionalPrecisionDecimalsType
java.lang.Object
org.castor.ddlgen.typeinfo.AbstractType
org.castor.ddlgen.typeinfo.OptionalPrecisionDecimalsType
- All Implemented Interfaces:
- TypeInfo
public final class OptionalPrecisionDecimalsType
- extends AbstractType
Final TypeInfo for types having optional precision and decimals parameters. An
Exception will be throw if not both parameters are specified from the same source
(mapping or ddl.properties file).
- Since:
- 1.1
- Version:
- $Revision: 8993 $ $Date: 2011-08-02 01:28:52 +0200 (Di, 02 Aug 2011) $
- Author:
- Le Duc Bao, Ralf Joachim
|
Method Summary |
String |
toDDL(Field field)
Build DDL string with SQL type and parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OptionalPrecisionDecimalsType
public OptionalPrecisionDecimalsType(String jdbcType,
String sqlType,
DDLGenConfiguration conf)
- Construct a new TypeInfo instance with given JDBC type, SQL type and Configuration.
- Parameters:
jdbcType - The JDBC type.sqlType - The SQL type.conf - The configuration to get default parameter values from.
toDDL
public String toDDL(Field field)
throws GeneratorException
- Build DDL string with SQL type and parameters.
- Parameters:
field - The field to get specific parameters from.
- Returns:
- Type string for DDL.
- Throws:
GeneratorException - If required parameters is not defined.
Copyright © 2012. All Rights Reserved.