|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.schema.SQLTypeInfo
public class SQLTypeInfo
Representation of SQL type information in the datastore.
| Field Summary | |
|---|---|
protected boolean |
allowsPrecisionSpec
Whether the type allows specification of the precision in parentheses after the type name. |
protected boolean |
autoIncrement
Whether the type automatically increments for each new row inserted. |
protected boolean |
caseSensitive
Whether the data type is case-sensitive in comparisons. |
protected String |
createParams
Indicates the parameters used in defining columns of this type. |
protected short |
dataType
The JDBC data type number of this data type (see java.sql.Types). |
protected boolean |
fixedPrecScale
Whether the type can be assigned a fixed scale value, such as for decimal or currency types. |
protected String |
literalPrefix
The prefix used to quote a literal of this data type; may be null. |
protected String |
literalSuffix
The suffix used to quote a literal of this data type; may be null. |
protected String |
localTypeName
Localized version of the DBMS-specific type name of this data type. |
protected short |
maximumScale
The maximum supported scale value for this data type. |
protected short |
minimumScale
The minimum supported scale value for this data type. |
protected int |
nullable
Indicates whether null values are allowed for this data type. |
protected int |
numPrecRadix
Indicates the numeric radix of this data type, which is usually 2 or 10. |
protected int |
precision
The maximum precision/length allowed for this data type. |
protected short |
searchable
The searchability of this data type in terms of the kinds of SQL WHERE clauses that are allowed. |
protected String |
typeName
The RDBMS-specific name for this data type. |
protected boolean |
unsignedAttribute
true indicates the type is unsigned, false otherwise. |
| Constructor Summary | |
|---|---|
SQLTypeInfo(ResultSet rs)
Constructor to create a type info definition for the current row of the passed ResultSet. |
|
SQLTypeInfo(String typeName,
short dataType,
int precision,
String literalPrefix,
String literalSuffix,
String createParams,
int nullable,
boolean caseSensitive,
short searchable,
boolean unsignedAttribute,
boolean fixedPrecScale,
boolean autoIncrement,
String localTypeName,
short minimumScale,
short maximumScale,
int numPrecRadix)
Constructor to create a type info definition from the passed values. |
|
| Method Summary | |
|---|---|
void |
addProperty(String name,
Object value)
Method to add a property for the type. |
boolean |
equals(Object obj)
Indicates whether some object is "equal to" this one. |
String |
getCreateParams()
|
short |
getDataType()
|
String |
getLiteralPrefix()
|
String |
getLiteralSuffix()
|
String |
getLocalTypeName()
|
short |
getMaximumScale()
|
short |
getMinimumScale()
|
int |
getNullable()
|
int |
getNumPrecRadix()
|
int |
getPrecision()
|
Object |
getProperty(String name)
Accessor for a property. |
short |
getSearchable()
|
String |
getTypeName()
|
int |
hashCode()
Returns a hash code value for this object. |
boolean |
isAllowsPrecisionSpec()
|
boolean |
isAutoIncrement()
|
boolean |
isCaseSensitive()
|
boolean |
isCompatibleWith(RDBMSColumnInfo colInfo)
Convenience method for returning if this type is compatible with the provided column. |
boolean |
isFixedPrecScale()
|
boolean |
isUnsignedAttribute()
|
void |
setAllowsPrecisionSpec(boolean allowsPrecisionSpec)
|
void |
setLocalTypeName(String localTypeName)
|
void |
setTypeName(String typeName)
|
String |
toString()
Returns the string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String typeName
protected short dataType
protected int precision
protected String literalPrefix
protected String literalSuffix
protected String createParams
protected int nullable
protected boolean caseSensitive
protected short searchable
protected boolean unsignedAttribute
protected boolean fixedPrecScale
protected boolean autoIncrement
protected String localTypeName
protected short minimumScale
protected short maximumScale
protected int numPrecRadix
protected boolean allowsPrecisionSpec
| Constructor Detail |
|---|
public SQLTypeInfo(String typeName,
short dataType,
int precision,
String literalPrefix,
String literalSuffix,
String createParams,
int nullable,
boolean caseSensitive,
short searchable,
boolean unsignedAttribute,
boolean fixedPrecScale,
boolean autoIncrement,
String localTypeName,
short minimumScale,
short maximumScale,
int numPrecRadix)
public SQLTypeInfo(ResultSet rs)
rs - ResultSet (from DatabaseMetaData.getTypeInfo() for example).
org.datanucleus.exceptions.NucleusDataStoreException - Thrown if an error occurs getting the information| Method Detail |
|---|
public void addProperty(String name,
Object value)
addProperty in interface org.datanucleus.store.schema.StoreSchemaDataname - Name of propertyvalue - Its valuepublic Object getProperty(String name)
getProperty in interface org.datanucleus.store.schema.StoreSchemaDataname - Name of the property
public final boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare
public final int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic boolean isCompatibleWith(RDBMSColumnInfo colInfo)
colInfo - The column
public void setTypeName(String typeName)
public String getTypeName()
public short getDataType()
public int getPrecision()
public String getLiteralPrefix()
public String getLiteralSuffix()
public String getCreateParams()
public int getNullable()
public boolean isCaseSensitive()
public short getSearchable()
public boolean isUnsignedAttribute()
public boolean isFixedPrecScale()
public boolean isAutoIncrement()
public void setLocalTypeName(String localTypeName)
public String getLocalTypeName()
public short getMinimumScale()
public short getMaximumScale()
public int getNumPrecRadix()
public void setAllowsPrecisionSpec(boolean allowsPrecisionSpec)
public boolean isAllowsPrecisionSpec()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||