wt.dataservice
Class SQLServer

java.lang.Object
  extended bywt.dataservice.AbstractDatastore
      extended bywt.dataservice.SQLServer
All Implemented Interfaces:
Datastore

public class SQLServer
extends AbstractDatastore


Field Summary
private static String DATE_JAVA_FORMAT
           
private static Integer DATE_SQL_FORMAT
           
private static String DATEFORMAT
           
private static HashMap functionnameMap
           
private static HashMap infixMap
           
private static int MAX_COLUMN_BYTE_SIZE
           
private static int MAX_DECIMAL_PRECISION
           
private static int MAX_INDEXNAME_LENGTH
           
private static int MAXSQLSTRINGSIZE
           
private static int ORACLE_BLOB_TYPE
           
private static String TIME_JAVA_FORMAT
           
private static Integer TIME_SQL_FORMAT
           
private static HashMap timeFormatMap
           
private static String TIMESTAMP_JAVA_FORMAT
           
private static Integer TIMESTAMP_SQL_FORMAT
           
private static String UTIL_DATE_JAVA_PARSE
           
 
Constructor Summary
SQLServer()
           
 
Method Summary
protected  String getCreateTemporaryTableDDLPrefix()
          This method returns the intial portion of the Create Temporary Table DDL statement.
 String getDateFormat()
           
 String getDateJavaFormat()
           
 Object getDateSQLFormat()
           
 int getMaxLength(int a_sqlType)
          This method returns the maximum length allowable for the specified java.sql.Types value.
 String getSQLFunctionName(String a_funcName)
          This method returns a the datastore specific function name for the given function name constant.
 String getSQLTypeString(int sqltype, int stringLength)
          This method returns a java.lang.String value that the specified javaType maps to.
 String getTimeJavaFormat()
           
 Object getTimeSQLFormat()
           
 String getTimeStampJavaFormat()
           
 Object getTimeStampSQLFormat()
           
 String getUserDefinedNameExpression(String a_expression)
          This method converts the UserDefined SQL Functions in the expression with datastore format.
 String getUtilDateJavaParse()
           
 boolean isInfix(String a_FunctionName)
          This method returns true if the function is infix otherwise false.
 
Methods inherited from class wt.dataservice.AbstractDatastore
buildCreateTemporaryTableDDL, getDatastoreColumnNameExpression, getInFixExpression, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATEFORMAT

private static final String DATEFORMAT
See Also:
Constant Field Values

DATE_JAVA_FORMAT

private static final String DATE_JAVA_FORMAT
See Also:
Constant Field Values

TIME_JAVA_FORMAT

private static final String TIME_JAVA_FORMAT
See Also:
Constant Field Values

TIMESTAMP_JAVA_FORMAT

private static final String TIMESTAMP_JAVA_FORMAT
See Also:
Constant Field Values

DATE_SQL_FORMAT

private static final Integer DATE_SQL_FORMAT

TIME_SQL_FORMAT

private static final Integer TIME_SQL_FORMAT

TIMESTAMP_SQL_FORMAT

private static final Integer TIMESTAMP_SQL_FORMAT

UTIL_DATE_JAVA_PARSE

private static final String UTIL_DATE_JAVA_PARSE
See Also:
Constant Field Values

MAXSQLSTRINGSIZE

private static final int MAXSQLSTRINGSIZE

MAX_INDEXNAME_LENGTH

private static final int MAX_INDEXNAME_LENGTH
See Also:
Constant Field Values

MAX_COLUMN_BYTE_SIZE

private static final int MAX_COLUMN_BYTE_SIZE
See Also:
Constant Field Values

MAX_DECIMAL_PRECISION

private static final int MAX_DECIMAL_PRECISION
See Also:
Constant Field Values

ORACLE_BLOB_TYPE

private static final int ORACLE_BLOB_TYPE
See Also:
Constant Field Values

functionnameMap

private static HashMap functionnameMap

timeFormatMap

private static HashMap timeFormatMap

infixMap

private static HashMap infixMap
Constructor Detail

SQLServer

public SQLServer()
Method Detail

getSQLFunctionName

public String getSQLFunctionName(String a_funcName)
This method returns a the datastore specific function name for the given function name constant.

Supported API: false

Parameters:
a_funcName - a function name constant.
Returns:
datastore specific function name.

isInfix

public boolean isInfix(String a_FunctionName)
This method returns true if the function is infix otherwise false.

Supported API: false

Parameters:
a_FunctionName - function name
Returns:
java.lang.boolean true if the function is infix otherwise false.

getUserDefinedNameExpression

public String getUserDefinedNameExpression(String a_expression)
This method converts the UserDefined SQL Functions in the expression with datastore format. For SqlServer it changes "." with "_".

Supported API: false

Parameters:
a_expression - column name expression
Returns:
java.lang.String datastore specific expression.

getDateFormat

public String getDateFormat()

getUtilDateJavaParse

public String getUtilDateJavaParse()

getDateJavaFormat

public String getDateJavaFormat()

getDateSQLFormat

public Object getDateSQLFormat()

getTimeJavaFormat

public String getTimeJavaFormat()

getTimeSQLFormat

public Object getTimeSQLFormat()

getTimeStampJavaFormat

public String getTimeStampJavaFormat()

getTimeStampSQLFormat

public Object getTimeStampSQLFormat()

getSQLTypeString

public String getSQLTypeString(int sqltype,
                               int stringLength)
This method returns a java.lang.String value that the specified javaType maps to.

Supported API: false

Parameters:
sqltype - The java type to get the SQL mapping for.
stringLength - max length of the sql type.
Returns:
java.lang.String sql type indicating the mapping.

getMaxLength

public int getMaxLength(int a_sqlType)
This method returns the maximum length allowable for the specified java.sql.Types value. If there is not maximum, then 0 is returned.

Supported API: false

Parameters:
a_sqlType - The SQL type to return the maximum length for.
Returns:
Maximum length or 0 if there is no maximum.

getCreateTemporaryTableDDLPrefix

protected String getCreateTemporaryTableDDLPrefix()
This method returns the intial portion of the Create Temporary Table DDL statement.

Supported API: false

Specified by:
getCreateTemporaryTableDDLPrefix in class AbstractDatastore