org.datanucleus.store.rdbms.schema
Class MSSQLTypeInfo

java.lang.Object
  extended by org.datanucleus.store.rdbms.schema.SQLTypeInfo
      extended by org.datanucleus.store.rdbms.schema.MSSQLTypeInfo
All Implemented Interfaces:
org.datanucleus.store.schema.StoreSchemaData

public class MSSQLTypeInfo
extends SQLTypeInfo

SQL Type info for MSSQL datastores.


Field Summary
static int NTEXT
          sql type NTEXT
static int NVARCHAR
          sql type NVARCHAR
static int UNIQUEIDENTIFIER
          sql type UNIQUEIDENTIFIER
 
Fields inherited from class org.datanucleus.store.rdbms.schema.SQLTypeInfo
allowsPrecisionSpec, autoIncrement, caseSensitive, createParams, dataType, fixedPrecScale, literalPrefix, literalSuffix, localTypeName, maximumScale, minimumScale, nullable, numPrecRadix, precision, searchable, typeName, unsignedAttribute
 
Constructor Summary
MSSQLTypeInfo(java.sql.ResultSet rs)
          Constructs a type information object from the current row of the given result set.
MSSQLTypeInfo(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)
           
 
Method Summary
 boolean isCompatibleWith(RDBMSColumnInfo colInfo)
          Convenience method for returning if this type is compatible with the provided column.
 
Methods inherited from class org.datanucleus.store.rdbms.schema.SQLTypeInfo
addProperty, equals, getCreateParams, getDataType, getLiteralPrefix, getLiteralSuffix, getLocalTypeName, getMaximumScale, getMinimumScale, getNullable, getNumPrecRadix, getPrecision, getProperty, getSearchable, getTypeName, hashCode, isAllowsPrecisionSpec, isAutoIncrement, isCaseSensitive, isFixedPrecScale, isUnsignedAttribute, setAllowsPrecisionSpec, setLocalTypeName, setTypeName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NVARCHAR

public static final int NVARCHAR
sql type NVARCHAR

See Also:
Constant Field Values

NTEXT

public static final int NTEXT
sql type NTEXT

See Also:
Constant Field Values

UNIQUEIDENTIFIER

public static final int UNIQUEIDENTIFIER
sql type UNIQUEIDENTIFIER

See Also:
Constant Field Values
Constructor Detail

MSSQLTypeInfo

public MSSQLTypeInfo(java.sql.ResultSet rs)
Constructs a type information object from the current row of the given result set.

Parameters:
rs - The result set returned from DatabaseMetaData.getTypeInfo().

MSSQLTypeInfo

public MSSQLTypeInfo(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)
Method Detail

isCompatibleWith

public boolean isCompatibleWith(RDBMSColumnInfo colInfo)
Description copied from class: SQLTypeInfo
Convenience method for returning if this type is compatible with the provided column. Compares the data type of each record, and returns true if the types are equivalent. For example one could be VARCHAR, and the other LONGVARCHAR so they both store string data, and hence they are compatible.

Overrides:
isCompatibleWith in class SQLTypeInfo
Parameters:
colInfo - The column
Returns:
Whether they are considered compatible


Copyright © 2009. All Rights Reserved.