|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.ddl.GenericTypeDescriptor
public class GenericTypeDescriptor
GenericTypeDescriptor is a class that describes a SQL type. It can be populated from DatabaseMetaData.getTypeInfo results, or you can make up your own types.
| Field Summary | |
|---|---|
protected int |
dataType
|
protected boolean |
hasPrecision
|
protected boolean |
hasScale
|
protected java.lang.String |
literalPrefix
|
protected java.lang.String |
literalSuffix
|
protected java.lang.String |
name
|
protected int |
nullable
|
protected long |
precision
|
| Constructor Summary | |
|---|---|
GenericTypeDescriptor(java.sql.ResultSet rs)
Creates a new GenericTypeDescriptor with properties filled in from the current row of rs, which should have been obtained from DatabaseMetaData.getTypeInfo(). |
|
GenericTypeDescriptor(java.lang.String name,
int dataType,
long precision,
java.lang.String literalPrefix,
java.lang.String literalSuffix,
int nullable,
boolean hasPrecision,
boolean hasScale)
|
|
| Method Summary | |
|---|---|
void |
determineScaleAndPrecision()
This method sets the hasScale and hasPrecision properties based on the current setting of dataType. |
int |
getDataType()
Gets the value of dataType |
boolean |
getHasPrecision()
Gets the value of hasPrecision |
boolean |
getHasScale()
Gets the value of hasScale |
java.lang.String |
getLiteralPrefix()
Gets the value of literalPrefix |
java.lang.String |
getLiteralSuffix()
Gets the value of literalSuffix |
java.lang.String |
getName()
Gets the value of name |
int |
getNullable()
Gets the value of nullable |
long |
getPrecision()
Gets the value of precision |
boolean |
isNullable()
|
void |
setDataType(int argDataType)
Sets the value of dataType |
void |
setHasPrecision(boolean argHasPrecision)
Sets the value of hasPrecision |
void |
setHasScale(boolean argHasScale)
Sets the value of hasScale |
void |
setLiteralPrefix(java.lang.String argLiteralPrefix)
Sets the value of literalPrefix |
void |
setLiteralSuffix(java.lang.String argLiteralSuffix)
Sets the value of literalSuffix |
void |
setName(java.lang.String argName)
Sets the value of name |
void |
setNullable(int argNullable)
Sets the value of nullable |
void |
setPrecision(long argPrecision)
Sets the value of precision |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected int dataType
protected long precision
protected java.lang.String literalPrefix
protected java.lang.String literalSuffix
protected int nullable
protected boolean hasPrecision
protected boolean hasScale
| Constructor Detail |
|---|
public GenericTypeDescriptor(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLException
public GenericTypeDescriptor(java.lang.String name,
int dataType,
long precision,
java.lang.String literalPrefix,
java.lang.String literalSuffix,
int nullable,
boolean hasPrecision,
boolean hasScale)
| Method Detail |
|---|
public void determineScaleAndPrecision()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
public void setName(java.lang.String argName)
argName - Value to assign to this.namepublic int getDataType()
public void setDataType(int argDataType)
argDataType - Value to assign to this.dataTypepublic long getPrecision()
public void setPrecision(long argPrecision)
argPrecision - Value to assign to this.precisionpublic java.lang.String getLiteralPrefix()
public void setLiteralPrefix(java.lang.String argLiteralPrefix)
argLiteralPrefix - Value to assign to this.literalPrefixpublic java.lang.String getLiteralSuffix()
public void setLiteralSuffix(java.lang.String argLiteralSuffix)
argLiteralSuffix - Value to assign to this.literalSuffixpublic int getNullable()
public void setNullable(int argNullable)
argNullable - Value to assign to this.nullablepublic boolean isNullable()
public boolean getHasScale()
public void setHasScale(boolean argHasScale)
argHasScale - Value to assign to this.hasScalepublic boolean getHasPrecision()
public void setHasPrecision(boolean argHasPrecision)
argHasPrecision - Value to assign to this.hasPrecision
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||