| com.xoetrope.service.data.StoredProcFormatter
StoredProcFormatter | public class StoredProcFormatter extends ServiceProxy (Code) | | ServiceProxy class which is used to format PreparedStatements. The
PreparedStatements need to be declared in a database datasource file and
its parameter need to be defined in a properties file with the same name as
the query name.
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.6 $
|
Method Summary | |
public Object | call(String method, ServiceContext context) | public Object | call(String method, ServiceContext context, XBaseModel model) | protected void | execStoredProc(ConnectionObject connObj, String name, String[] params) Retrieve the specified PreparedStatement and populate it with the passed
params array. | protected String | parseParam(ServiceProxyArgs args, String key) Retrieve a parameter specified by the key parameter. |
ARG_NAME_CONN | final public static String ARG_NAME_CONN(Code) | | The connection object used to execute the PreparedStatements
|
ARG_NAME_MODELPREFIX | final public static String ARG_NAME_MODELPREFIX(Code) | | The prefix used to access the model.
|
ARG_NAME_QUERYNAME | final public static String ARG_NAME_QUERYNAME(Code) | | The name of the PreparedStatement as declared in the database datasource
file. A properies file of the same name needs to exist which lists the
parameters to be used.
|
currentProject | protected XProject currentProject(Code) | | The owner project and the context in which this object operates.
|
call | public Object call(String method, ServiceContext context) throws ServiceProxyException(Code) | | Call this proxy with the specified arguments
the result of the call Parameters: context - The ServiceContext contain pass and return parameters Parameters: method - the name of the service being called throws: net.xoetrope.optional.service.ServiceProxyException - Throw an exception if there is a problem with the call |
call | public Object call(String method, ServiceContext context, XBaseModel model) throws ServiceProxyException(Code) | | Call this proxy with the specified arguments
the result of the call Parameters: context - The ServiceContext contain pass and return parameters Parameters: method - the name of the service being called Parameters: model - the model which will be used to populate the PreparedStatement throws: net.xoetrope.optional.service.ServiceProxyException - Throw an exception if there is a problem with the call |
execStoredProc | protected void execStoredProc(ConnectionObject connObj, String name, String[] params) throws Exception(Code) | | Retrieve the specified PreparedStatement and populate it with the passed
params array. Execute the PreparedStatement.
Parameters: connObj - the Connection object being used by the PreparedStatement Parameters: name - the name of the PreparedStatement as defined in the basebasedatasource file Parameters: params - The String array which is used to populate the PreparedStatement |
parseParam | protected String parseParam(ServiceProxyArgs args, String key)(Code) | | Retrieve a parameter specified by the key parameter. This can be a
parameter, a date or a value from the model. If anything else needs to be
retrieved then the developer should subclass this class and overload this
function call.
Parameters: args - The ServiceProxyArgs Object which was passed to the call function Parameters: key - The key which specifies the data to be used The value of the data being requested |
|
|