|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.catalog.types.TypeDescriptorImpl
| Field Summary | |
private boolean |
isNullable
|
private int |
maximumWidth
|
private int |
precision
|
private int |
scale
|
private BaseTypeIdImpl |
typeId
This class implements Formatable. |
| Fields inherited from interface org.apache.derby.catalog.TypeDescriptor |
MAXIMUM_WIDTH_UNKNOWN |
| Constructor Summary | |
TypeDescriptorImpl()
Public niladic constructor. |
|
TypeDescriptorImpl(BaseTypeIdImpl typeId,
boolean isNullable,
int maximumWidth)
Constructor for use with non-numeric types |
|
TypeDescriptorImpl(BaseTypeIdImpl typeId,
int precision,
int scale,
boolean isNullable,
int maximumWidth)
Constructor for use with numeric types |
|
TypeDescriptorImpl(TypeDescriptorImpl source,
boolean isNullable,
int maximumWidth)
Constructor for internal uses only |
|
TypeDescriptorImpl(TypeDescriptorImpl source,
int precision,
int scale,
boolean isNullable,
int maximumWidth)
Constructor for internal uses only. |
|
| Method Summary | |
boolean |
equals(java.lang.Object object)
Compare if two TypeDescriptors are exactly the same |
int |
getJDBCTypeId()
Get the jdbc type id for this type. |
int |
getMaximumWidth()
Returns the maximum width of the type. |
int |
getMaximumWidthInBytes()
Return the length of this type in bytes. |
int |
getPrecision()
Returns the number of decimal digits for the datatype, if applicable. |
int |
getScale()
Returns the number of digits to the right of the decimal for the datatype, if applicable. |
java.lang.String |
getSQLstring()
Converts this data type descriptor (including length/precision) to a string. |
int |
getTypeFormatId()
Get the formatID which corresponds to this class. |
BaseTypeIdImpl |
getTypeId()
Get the type Id stored within this type descriptor. |
java.lang.String |
getTypeName()
Gets the name of this datatype. |
boolean |
isNullable()
Returns TRUE if the datatype can contain NULL, FALSE if not. |
void |
readExternal(java.io.ObjectInput in)
Read this object from a stream of stored objects. |
void |
setNullability(boolean nullable)
Set the nullability of the datatype described by this descriptor |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
Write this object to a stream of stored objects. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private BaseTypeIdImpl typeId
private int precision
private int scale
private boolean isNullable
private int maximumWidth
| Constructor Detail |
public TypeDescriptorImpl()
public TypeDescriptorImpl(BaseTypeIdImpl typeId,
int precision,
int scale,
boolean isNullable,
int maximumWidth)
typeId - The typeId of the type being describedprecision - The number of decimal digits.scale - The number of digits after the decimal point.isNullable - TRUE means it could contain NULL, FALSE means
it definitely cannot contain NULL.maximumWidth - The maximum number of bytes for this datatype
public TypeDescriptorImpl(BaseTypeIdImpl typeId,
boolean isNullable,
int maximumWidth)
typeId - The typeId of the type being describedisNullable - TRUE means it could contain NULL, FALSE means
it definitely cannot contain NULL.maximumWidth - The maximum number of bytes for this datatype
public TypeDescriptorImpl(TypeDescriptorImpl source,
int precision,
int scale,
boolean isNullable,
int maximumWidth)
source - The DTSI to copyprecision - The number of decimal digits.scale - The number of digits after the decimal point.isNullable - TRUE means it could contain NULL, FALSE means
it definitely cannot contain NULL.maximumWidth - The maximum number of bytes for this datatype
public TypeDescriptorImpl(TypeDescriptorImpl source,
boolean isNullable,
int maximumWidth)
source - The DTSI to copyisNullable - TRUE means it could contain NULL, FALSE means
it definitely cannot contain NULL.maximumWidth - The maximum number of bytes for this datatype| Method Detail |
public int getMaximumWidth()
TypeDescriptor
getMaximumWidth in interface TypeDescriptorTypeDescriptor.getMaximumWidth()public int getMaximumWidthInBytes()
getMaximumWidthInBytes in interface TypeDescriptorTypeDescriptor.getMaximumWidthInBytes()public int getJDBCTypeId()
getJDBCTypeId in interface TypeDescriptorTypespublic java.lang.String getTypeName()
getTypeName in interface TypeDescriptorpublic int getPrecision()
getPrecision in interface TypeDescriptorpublic int getScale()
getScale in interface TypeDescriptorpublic boolean isNullable()
isNullable in interface TypeDescriptorpublic void setNullability(boolean nullable)
nullable - TRUE means set nullability to TRUE, FALSE
means set it to FALSEpublic java.lang.String getSQLstring()
getSQLstring in interface TypeDescriptorpublic java.lang.String toString()
public BaseTypeIdImpl getTypeId()
public boolean equals(java.lang.Object object)
object - the dataTypeDescriptor to compare to.
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - read this.
java.io.IOException - thrown on error
java.lang.ClassNotFoundException - thrown on error
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - write bytes here.
java.io.IOException - thrown on errorpublic int getTypeFormatId()
getTypeFormatId in interface TypedFormat
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||