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
|
构造方法摘要 |
Dialect(org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameterObject,
PageBounds pageBounds)
|
| 从类 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.