|
||||||||||
| 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 java.lang.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 java.lang.String |
literalPrefix
The prefix used to quote a literal of this data type; may be null. |
protected java.lang.String |
literalSuffix
The suffix used to quote a literal of this data type; may be null. |
protected java.lang.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 java.lang.String |
typeName
The RDBMS-specific name for this data type. |
protected boolean |
unsignedAttribute
true indicates the type is unsigned, false otherwise. |
| Constructor Summary | |
|---|---|
SQLTypeInfo(java.sql.ResultSet rs)
Constructor to create a type info definition for the current row of the passed ResultSet. |
|
SQLTypeInfo(java.lang.String typeName,
short dataType,
int precision,
java.lang.String literalPrefix,
java.lang.String literalSuffix,
java.lang.String createParams,
int nullable,
boolean caseSensitive,
short searchable,
boolean unsignedAttribute,
boolean fixedPrecScale,
boolean autoIncrement,
java.lang.String localTypeName,
short minimumScale,
short maximumScale,
int numPrecRadix)
Constructor to create a type info definition from the passed values. |
|
| Method Summary | |
|---|---|
void |
addProperty(java.lang.String name,
java.lang.Object value)
Method to add a property for the type. |
boolean |
equals(java.lang.Object obj)
Indicates whether some object is "equal to" this one. |
java.lang.String |
getCreateParams()
|
short |
getDataType()
|
java.lang.String |
getLiteralPrefix()
|
java.lang.String |
getLiteralSuffix()
|
java.lang.String |
getLocalTypeName()
|
short |
getMaximumScale()
|
short |
getMinimumScale()
|
int |
getNullable()
|
int |
getNumPrecRadix()
|
int |
getPrecision()
|
java.lang.Object |
getProperty(java.lang.String name)
Accessor for a property. |
short |
getSearchable()
|
java.lang.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(java.lang.String localTypeName)
|
void |
setTypeName(java.lang.String typeName)
|
java.lang.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 java.lang.String typeName
protected short dataType
protected int precision
protected java.lang.String literalPrefix
protected java.lang.String literalSuffix
protected java.lang.String createParams
protected int nullable
protected boolean caseSensitive
protected short searchable
protected boolean unsignedAttribute
protected boolean fixedPrecScale
protected boolean autoIncrement
protected java.lang.String localTypeName
protected short minimumScale
protected short maximumScale
protected int numPrecRadix
protected boolean allowsPrecisionSpec
| Constructor Detail |
|---|
public SQLTypeInfo(java.lang.String typeName,
short dataType,
int precision,
java.lang.String literalPrefix,
java.lang.String literalSuffix,
java.lang.String createParams,
int nullable,
boolean caseSensitive,
short searchable,
boolean unsignedAttribute,
boolean fixedPrecScale,
boolean autoIncrement,
java.lang.String localTypeName,
short minimumScale,
short maximumScale,
int numPrecRadix)
public SQLTypeInfo(java.sql.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(java.lang.String name,
java.lang.Object value)
addProperty in interface org.datanucleus.store.schema.StoreSchemaDataname - Name of propertyvalue - Its valuepublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface org.datanucleus.store.schema.StoreSchemaDataname - Name of the property
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare
public final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isCompatibleWith(RDBMSColumnInfo colInfo)
colInfo - The column
public void setTypeName(java.lang.String typeName)
public java.lang.String getTypeName()
public short getDataType()
public int getPrecision()
public java.lang.String getLiteralPrefix()
public java.lang.String getLiteralSuffix()
public java.lang.String getCreateParams()
public int getNullable()
public boolean isCaseSensitive()
public short getSearchable()
public boolean isUnsignedAttribute()
public boolean isFixedPrecScale()
public boolean isAutoIncrement()
public void setLocalTypeName(java.lang.String localTypeName)
public java.lang.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 | |||||||||