wt.dataservice
Class AbstractDatastore

java.lang.Object
  extended bywt.dataservice.AbstractDatastore
All Implemented Interfaces:
Datastore
Direct Known Subclasses:
Oracle, SQLServer

public abstract class AbstractDatastore
extends Object
implements Datastore


Constructor Summary
AbstractDatastore()
           
 
Method Summary
 void buildCreateTemporaryTableDDL(String a_tableName, ColumnDescriptor[] a_columns, StringBuffer a_buffer)
          This method builds a DDL string for creating a temporary table.
protected abstract  String getCreateTemporaryTableDDLPrefix()
          This method returns the intial portion of the Create Temporary Table DDL statement.
 String getDatastoreColumnNameExpression(String a_expression)
          This method converts the SQL Functions in the expression with datastore specific Functions

Supported API: false
private  String getFullSubFunctionExpression(String a_expression)
           
 String getInFixExpression(String a_expression)
          This method returns the datastore specific infix expression.
 int getType(Class a_javaType)
          This method returns a java.sql.Types value that the specified javaType maps to.
private  String replace(String a_expression, String old_string, String new_string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wt.dataservice.Datastore
getDateFormat, getDateJavaFormat, getDateSQLFormat, getMaxLength, getSQLFunctionName, getSQLTypeString, getTimeJavaFormat, getTimeSQLFormat, getTimeStampJavaFormat, getTimeStampSQLFormat, getUserDefinedNameExpression, getUtilDateJavaParse, isInfix
 

Constructor Detail

AbstractDatastore

public AbstractDatastore()
Method Detail

getInFixExpression

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

Supported API: false

Specified by:
getInFixExpression in interface Datastore
Parameters:
a_expression - column name expression
Returns:
java.lang.String datastore specific infix expression.

getDatastoreColumnNameExpression

public String getDatastoreColumnNameExpression(String a_expression)
This method converts the SQL Functions in the expression with datastore specific Functions

Supported API: false

Specified by:
getDatastoreColumnNameExpression in interface Datastore
Parameters:
a_expression - column name expression
Returns:
java.lang.String datastore specific column name expression.

getFullSubFunctionExpression

private String getFullSubFunctionExpression(String a_expression)

replace

private String replace(String a_expression,
                       String old_string,
                       String new_string)

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

Specified by:
getType in interface Datastore
Parameters:
a_javaType - The java type to get the SQL mapping for.
Returns:
java.sql.Types constant indicating the mapping.

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

Specified by:
buildCreateTemporaryTableDDL in interface Datastore
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

getCreateTemporaryTableDDLPrefix

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

Supported API: false