public abstract class Dialect extends Object
Abstract Dialect class.
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
Dialect.Holder |
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
keepByteAndShort |
protected ModelBuilder |
modelBuilder |
protected RecordBuilder |
recordBuilder |
| 构造器和说明 |
|---|
Dialect() |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> List<T> |
buildModelList(ResultSet rs,
Class<? extends Model> modelClass)
buildModelList.
|
List<Record> |
buildRecordList(Config config,
ResultSet rs)
buildRecordList.
|
void |
fillStatement(PreparedStatement pst,
List<Object> paras)
fillStatement.
|
void |
fillStatement(PreparedStatement pst,
Object... paras)
fillStatement.
|
protected void |
fillStatementHandleDateType(PreparedStatement pst,
List<Object> paras)
fillStatementHandleDateType.
|
protected void |
fillStatementHandleDateType(PreparedStatement pst,
Object... paras)
fillStatementHandleDateType.
|
abstract String |
forDbDeleteById(String tableName,
String[] pKeys)
forDbDeleteById.
|
abstract String |
forDbFindById(String tableName,
String[] pKeys)
forDbFindById.
|
abstract void |
forDbSave(String tableName,
String[] pKeys,
Record record,
StringBuilder sql,
List<Object> paras)
forDbSave.
|
abstract void |
forDbUpdate(String tableName,
String[] pKeys,
Object[] ids,
Record record,
StringBuilder sql,
List<Object> paras)
forDbUpdate.
|
String |
forFindAll(String tableName)
forFindAll.
|
abstract String |
forModelDeleteById(Table table)
forModelDeleteById.
|
abstract String |
forModelFindById(Table table,
String columns)
forModelFindById.
|
abstract void |
forModelSave(Table table,
Map<String,Object> attrs,
StringBuilder sql,
List<Object> paras)
forModelSave.
|
abstract void |
forModelUpdate(Table table,
Map<String,Object> attrs,
Set<String> modifyFlag,
StringBuilder sql,
List<Object> paras)
forModelUpdate.
|
abstract String |
forPaginate(int pageNumber,
int pageSize,
StringBuilder findSql)
forPaginate.
|
abstract String |
forTableBuilderDoBuild(String tableName)
forTableBuilderDoBuild.
|
String |
getDefaultPrimaryKey()
getDefaultPrimaryKey.
|
void |
getModelGeneratedKey(Model<?> model,
PreparedStatement pst,
Table table)
getModelGeneratedKey.
|
void |
getRecordGeneratedKey(PreparedStatement pst,
Record record,
String[] pKeys)
getRecordGeneratedKey.
|
boolean |
isKeepByteAndShort()
isKeepByteAndShort.
|
boolean |
isOracle()
isOracle.
|
boolean |
isPrimaryKey(String colName,
String[] pKeys)
isPrimaryKey.
|
boolean |
isTakeOverDbPaginate()
isTakeOverDbPaginate.
|
boolean |
isTakeOverModelPaginate()
isTakeOverModelPaginate.
|
protected void |
processGeneratedBigIntegerKey(Model<?> model,
String pKey,
Object v)
processGeneratedBigIntegerKey.
|
String |
replaceOrderBy(String sql)
replaceOrderBy.
|
Dialect |
setKeepByteAndShort(boolean keepByteAndShort)
Setter for the field
keepByteAndShort. |
Dialect |
setModelBuilder(ModelBuilder modelBuilder)
Setter for the field
modelBuilder. |
Dialect |
setRecordBuilder(RecordBuilder recordBuilder)
Setter for the field
recordBuilder. |
Page<Record> |
takeOverDbPaginate(Connection conn,
int pageNumber,
int pageSize,
Boolean isGroupBySql,
String totalRowSql,
StringBuilder findSql,
Object... paras)
takeOverDbPaginate.
|
Page |
takeOverModelPaginate(Connection conn,
Class<? extends Model> modelClass,
int pageNumber,
int pageSize,
Boolean isGroupBySql,
String totalRowSql,
StringBuilder findSql,
Object... paras)
takeOverModelPaginate.
|
void |
trimPrimaryKeys(String[] pKeys)
trimPrimaryKeys.
|
protected boolean keepByteAndShort
protected ModelBuilder modelBuilder
protected RecordBuilder recordBuilder
public abstract String forTableBuilderDoBuild(String tableName)
forTableBuilderDoBuild.
public abstract String forPaginate(int pageNumber, int pageSize, StringBuilder findSql)
forPaginate.
pageNumber - a int.pageSize - a int.findSql - a StringBuilder object.String object.public abstract String forModelFindById(Table table, String columns)
forModelFindById.
public abstract void forModelSave(Table table, Map<String,Object> attrs, StringBuilder sql, List<Object> paras)
forModelSave.
table - a Table object.attrs - a Map object.sql - a StringBuilder object.paras - a List object.public abstract void forModelUpdate(Table table, Map<String,Object> attrs, Set<String> modifyFlag, StringBuilder sql, List<Object> paras)
forModelUpdate.
table - a Table object.attrs - a Map object.modifyFlag - a Set object.sql - a StringBuilder object.paras - a List object.public abstract String forDbDeleteById(String tableName, String[] pKeys)
forDbDeleteById.
public abstract void forDbSave(String tableName, String[] pKeys, Record record, StringBuilder sql, List<Object> paras)
forDbSave.
tableName - a String object.pKeys - an array of String objects.record - a Record object.sql - a StringBuilder object.paras - a List object.public abstract void forDbUpdate(String tableName, String[] pKeys, Object[] ids, Record record, StringBuilder sql, List<Object> paras)
forDbUpdate.
public boolean isKeepByteAndShort()
isKeepByteAndShort.
public Dialect setKeepByteAndShort(boolean keepByteAndShort)
Setter for the field keepByteAndShort.
keepByteAndShort - a boolean.Dialect object.public Dialect setModelBuilder(ModelBuilder modelBuilder)
Setter for the field modelBuilder.
modelBuilder - a ModelBuilder object.Dialect object.public Dialect setRecordBuilder(RecordBuilder recordBuilder)
Setter for the field recordBuilder.
recordBuilder - a RecordBuilder object.Dialect object.public <T> List<T> buildModelList(ResultSet rs, Class<? extends Model> modelClass) throws SQLException, ReflectiveOperationException
buildModelList.
T - a T object.rs - a ResultSet object.modelClass - a Class object.List object.SQLException - if any.ReflectiveOperationException - if any.public List<Record> buildRecordList(Config config, ResultSet rs) throws SQLException
buildRecordList.
config - a Config object.rs - a ResultSet object.List object.SQLException - if any.public void getModelGeneratedKey(Model<?> model, PreparedStatement pst, Table table) throws SQLException
getModelGeneratedKey.
model - a Model object.pst - a PreparedStatement object.table - a Table object.SQLException - if any.protected void processGeneratedBigIntegerKey(Model<?> model, String pKey, Object v)
processGeneratedBigIntegerKey.
public void getRecordGeneratedKey(PreparedStatement pst, Record record, String[] pKeys) throws SQLException
getRecordGeneratedKey.
pst - a PreparedStatement object.record - a Record object.pKeys - an array of String objects.SQLException - if any.public boolean isOracle()
isOracle.
public boolean isTakeOverDbPaginate()
isTakeOverDbPaginate.
public Page<Record> takeOverDbPaginate(Connection conn, int pageNumber, int pageSize, Boolean isGroupBySql, String totalRowSql, StringBuilder findSql, Object... paras) throws SQLException
takeOverDbPaginate.
conn - a Connection object.pageNumber - a int.pageSize - a int.isGroupBySql - a Boolean object.totalRowSql - a String object.findSql - a StringBuilder object.paras - a Object object.Page object.SQLException - if any.public boolean isTakeOverModelPaginate()
isTakeOverModelPaginate.
public Page takeOverModelPaginate(Connection conn, Class<? extends Model> modelClass, int pageNumber, int pageSize, Boolean isGroupBySql, String totalRowSql, StringBuilder findSql, Object... paras) throws Exception
takeOverModelPaginate.
conn - a Connection object.modelClass - a Class object.pageNumber - a int.pageSize - a int.isGroupBySql - a Boolean object.totalRowSql - a String object.findSql - a StringBuilder object.paras - a Object object.Page object.Exception - if any.public void fillStatement(PreparedStatement pst, List<Object> paras) throws SQLException
fillStatement.
pst - a PreparedStatement object.paras - a List object.SQLException - if any.public void fillStatement(PreparedStatement pst, Object... paras) throws SQLException
fillStatement.
pst - a PreparedStatement object.paras - a Object object.SQLException - if any.public String getDefaultPrimaryKey()
getDefaultPrimaryKey.
String object.public void trimPrimaryKeys(String[] pKeys)
trimPrimaryKeys.
pKeys - an array of String objects.protected void fillStatementHandleDateType(PreparedStatement pst, List<Object> paras) throws SQLException
fillStatementHandleDateType.
pst - a PreparedStatement object.paras - a List object.SQLException - if any.protected void fillStatementHandleDateType(PreparedStatement pst, Object... paras) throws SQLException
fillStatementHandleDateType.
pst - a PreparedStatement object.paras - a Object object.SQLException - if any.Copyright © 2023. All rights reserved.