|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saffron.util.EnumeratedValues.BasicValue
|
+--net.sf.saffron.sql.type.SqlTypeName
Enumeration of the type names which can be used to construct a SQL type.
| Field Summary | |
static SqlTypeName |
Boolean
|
static int |
Boolean_ordinal
|
static SqlTypeName |
Date
|
static int |
Date_ordinal
|
static EnumeratedValues |
enumeration
List of all allowable SqlTypeName values. |
static SqlTypeName |
Integer
|
static int |
Integer_ordinal
|
static SqlTypeName |
Null
|
static int |
Null_ordinal
|
private static int |
PrecNoScaleNo
|
private static int |
PrecYesScaleNo
|
private static int |
PrecYesScaleYes
|
private int |
signatures
Bitwise-or of flags indicating allowable precision/scale combinations. |
static SqlTypeName |
Time
|
static int |
Time_ordinal
|
static SqlTypeName |
Timestamp
|
static int |
Timestamp_ordinal
|
static SqlTypeName |
Varchar
|
static int |
Varchar_ordinal
|
| Fields inherited from class net.sf.saffron.util.EnumeratedValues.BasicValue |
description_, name_, ordinal_ |
| Constructor Summary | |
private |
SqlTypeName(String name,
int ordinal,
int signatures)
|
| Method Summary | |
boolean |
allowsNoPrecNoScale()
|
boolean |
allowsPrecNoScale()
|
boolean |
allowsPrecScale(boolean precision,
boolean scale)
Returns whether this type can be specified with a given combination of precision and scale. |
static SqlTypeName |
get(int ordinal)
Looks up a type name from its ordinal. |
static SqlTypeName |
get(String name)
Looks up a type name from its name. |
| Methods inherited from class net.sf.saffron.util.EnumeratedValues.BasicValue |
equals, getDescription, getName, getOrdinal, toString, unexpected |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private final int signatures
private static final int PrecNoScaleNo
private static final int PrecYesScaleNo
private static final int PrecYesScaleYes
public static final int Boolean_ordinal
public static final SqlTypeName Boolean
public static final int Integer_ordinal
public static final SqlTypeName Integer
public static final int Varchar_ordinal
public static final SqlTypeName Varchar
public static final int Date_ordinal
public static final SqlTypeName Date
public static final int Time_ordinal
public static final SqlTypeName Time
public static final int Timestamp_ordinal
public static final SqlTypeName Timestamp
public static final int Null_ordinal
public static final SqlTypeName Null
public static final EnumeratedValues enumeration
SqlTypeName values.
| Constructor Detail |
private SqlTypeName(String name,
int ordinal,
int signatures)
| Method Detail |
public static SqlTypeName get(int ordinal)
public static SqlTypeName get(String name)
public boolean allowsNoPrecNoScale()
public boolean allowsPrecNoScale()
public boolean allowsPrecScale(boolean precision,
boolean scale)
Varchar.allowsPrecScale(true, false)
returns true, because the VARCHAR type allows a
precision parameter, as in VARCHAR(10).Varchar.allowsPrecScale(true, true)
returns true, because the VARCHAR type does not allow a
precision and a scale parameter, as in
VARCHAR(10, 4).allowsPrecScale(false, true) returns false
for every type.
precision - Whether the precision/length field is part of the type
specificationscale - Whether the scale field is part of the type specification
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||