wt.pds
Class StatementParameterFactory

java.lang.Object
  extended bywt.pds.StatementParameterFactory
All Implemented Interfaces:
ApplicationContextChild
Direct Known Subclasses:
OracleStatementParameterFactory, SQLServerStatementParameterFactory

public abstract class StatementParameterFactory
extends Object
implements ApplicationContextChild

This abstract class provides the abstraction for a factory used to create statement parameter instances.

Supported API: false

Extendable: false


Field Summary
private static ApplicationContextServices APPLICATION_CONTEXT_SERVICES
           
private  ApplicationContext applicationContext
           
private static String CLASSNAME
           
private static String DEFAULT_SELECTOR
           
private static StatementParameterFactory instance
           
private static String RESOURCE
           
private static String STATEMENT_PARAMETER_SELECTOR_RESOURCE
           
 
Fields inherited from interface wt.services.applicationcontext.ApplicationContextChild
APPLICATION_CONTEXT
 
Constructor Summary
StatementParameterFactory()
           
 
Method Summary
 ApplicationContext getApplicationContext()
          Gets the object for the association that plays role: applicationContext.
static StatementParameterFactory getInstance()
          Gets the value of the attribute: instance; Returns the default factory for the current dataservice.
protected abstract  void initializeArray(WTConnection a_connection, ClassInfo a_datastoreType)
          This method performs initialization for the specified connection and Array.
protected abstract  void initializeStruct(WTConnection a_connection, ClassInfo a_datastoreType)
          This method performs initialization for the specified connection and Struct.
 void initializeTypes(WTConnection a_connection)
          This method performs Type initialization for the specified connection.
(package private) static boolean isTypeParameter(List a_parameters)
           
(package private) static boolean isTypeParameter(Object a_parameter)
           
(package private) static boolean isTypeParameter(StatementParameter[] a_parameters)
           
abstract  StatementParameter newArrayStatementParameter(String a_arrayTypeName, Object a_value)
          This method create a new array StatementParameter instance using the specified array type name and object value.
abstract  StatementParameter newArrayStatementParameter(String a_arrayTypeName, Object a_value, String a_structTypeName)
          This method create a new array StatementParameter instance using the specified array type name and object value.
 StatementParameter newStatementParameter(DatastoreType a_value)
          This method create a new StatementParameter instance using the specified object value.
 StatementParameter newStatementParameter(Object a_value)
          This method create a new StatementParameter instance using the specified object value.
 StatementParameter newStatementParameter(Object a_value, ClassInfo a_datastoreType)
          This method create a new StatementParameter instance using the specified datastore type and object value.
 StatementParameter newStatementParameter(Object a_value, int a_sqlType)
          This method create a new StatementParameter instance using the specified object value and SQL type.
 StatementParameter[] newStatementParameterArray(Object[] a_values)
          Creates a new array of StatementParameters from raw values or DatastoreType instances.
 StatementParameter[] newStatementParameterArray(Object[] a_values, int[] a_sqlTypes)
          Creates a new array of StatementParameters from raw values and SQL types.
abstract  StatementParameter newStructStatementParameter(String a_structTypeName, Object a_value)
          This method create a new structure StatementParameter instance using the specified structure type name and object value.
 void setApplicationContext(ApplicationContext a_ApplicationContext)
          Sets the object for the association that plays role: applicationContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

instance

private static StatementParameterFactory instance

applicationContext

private ApplicationContext applicationContext

STATEMENT_PARAMETER_SELECTOR_RESOURCE

private static final String STATEMENT_PARAMETER_SELECTOR_RESOURCE
See Also:
Constant Field Values

DEFAULT_SELECTOR

private static final String DEFAULT_SELECTOR
See Also:
Constant Field Values

APPLICATION_CONTEXT_SERVICES

private static final ApplicationContextServices APPLICATION_CONTEXT_SERVICES
Constructor Detail

StatementParameterFactory

public StatementParameterFactory()
Method Detail

getInstance

public static StatementParameterFactory getInstance()
Gets the value of the attribute: instance; Returns the default factory for the current dataservice.

Supported API: false

Returns:
StatementParameterFactory

newStatementParameter

public StatementParameter newStatementParameter(Object a_value)
This method create a new StatementParameter instance using the specified object value.

Supported API: false

Parameters:
a_value -
Returns:
StatementParameter

newStatementParameter

public StatementParameter newStatementParameter(Object a_value,
                                                int a_sqlType)
This method create a new StatementParameter instance using the specified object value and SQL type.

Supported API: false

Parameters:
a_value -
a_sqlType -
Returns:
StatementParameter

newStructStatementParameter

public abstract StatementParameter newStructStatementParameter(String a_structTypeName,
                                                               Object a_value)
                                                        throws WTPropertyVetoException
This method create a new structure StatementParameter instance using the specified structure type name and object value.

Supported API: false

Parameters:
a_structTypeName -
a_value -
Returns:
StatementParameter
Throws:
WTPropertyVetoException

newArrayStatementParameter

public abstract StatementParameter newArrayStatementParameter(String a_arrayTypeName,
                                                              Object a_value)
                                                       throws WTPropertyVetoException
This method create a new array StatementParameter instance using the specified array type name and object value.

Supported API: false

Parameters:
a_arrayTypeName -
a_value -
Returns:
StatementParameter
Throws:
WTPropertyVetoException

newArrayStatementParameter

public abstract StatementParameter newArrayStatementParameter(String a_arrayTypeName,
                                                              Object a_value,
                                                              String a_structTypeName)
                                                       throws WTPropertyVetoException
This method create a new array StatementParameter instance using the specified array type name and object value. The array consists of the specified structures.

Supported API: false

Parameters:
a_arrayTypeName -
a_value -
a_structTypeName -
Returns:
StatementParameter
Throws:
WTPropertyVetoException

newStatementParameterArray

public StatementParameter[] newStatementParameterArray(Object[] a_values)
                                                throws WTException
Creates a new array of StatementParameters from raw values or DatastoreType instances. If any of the values are StatementParameter instances, then these values are included directly. Otherwise, a StatementParameter instance is constructed using the value.

Supported API: false

Parameters:
a_values - Array of object values used to construct the new array of StatementParameters
Returns:
StatementParameter[]
Throws:
WTException

newStatementParameterArray

public StatementParameter[] newStatementParameterArray(Object[] a_values,
                                                       int[] a_sqlTypes)
                                                throws WTException
Creates a new array of StatementParameters from raw values and SQL types. If any of the values are StatementParameter instances, then these values are included directly. Otherwise, a StatementParameter instance is constructed using the object value and SQL type.

Supported API: false

Parameters:
a_values - Array of object values used to construct the new array of StatementParameters
a_sqlTypes - Array of SQL Type values used to construct the new array of StatementParameters
Returns:
StatementParameter[]
Throws:
WTException

initializeTypes

public void initializeTypes(WTConnection a_connection)
                     throws WTException
This method performs Type initialization for the specified connection.

Supported API: false

Parameters:
a_connection - Connection to initialize Types for.
Throws:
WTException

initializeStruct

protected abstract void initializeStruct(WTConnection a_connection,
                                         ClassInfo a_datastoreType)
                                  throws WTException
This method performs initialization for the specified connection and Struct.

Supported API: false

Parameters:
a_connection - Connection to initialize Types for.
a_datastoreType - The ClassInfo representing the Datastore Type.
Throws:
WTException

initializeArray

protected abstract void initializeArray(WTConnection a_connection,
                                        ClassInfo a_datastoreType)
                                 throws WTException
This method performs initialization for the specified connection and Array.

Supported API: false

Parameters:
a_connection - Connection to initialize Types for.
a_datastoreType - The ClassInfo representing the Datastore Type.
Throws:
WTException

newStatementParameter

public StatementParameter newStatementParameter(Object a_value,
                                                ClassInfo a_datastoreType)
                                         throws WTException
This method create a new StatementParameter instance using the specified datastore type and object value.

Supported API: false

Parameters:
a_value - specifies the value for the parameter to create.
a_datastoreType - specifies the Datastore Type for the parameter to create.
Returns:
StatementParameter
Throws:
WTException

newStatementParameter

public StatementParameter newStatementParameter(DatastoreType a_value)
                                         throws WTException
This method create a new StatementParameter instance using the specified object value.

Supported API: false

Parameters:
a_value - DatastoreType instance to use as StatementParameter value.
Returns:
StatementParameter
Throws:
WTException

getApplicationContext

public ApplicationContext getApplicationContext()
Gets the object for the association that plays role: applicationContext.

Supported API: false

Specified by:
getApplicationContext in interface ApplicationContextChild
Returns:
ApplicationContext

setApplicationContext

public void setApplicationContext(ApplicationContext a_ApplicationContext)
                           throws WTPropertyVetoException
Sets the object for the association that plays role: applicationContext.

Supported API: false

Specified by:
setApplicationContext in interface ApplicationContextChild
Parameters:
a_ApplicationContext -
Throws:
WTPropertyVetoException

isTypeParameter

static boolean isTypeParameter(Object a_parameter)

isTypeParameter

static boolean isTypeParameter(List a_parameters)

isTypeParameter

static boolean isTypeParameter(StatementParameter[] a_parameters)