Anyframe Core

anyframe.core.query.ria.mip
Interface IMiPQueryService


public interface IMiPQueryService

This is the interface used for manipulating database in developing the presentation layer using MiPlatform which is the X-Internet solution of the TOBE Software company.

In order to use MiPQueryService the anyframe.core.query.ria.impl.RiaQueryServiceImpl class has to be registered as Bean.

MiPQueryService Configuration Example:
 <bean name="riaQueryService" class="anyframe.core.query.ria.impl.RiaQueryServiceImpl">
      <property name="jdbcTemplate" ref="pagingNamedParamJdbcTemplate"/>
      <property name="lobHandler" ref="lobHandler"/>
      <property name="sqlRepository" ref="sqlLoader"/>
 </bean>
 <bean id="mipQueryService" class="anyframe.core.query.ria.mip.impl.MiPQueryServiceImpl">
      <property name="riaQueryService" ref="riaQueryService"/>
      <property name="sqlRepository" ref="sqlLoader"/>
 </bean>
 
 <bean id="pagingNamedParamJdbcTemplate" 
          class="anyframe.core.query.impl.jdbc.PagingNamedParamJdbcTemplate">
      <constructor-arg index="0" ref="pagingJdbcTemplate"/>
      <constructor-arg index="1" ref="dataSource"/>
 </bean>
 

The MiQueryService's configuration has riaQueryService, sqlRepository.

Author:
Soyon Lim, JongHoon Kim

Field Summary
static String QUERY_DELETE
           
static String QUERY_INSERT
           
static String QUERY_UPDATE
           
 
Method Summary
 com.tobesoft.platform.data.Dataset search(String queryId, com.tobesoft.platform.data.Dataset dataSet)
          This is a method for querying using the Dataset
 com.tobesoft.platform.data.Dataset search(String queryId, com.tobesoft.platform.data.VariableList variableList)
          This is a method for querying using the VariableList
 com.tobesoft.platform.data.Dataset search(String queryId, com.tobesoft.platform.data.VariableList variableList, int pageIndex, int pageSize)
          This is a method for querying with paging using the VariableList
 void search(String queryId, com.tobesoft.platform.data.VariableList variableList, int pageIndex, int pageSize, String dataSetName, PrintWriter writer)
          This is the method at querying using the VariableList.
 int update(Map queryMap, com.tobesoft.platform.data.Dataset dataSet)
          the method for inserting, updating and deleting using the Dataset to the database.
 int update(Map queryMap, com.tobesoft.platform.data.Dataset dataSet, IMiPActionCommand actionCommand)
          This is the method for inserting, updating and deleting using the Dataset to the database.
 int update(String queryId, com.tobesoft.platform.data.VariableList variableList)
          This is the method for inserting, updating and deleting the unitary data using the VariableList.
 int update(String queryId, com.tobesoft.platform.data.VariableList variableList, Map queryMap, com.tobesoft.platform.data.Dataset paramDataSet)
          This is the method for inserting, updating and deleting using VariableList and Dataset.
 int update(String queryId, com.tobesoft.platform.data.VariableList variableList, Map queryMap, com.tobesoft.platform.data.Dataset dataSet, IMiPActionCommand actionCommand)
          This is for inserting, updating and deleting using VariableList and Dataset.
 

Field Detail

QUERY_INSERT

static final String QUERY_INSERT
See Also:
Constant Field Values

QUERY_UPDATE

static final String QUERY_UPDATE
See Also:
Constant Field Values

QUERY_DELETE

static final String QUERY_DELETE
See Also:
Constant Field Values
Method Detail

search

com.tobesoft.platform.data.Dataset search(String queryId,
                                          com.tobesoft.platform.data.VariableList variableList)
                                          throws QueryServiceException
This is a method for querying using the VariableList

Parameters:
queryId - identifier of query statement to execute
variableList - VariableList including the query conditions
Returns:
Dataset of extracted out parameters
Throws:
QueryServiceException - if there is any problem executing the query

search

com.tobesoft.platform.data.Dataset search(String queryId,
                                          com.tobesoft.platform.data.VariableList variableList,
                                          int pageIndex,
                                          int pageSize)
                                          throws QueryServiceException
This is a method for querying with paging using the VariableList

Parameters:
queryId - identifier of query statement to execute
variableList - VariableList including the query conditions
pageIndex - page number which expected to be displayed (pageIndex > 0)
pageSize - page size which expected to be displayed per page (pageSize > 0)
Returns:
Dataset of extracted out parameters
Throws:
QueryServiceException - if there is any problem executing the query

search

com.tobesoft.platform.data.Dataset search(String queryId,
                                          com.tobesoft.platform.data.Dataset dataSet)
                                          throws QueryServiceException
This is a method for querying using the Dataset

Parameters:
queryId - identifier of query statement to execute
dataSet - the Dataset including the query conditions
Returns:
Dataset of extracted out parameters
Throws:
QueryServiceException - if there is any problem executing the query

search

void search(String queryId,
            com.tobesoft.platform.data.VariableList variableList,
            int pageIndex,
            int pageSize,
            String dataSetName,
            PrintWriter writer)
            throws QueryServiceException
This is the method at querying using the VariableList. The return value is void because the query result is put to the screen as Stream using PrintWriter. At large scale querying, this is recommended.

Parameters:
queryId - identifier of query statement to execute
variableList - the VariableList including the query conditions
pageIndex - page number which expected to be displayed (pageIndex > 0)
pageSize - page size which expected to be displayed per page (pageSize > 0)
dataSetName - the id of Dataset for saving the query result
writer - the PrintWriter object for writing the query result
Throws:
QueryServiceException - if there is any problem executing the query

update

int update(String queryId,
           com.tobesoft.platform.data.VariableList variableList)
           throws QueryServiceException
This is the method for inserting, updating and deleting the unitary data using the VariableList.

Parameters:
queryId - identifier of query statement to execute
variableList - the VariableList including the query conditions
Returns:
the number of records affected
Throws:
QueryServiceException - if there is any problem executing the query

update

int update(String queryId,
           com.tobesoft.platform.data.VariableList variableList,
           Map queryMap,
           com.tobesoft.platform.data.Dataset paramDataSet)
           throws QueryServiceException
This is the method for inserting, updating and deleting using VariableList and Dataset.

Parameters:
queryId - identifier of query statement to execute
variableList - the VariableList including the query conditions
queryMap - the map with status of row and query identifier. For insert status, the Map's key is insert, update status is update, delete status is delete. We decide the query id executed in using the Status value because in the Dataset the value of appropriate record's Status is set.
paramDataSet - the Dataset including the query conditions
Returns:
the number of records affected
Throws:
QueryServiceException - if there is any problem executing the query

update

int update(String queryId,
           com.tobesoft.platform.data.VariableList variableList,
           Map queryMap,
           com.tobesoft.platform.data.Dataset dataSet,
           IMiPActionCommand actionCommand)
           throws QueryServiceException
This is for inserting, updating and deleting using VariableList and Dataset. The IMiPActionCommand's implemented class containing the needed business logic is executed Before/after manipulating a database.

Parameters:
queryId - identifier of query statement to execute
variableList - the VariableList including the query conditions
queryMap - the map with status of row and query identifier. For insert status, the Map's key is insert, update status is update, delete status is delete. We decide the query id executed in using the Status value because in the Dataset the value of appropriate record's Status is set.
dataSet - the Dataset including the query conditions
actionCommand - the MiPActionCommand including the business logic before/after the insert, update, delete execution.
Returns:
the number of records affected
Throws:
QueryServiceException - if there is any problem executing the query

update

int update(Map queryMap,
           com.tobesoft.platform.data.Dataset dataSet)
           throws QueryServiceException
the method for inserting, updating and deleting using the Dataset to the database.

Parameters:
queryMap - the map with status of row and query identifier. For insert status, the Map's key is insert, update status is update, delete status is delete. We decide the query id executed in using the Status value because in the Dataset the value of appropriate record's Status is set.
dataSet - the Dataset including the query conditions
Returns:
the number of records affected
Throws:
QueryServiceException - if there is any problem executing the query

update

int update(Map queryMap,
           com.tobesoft.platform.data.Dataset dataSet,
           IMiPActionCommand actionCommand)
           throws QueryServiceException
This is the method for inserting, updating and deleting using the Dataset to the database. The IMiPActionCommand's implemented class containing the needed business logic is executed Before/after manipulating a database.

Parameters:
queryMap - the map with status of row and query identifier. For insert status, the Map's key is insert, update status is update, delete status is delete. We decide the query id executed in using the Status value because in the Dataset the value of appropriate record's Status is set.
dataSet - the Dataset including the query conditions
actionCommand - the MiPActionCommand including the business logic before/after the insert, update, delete execution.
Returns:
the number of records affected
Throws:
QueryServiceException - if there is any problem executing the query

Anyframe Core

Copyright © 2008-2009 Samsung SDS. All Rights Reserved.