Constructors Summary |
---|
public FieldTypeDefinition()
defaultSize = 10;
isSizeRequired = false;
isSizeAllowed = true;
maxPrecision = 10;
minScale = 0;
maxScale = 0;
shouldAllowNull = true;
|
public FieldTypeDefinition(String databaseTypeName)Return a new field type.
this();
name = databaseTypeName;
|
public FieldTypeDefinition(String databaseTypeName, int defaultSize)Return a new field type with a required size defaulting to the defaultSize.
this();
this.name = databaseTypeName;
this.defaultSize = defaultSize;
this.isSizeRequired = true;
setMaxPrecision(defaultSize);
|
public FieldTypeDefinition(String databaseTypeName, int defaultSize, int defaultSubSize)Return a new field type with a required size defaulting to the defaultSize.
this();
this.name = databaseTypeName;
this.defaultSize = defaultSize;
this.defaultSubSize = defaultSubSize;
this.isSizeRequired = true;
setMaxPrecision(defaultSize);
setMaxScale(defaultSubSize);
|
public FieldTypeDefinition(String databaseTypeName, boolean allowsSize)Return a new field type with a required size defaulting to the defaultSize.
this();
this.name = databaseTypeName;
this.isSizeAllowed = allowsSize;
|
public FieldTypeDefinition(String databaseTypeName, boolean allowsSize, boolean allowsNull)Return a new field type with a required size defaulting to the defaultSize and
shouldAllowNull set to allowsNull.
this(databaseTypeName, allowsSize);
this.shouldAllowNull = allowsNull;
|
Methods Summary |
---|
public int | getDefaultSize()Return the default size for this type.
This default size will be used if the database requires specification of a size,
and the table definition did not provide one.
return defaultSize;
|
public int | getDefaultSubSize()Return the default sub-size for this type.
This default size will be used if the database requires specification of a size,
and the table definition did not provide one.
return defaultSubSize;
|
public int | getMaxPrecision()
return maxPrecision;
|
public int | getMaxScale()
return maxScale;
|
public int | getMinScale()
return minScale;
|
public java.lang.String | getName()Return the name.
return name;
|
public boolean | isSizeAllowed()Return if this type can support a size specification.
return isSizeAllowed;
|
public boolean | isSizeRequired()Return if this type must have a size specification.
return isSizeRequired;
|
public void | setDefaultSize(int defaultSize)Set the default size for this type.
This default size will be used if the database requires specification of a size,
and the table definition did not provide one.
this.defaultSize = defaultSize;
|
public void | setDefaultSubSize(int defaultSubSize)Set the default sub-size for this type.
This default size will be used if the database requires specification of a size,
and the table definition did not provide one.
this.defaultSubSize = defaultSubSize;
|
public void | setIsSizeAllowed(boolean aBoolean)Set if this type can support a size specification.
isSizeAllowed = aBoolean;
|
public void | setIsSizeRequired(boolean aBoolean)Set if this type must have a size specification.
isSizeRequired = aBoolean;
|
public oracle.toplink.essentials.internal.databaseaccess.FieldTypeDefinition | setLimits(int maxPrecision, int minScale, int maxScale)Set the maximum precision and the minimum and maximum scale.
setMaxPrecision(maxPrecision);
setMinScale(minScale);
setMaxScale(maxScale);
return this;
|
public void | setMaxPrecision(int maximum)
maxPrecision = maximum;
|
public void | setMaxScale(int maximum)
maxScale = maximum;
|
public void | setMinScale(int minimum)
minScale = minimum;
|
public void | setName(java.lang.String name)Set the name.
this.name = name;
|
public void | setShouldAllowNull(boolean allowsNull)Set if this type is allowed to be null for this platform
this.shouldAllowNull = allowsNull;
|
public void | setSizeDisallowed()Set this type to not allow a size specification.
setIsSizeAllowed(false);
|
public void | setSizeOptional()Set this type to optionally have a size specification.
setIsSizeRequired(false);
setIsSizeAllowed(true);
|
public void | setSizeRequired()Set this type to require to have a size specification.
setIsSizeRequired(true);
|
public boolean | shouldAllowNull()Return if this type is allowed to be null for this platform
return this.shouldAllowNull;
|
public java.lang.String | toString()
return Helper.getShortClassName(getClass()) + "(" + getName() + ")";
|