wt.dataservice
Interface Datastore

All Known Implementing Classes:
AbstractDatastore

public interface Datastore


Method Summary
 void buildCreateTemporaryTableDDL(String a_tableName, ColumnDescriptor[] a_columns, StringBuffer a_buffer)
          This method builds a DDL string for creating a temporary table.
 String getDatastoreColumnNameExpression(String a_expression)
          This method returns the datastore specific column name expression.
 String getDateFormat()
           
 String getDateJavaFormat()
           
 Object getDateSQLFormat()
           
 String getInFixExpression(String a_expression)
          This method returns the datastore specific infix expression.
 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()
           
 int getType(Class a_javaType)
          This method returns a java.sql.Types value that the specified javaType maps to.
 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.
 

Method Detail

getDateFormat

public String getDateFormat()

getDateJavaFormat

public String getDateJavaFormat()

getDateSQLFormat

public Object getDateSQLFormat()

getTimeJavaFormat

public String getTimeJavaFormat()

getUtilDateJavaParse

public String getUtilDateJavaParse()

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.

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.

getDatastoreColumnNameExpression

public String getDatastoreColumnNameExpression(String a_expression)
This method returns the datastore specific column name expression.

Supported API: false

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

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.

getInFixExpression

public String getInFixExpression(String a_expression)
This method returns the datastore specific infix expression.

Supported API: false

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

getUserDefinedNameExpression

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

Supported API: false

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

getType

public int getType(Class a_javaType)
This method returns a java.sql.Types value that the specified javaType maps to. If there is no mapping, then Types.OTHER is returned.

Supported API: false

Parameters:
a_javaType - The java type to get the SQL mapping for.
Returns:
java.sql.Types constant 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.

buildCreateTemporaryTableDDL

public void buildCreateTemporaryTableDDL(String a_tableName,
                                         ColumnDescriptor[] a_columns,
                                         StringBuffer a_buffer)
                                  throws WTException
This method builds a DDL string for creating a temporary table.

Supported API: false

Parameters:
a_tableName - the name of the temporary table.
a_columns - the colums of the temporary table.
a_buffer - String buffer to build the DDL into.
Returns:
DDL CREATE statement
Throws:
WTException