|
||||||||||
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 datatypepublic 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 datatypepublic 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 datatypepublic 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 datatypeMethod Detail |
public int getMaximumWidth()
TypeDescriptor
getMaximumWidth
in interface TypeDescriptor
TypeDescriptor.getMaximumWidth()
public int getMaximumWidthInBytes()
getMaximumWidthInBytes
in interface TypeDescriptor
TypeDescriptor.getMaximumWidthInBytes()
public int getJDBCTypeId()
getJDBCTypeId
in interface TypeDescriptor
Types
public java.lang.String getTypeName()
getTypeName
in interface TypeDescriptor
public int getPrecision()
getPrecision
in interface TypeDescriptor
public int getScale()
getScale
in interface TypeDescriptor
public boolean isNullable()
isNullable
in interface TypeDescriptor
public void setNullability(boolean nullable)
nullable
- TRUE means set nullability to TRUE, FALSE
means set it to FALSEpublic java.lang.String getSQLstring()
getSQLstring
in interface TypeDescriptor
public 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.Externalizable
in
- read this.
java.io.IOException
- thrown on error
java.lang.ClassNotFoundException
- thrown on errorpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- write bytes here.
java.io.IOException
- thrown on errorpublic int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |