Class SchemaProperties

java.lang.Object
net.java.ao.types.SchemaProperties

public class SchemaProperties extends Object
Describes the underlying SQL schema type that corresponds to a given TypeInfo. This is determined by the database provider.
  • Method Details

    • schemaType

      public static SchemaProperties schemaType(String sqlTypeName)
      Constructs an instance that refers to the specified SQL type name (e.g. "VARCHAR").
    • jdbcWriteType

      public SchemaProperties jdbcWriteType(int jdbcWriteType)
      Returns a new instance with the same properties, but specifying a JDBC type code. This overrides the value given by the LogicalType.
    • precisionAllowed

      public SchemaProperties 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. This is false by default.
    • scaleAllowed

      public SchemaProperties 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. This is false by default.
    • stringLengthAllowed

      public SchemaProperties 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. This is false by default.
    • defaultValueAllowed

      public SchemaProperties defaultValueAllowed(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. This is true by default.
    • getSqlTypeName

      public String getSqlTypeName()
      Returns the SQL type name (without any precision or length qualifiers).
    • getOverrideJdbcWriteType

      public Integer 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 the LogicalType.
    • hasOverrideJdbcWriteType

      public boolean hasOverrideJdbcWriteType()
      Returns true if this instance specifies a JDBC type code that is different than the default from the LogicalType.
    • 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object