Anyframe Core

anyframe.core.query.ria
Interface IRiaQueryService


public interface IRiaQueryService

This is the interface used for manipulating database in developing the presentation layer using RIA product. This class is referenced by MiPQueryService, NitobiQueryService, etc. We recommend to use it directly.

RiaQueryService 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>
 

The RiaQueryService's configuration has jdbcTemplate, lobHandler,sqlRepository.

Author:
Soyon Lim, JongHoon Kim

Method Summary
 void containesQueryId(String queryId)
          Checks whether the query identifier exists.
 anyframe.core.query.impl.config.loader.SQLLoader getSqlRepository()
          This is the method for getting SQLLoader which includes loaded information about mapping xml files.
 void search(String queryId, anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params, IRowCallbackHandler rowCallbackHandler)
          This is a method for querying at developing the screen using RIA
 void search(String queryId, anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params, IRowCallbackHandler rowCallbackHandler, int pageIndex, int pageSize)
          This is a method for querying with paging at developing the screen using RIA
 void searchLive(String queryId, anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params, IRowCallbackHandler rowCallbackHandler, int startIndex, int pageSize)
          This is a method for querying with paging at developing the screen using RIA
 int update(String queryId, anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params)
          This is the method for inserting, updating and deleting at developing the screen using RIA
 

Method Detail

containesQueryId

void containesQueryId(String queryId)
                      throws QueryServiceException
Checks whether the query identifier exists.

Parameters:
queryId - identifier of query statement
Throws:
QueryServiceException - if query identifier doesn't exist

search

void search(String queryId,
            anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params,
            IRowCallbackHandler rowCallbackHandler)
            throws Exception
This is a method for querying at developing the screen using RIA

Parameters:
queryId - identifier of query statement to execute
params - ExtMapSqlParameterSource includes searchParams with key, the Map composed as transfer object including the query conditions
rowCallbackHandler - Result handler for saving a result to arbitrary object
Throws:
Exception - if there is any problem executing the query

search

void search(String queryId,
            anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params,
            IRowCallbackHandler rowCallbackHandler,
            int pageIndex,
            int pageSize)
            throws Exception
This is a method for querying with paging at developing the screen using RIA

Parameters:
queryId - identifier of query statement to execute
params - ExtMapSqlParameterSource includes searchParams with key, the Map composed as transfer object including the query conditions
rowCallbackHandler - Result handler for saving a result to arbitrary object
pageIndex - page number which expected to be displayed (pageIndex > 0)
pageSize - page size which expected to be displayed per page (pageSize > 0)
Throws:
Exception - if there is any problem executing the query

searchLive

void searchLive(String queryId,
                anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params,
                IRowCallbackHandler rowCallbackHandler,
                int startIndex,
                int pageSize)
                throws Exception
This is a method for querying with paging at developing the screen using RIA

Parameters:
queryId - identifier of query statement to execute
params - ExtMapSqlParameterSource includes searchParams with key, the Map composed as transfer object including the query conditions
rowCallbackHandler - Result handler for saving a result to arbitrary object
startIndex - start row number which expected to be displayed (startIndex > 0)
pageSize - page size which expected to be displayed per page (pageSize > 0)
Throws:
Exception - if there is any problem executing the query

update

int update(String queryId,
           anyframe.core.query.impl.jdbc.setter.ExtMapSqlParameterSource params)
           throws QueryServiceException
This is the method for inserting, updating and deleting at developing the screen using RIA

Parameters:
queryId - identifier of query statement to execute
params - ExtMapSqlParameterSource includes searchParams with key, the Map composed as transfer object including the query conditions
Returns:
the number of records affected
Throws:
QueryServiceException - if there is any problem executing the query

getSqlRepository

anyframe.core.query.impl.config.loader.SQLLoader getSqlRepository()
This is the method for getting SQLLoader which includes loaded information about mapping xml files. (suggest to use internally by MiPQueryService, GauceQueryService, etc.)

Returns:
SQLLoader instance

Anyframe Core

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