cn.kanejin.olla.support.query
Class AbstractQuerylistAdapter

java.lang.Object
  extended by cn.kanejin.olla.support.query.AbstractQuerylistAdapter
All Implemented Interfaces:
QuerylistAdapter

public abstract class AbstractQuerylistAdapter
extends Object
implements QuerylistAdapter

Author:
Kane Jin

Constructor Summary
AbstractQuerylistAdapter()
           
 
Method Summary
 int count(QueryRequest info)
           
 String getCountSqlmap()
           
 int getDefaultNumPerPage()
           
 String getDefaultSortColumn()
           
 String getDefaultSortDirection()
           
 int getMaxNumPerPage()
           
 String getSqlmap()
           
<E> QueryResult<E>
queryList(QueryRequest info, Integer page, Integer limit)
           
<E> List<E>
queryTop(QueryRequest info, Integer top)
           
protected abstract  Integer selectCount(String countSqlName, Map<String,Object> params)
           
protected abstract
<E> List<E>
selectList(String sqlName, Map<String,Object> params)
           
 void setDefaultNumPerPage(int defaultNumPerPage)
           
 void setDefaultSortColumn(String defaultSortColumn)
           
 void setDefaultSortDirection(String defaultSortDirection)
           
 void setMaxNumPerPage(int maxNumPerPage)
           
 void setSqlmap(String sqlmap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractQuerylistAdapter

public AbstractQuerylistAdapter()
Method Detail

queryList

public <E> QueryResult<E> queryList(QueryRequest info,
                                    Integer page,
                                    Integer limit)
Specified by:
queryList in interface QuerylistAdapter

selectList

protected abstract <E> List<E> selectList(String sqlName,
                                          Map<String,Object> params)

selectCount

protected abstract Integer selectCount(String countSqlName,
                                       Map<String,Object> params)

count

public int count(QueryRequest info)
Specified by:
count in interface QuerylistAdapter

queryTop

public <E> List<E> queryTop(QueryRequest info,
                            Integer top)
Specified by:
queryTop in interface QuerylistAdapter

getSqlmap

public String getSqlmap()

setSqlmap

public void setSqlmap(String sqlmap)

getCountSqlmap

public String getCountSqlmap()

getDefaultNumPerPage

public int getDefaultNumPerPage()

setDefaultNumPerPage

public void setDefaultNumPerPage(int defaultNumPerPage)

getMaxNumPerPage

public int getMaxNumPerPage()

setMaxNumPerPage

public void setMaxNumPerPage(int maxNumPerPage)

getDefaultSortColumn

public String getDefaultSortColumn()

setDefaultSortColumn

public void setDefaultSortColumn(String defaultSortColumn)

getDefaultSortDirection

public String getDefaultSortDirection()

setDefaultSortDirection

public void setDefaultSortDirection(String defaultSortDirection)


Copyright © 2016. All rights reserved.