Package net.java.ao.types
Class SchemaProperties
java.lang.Object
net.java.ao.types.SchemaProperties
Describes the underlying SQL schema type that corresponds to a given
TypeInfo.
This is determined by the database provider.-
Method Summary
Modifier and TypeMethodDescriptiondefaultValueAllowed(boolean defaultValueAllowed) Returns a new instance with the same properties, but specifying whether or not a column of this type can have a default value.booleanReturns the JDBC type code to be used when writing to the database (e.g.Returns the SQL type name (without any precision or length qualifiers).inthashCode()booleanReturns true if this instance specifies a JDBC type code that is different than the default from theLogicalType.booleanReturns true if a column of this type is allowed to have a default value.booleanReturns true if this type is allowed to have a numeric precision qualifier.booleanReturns true if this type is allowed to have a numeric scale qualifier.booleanReturns true if this type is allowed to have a string length qualifier.jdbcWriteType(int jdbcWriteType) Returns a new instance with the same properties, but specifying a JDBC type code.precisionAllowed(boolean precisionAllowed) Returns a new instance with the same properties, but specifying whether or not the SQL type can include a numeric precision qualifier.scaleAllowed(boolean scaleAllowed) Returns a new instance with the same properties, but specifying whether or not the SQL type can include a numeric scale qualifier.static SchemaPropertiesschemaType(String sqlTypeName) Constructs an instance that refers to the specified SQL type name (e.g.stringLengthAllowed(boolean stringLengthAllowed) Returns a new instance with the same properties, but specifying whether or not the SQL type can include a string length qualifier.
-
Method Details
-
schemaType
Constructs an instance that refers to the specified SQL type name (e.g. "VARCHAR"). -
jdbcWriteType
Returns a new instance with the same properties, but specifying a JDBC type code. This overrides the value given by theLogicalType. -
precisionAllowed
Returns a new instance with the same properties, but specifying whether or not the SQL type can include a numeric precision qualifier. This is false by default. -
scaleAllowed
Returns a new instance with the same properties, but specifying whether or not the SQL type can include a numeric scale qualifier. This is false by default. -
stringLengthAllowed
Returns a new instance with the same properties, but specifying whether or not the SQL type can include a string length qualifier. This is false by default. -
defaultValueAllowed
Returns a new instance with the same properties, but specifying whether or not a column of this type can have a default value. This is true by default. -
getSqlTypeName
Returns the SQL type name (without any precision or length qualifiers). -
getOverrideJdbcWriteType
Returns the JDBC type code to be used when writing to the database (e.g.Types.VARCHAR), if this is different than the default from theLogicalType. -
hasOverrideJdbcWriteType
public boolean hasOverrideJdbcWriteType()Returns true if this instance specifies a JDBC type code that is different than the default from theLogicalType. -
isPrecisionAllowed
public boolean isPrecisionAllowed()Returns true if this type is allowed to have a numeric precision qualifier. -
isScaleAllowed
public boolean isScaleAllowed()Returns true if this type is allowed to have a numeric scale qualifier. -
isStringLengthAllowed
public boolean isStringLengthAllowed()Returns true if this type is allowed to have a string length qualifier. -
isDefaultValueAllowed
public boolean isDefaultValueAllowed()Returns true if a column of this type is allowed to have a default value. -
equals
-
hashCode
public int hashCode()
-