com.github.miemiedev.mybatis.paginator.dialect
类 Dialect

java.lang.Object
  继承者 com.github.miemiedev.mybatis.paginator.dialect.Dialect
直接已知子类:
DB2Dialect, H2Dialect, HSQLDialect, MySQLDialect, OracleDialect, PostgreSQLDialect, SQLServer2005Dialect, SQLServerDialect, SybaseDialect

public class Dialect
extends Object

类似hibernate的Dialect,但只精简出分页部分

作者:
badqiu, miemiedev

字段摘要
protected  org.apache.ibatis.mapping.BoundSql boundSql
           
protected  org.apache.ibatis.mapping.MappedStatement mappedStatement
           
protected  PageBounds pageBounds
           
protected  Map<String,Object> pageParameters
           
protected  List<org.apache.ibatis.mapping.ParameterMapping> parameterMappings
           
protected  Object parameterObject
           
protected  org.apache.ibatis.type.TypeHandlerRegistry typeHandlerRegistry
           
 
构造方法摘要
Dialect(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameterObject, PageBounds pageBounds)
           
 
方法摘要
 String getCountSQL()
           
protected  String getCountString(String sql)
          将sql转换为总记录数SQL
protected  String getLimitString(String sql, String offsetName, int offset, String limitName, int limit)
          将sql变成分页sql语句
 String getPageSQL()
           
 List<org.apache.ibatis.mapping.ParameterMapping> getParameterMappings()
           
 Object getParameterObject()
           
protected  String getSortString(String sql, List<Order> orders)
          将sql转换为带排序的SQL
protected  void init()
           
protected  void setPageParameter(String name, Object value, Class type)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

typeHandlerRegistry

protected org.apache.ibatis.type.TypeHandlerRegistry typeHandlerRegistry

mappedStatement

protected org.apache.ibatis.mapping.MappedStatement mappedStatement

pageBounds

protected PageBounds pageBounds

parameterObject

protected Object parameterObject

boundSql

protected org.apache.ibatis.mapping.BoundSql boundSql

parameterMappings

protected List<org.apache.ibatis.mapping.ParameterMapping> parameterMappings

pageParameters

protected Map<String,Object> pageParameters
构造方法详细信息

Dialect

public Dialect(org.apache.ibatis.mapping.MappedStatement mappedStatement,
               Object parameterObject,
               PageBounds pageBounds)
方法详细信息

init

protected void init()

getParameterMappings

public List<org.apache.ibatis.mapping.ParameterMapping> getParameterMappings()

getParameterObject

public Object getParameterObject()

getPageSQL

public String getPageSQL()

setPageParameter

protected void setPageParameter(String name,
                                Object value,
                                Class type)

getCountSQL

public String getCountSQL()

getLimitString

protected String getLimitString(String sql,
                                String offsetName,
                                int offset,
                                String limitName,
                                int limit)
将sql变成分页sql语句


getCountString

protected String getCountString(String sql)
将sql转换为总记录数SQL

参数:
sql - SQL语句
返回:
总记录数的sql

getSortString

protected String getSortString(String sql,
                               List<Order> orders)
将sql转换为带排序的SQL

参数:
sql - SQL语句
返回:
总记录数的sql


Copyright © 2015. All rights reserved.