public class ObjSQLRich extends ObjSQL implements org.teasoft.bee.osql.api.SuidRich, Serializable
dsName, interceptorChain, nameTranslate| Constructor and Description |
|---|
ObjSQLRich() |
| Modifier and Type | Method and Description |
|---|---|
<T> int |
count(T entity) |
<T> int |
count(T entity,
org.teasoft.bee.osql.api.Condition condition) |
<T> boolean |
createTable(Class<T> entityClass,
boolean isDropExistTable)
根据Javabean生成数据库表,Javabean无需配置过多的字段信息.此方法只考虑通用情况,若有详细需求,不建议采用
According to the database table generated by JavaBean, JavaBean does not need to configure too much field information. |
<T> int |
delete(T entity,
org.teasoft.bee.osql.IncludeType includeType) |
int |
deleteById(Class<?> entityClass,
Integer id) |
int |
deleteById(Class<?> entityClass,
Long id) |
int |
deleteById(Class<?> entityClass,
String ids) |
<T> void |
dropIndex(Class<T> entityClass,
String indexName) |
<T> boolean |
exist(T entity) |
org.teasoft.bee.osql.ObjToSQLRich |
getObjToSQLRich() |
<T> void |
indexNormal(Class<T> entityClass,
String fields,
String indexName)
创建通用索引.create normal index
|
<T> int |
insert(List<T> entityList) |
<T> int |
insert(List<T> entityList,
int batchSize) |
<T> int |
insert(List<T> entityList,
int batchSize,
String excludeFields) |
<T> int |
insert(List<T> entityList,
String excludeFields) |
<T> int |
insert(T[] entity) |
<T> int |
insert(T[] entity,
int batchSize) |
<T> int |
insert(T[] entity,
int batchSize,
String excludeFields) |
<T> int |
insert(T[] entity,
String excludeFields) |
<T> int |
insert(T entity,
org.teasoft.bee.osql.IncludeType includeType) |
<T> long |
insertAndReturnId(T entity,
org.teasoft.bee.osql.IncludeType includeType) |
<T> void |
primaryKey(Class<T> entityClass,
String fields,
String keyName)
创建主键,一般是多字段联合主键.create primary key
|
<T> int |
save(T entity)
保存一个实体(一条记录).
|
<T> List<T> |
select(T entity,
org.teasoft.bee.osql.IncludeType includeType) |
<T> List<T> |
select(T entity,
int size) |
<T> List<T> |
select(T entity,
int start,
int size) |
<T> List<T> |
select(T entity,
int start,
int size,
String... selectFields) |
<T> List<T> |
select(T entity,
String... selectFields) |
<T> T |
selectById(Class<T> entityClass,
Integer id) |
<T> T |
selectById(Class<T> entityClass,
Long id) |
<T> T |
selectById(Class<T> entityClass,
String id) |
<T> List<T> |
selectByIds(Class<T> entityClass,
String ids) |
<T> T |
selectFirst(T entity,
org.teasoft.bee.osql.api.Condition condition) |
<T> String |
selectJson(T entity) |
<T> String |
selectJson(T entity,
org.teasoft.bee.osql.api.Condition condition) |
<T> String |
selectJson(T entity,
org.teasoft.bee.osql.IncludeType includeType) |
<T> String |
selectJson(T entity,
int start,
int size,
String... selectFields) |
<T> String |
selectJson(T entity,
String... selectField) |
<T> T |
selectOne(T entity) |
<T> List<T> |
selectOrderBy(T entity,
String orderFields) |
<T> List<T> |
selectOrderBy(T entity,
String orderFields,
org.teasoft.bee.osql.OrderType[] orderTypes) |
<T> List<String[]> |
selectString(T entity) |
<T> List<String[]> |
selectString(T entity,
org.teasoft.bee.osql.api.Condition condition) |
<T> List<String[]> |
selectString(T entity,
String... selectFields) |
<T> String |
selectWithFun(T entity,
org.teasoft.bee.osql.FunctionType functionType,
String fieldForFun) |
<T> String |
selectWithFun(T entity,
org.teasoft.bee.osql.FunctionType functionType,
String fieldForFun,
org.teasoft.bee.osql.api.Condition condition) |
org.teasoft.bee.osql.api.SuidRich |
setDynamicParameter(String para,
String value) |
void |
setObjToSQLRich(org.teasoft.bee.osql.ObjToSQLRich objToSQLRich) |
<T> void |
unique(Class<T> entityClass,
String fields,
String indexName)
创建唯一索引.create unique index
|
<T> int |
update(T entity,
org.teasoft.bee.osql.api.Condition condition) |
<T> int |
update(T entity,
org.teasoft.bee.osql.api.Condition condition,
String... updateFields) |
<T> int |
update(T entity,
org.teasoft.bee.osql.IncludeType includeType) |
<T> int |
update(T entity,
org.teasoft.bee.osql.IncludeType includeType,
String... updateFields) |
<T> int |
update(T entity,
String... updateFields) |
<T> int |
update(T oldEntity,
T newEntity) |
<T> int |
updateBy(T entity,
org.teasoft.bee.osql.api.Condition condition,
String... whereFields) |
<T> int |
updateBy(T entity,
org.teasoft.bee.osql.IncludeType includeType,
String... whereFields) |
<T> int |
updateBy(T entity,
String... whereFields) |
<T> int |
updateById(T entity,
org.teasoft.bee.osql.api.Condition condition) |
_insertAndReturnId, beginSameConnection, delete, delete, endSameConnection, getBeeSql, getObjToSQL, insert, insertAndReturnId, select, select, setBeeSql, setObjToSQL, toClassT, updatedoBeforePasreEntity, doBeforeReturn, doBeforeReturn, getDataSourceName, getInterceptorChain, regCondition, regSuidType, setDataSourceName, setInterceptorChain, setNameTranslateOneTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic org.teasoft.bee.osql.ObjToSQLRich getObjToSQLRich()
public void setObjToSQLRich(org.teasoft.bee.osql.ObjToSQLRich objToSQLRich)
public <T> List<T> select(T entity, int size)
select in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> select(T entity, int start, int size)
select in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> select(T entity, String... selectFields)
select in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> select(T entity, int start, int size, String... selectFields)
select in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> selectOrderBy(T entity, String orderFields)
selectOrderBy in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> selectOrderBy(T entity, String orderFields, org.teasoft.bee.osql.OrderType[] orderTypes)
selectOrderBy in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(T[] entity)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(T[] entity,
String excludeFields)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(T[] entity,
int batchSize)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(T[] entity,
int batchSize,
String excludeFields)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int update(T entity,
String... updateFields)
update in interface org.teasoft.bee.osql.api.SuidRichpublic <T> T selectOne(T entity)
selectOne in interface org.teasoft.bee.osql.api.SuidRichpublic <T> T selectFirst(T entity,
org.teasoft.bee.osql.api.Condition condition)
selectFirst in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectWithFun(T entity, org.teasoft.bee.osql.FunctionType functionType, String fieldForFun)
selectWithFun in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectWithFun(T entity, org.teasoft.bee.osql.FunctionType functionType, String fieldForFun, org.teasoft.bee.osql.api.Condition condition)
selectWithFun in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int count(T entity)
count in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int count(T entity,
org.teasoft.bee.osql.api.Condition condition)
count in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int update(T entity,
org.teasoft.bee.osql.IncludeType includeType,
String... updateFields)
update in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> select(T entity, org.teasoft.bee.osql.IncludeType includeType)
select in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int update(T entity,
org.teasoft.bee.osql.IncludeType includeType)
update in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(T entity,
org.teasoft.bee.osql.IncludeType includeType)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> long insertAndReturnId(T entity,
org.teasoft.bee.osql.IncludeType includeType)
insertAndReturnId in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int delete(T entity,
org.teasoft.bee.osql.IncludeType includeType)
delete in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<String[]> selectString(T entity)
selectString in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<String[]> selectString(T entity, String... selectFields)
selectString in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<String[]> selectString(T entity, org.teasoft.bee.osql.api.Condition condition)
selectString in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectJson(T entity)
selectJson in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectJson(T entity, org.teasoft.bee.osql.IncludeType includeType)
selectJson in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectJson(T entity, String... selectField)
selectJson in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectJson(T entity, int start, int size, String... selectFields)
selectJson in interface org.teasoft.bee.osql.api.SuidRichpublic <T> T selectById(Class<T> entityClass, Integer id)
selectById in interface org.teasoft.bee.osql.api.SuidRichpublic <T> T selectById(Class<T> entityClass, Long id)
selectById in interface org.teasoft.bee.osql.api.SuidRichpublic <T> T selectById(Class<T> entityClass, String id)
selectById in interface org.teasoft.bee.osql.api.SuidRichpublic <T> List<T> selectByIds(Class<T> entityClass, String ids)
selectByIds in interface org.teasoft.bee.osql.api.SuidRichpublic int deleteById(Class<?> entityClass, Integer id)
deleteById in interface org.teasoft.bee.osql.api.SuidRichpublic int deleteById(Class<?> entityClass, Long id)
deleteById in interface org.teasoft.bee.osql.api.SuidRichpublic int deleteById(Class<?> entityClass, String ids)
deleteById in interface org.teasoft.bee.osql.api.SuidRichpublic <T> String selectJson(T entity, org.teasoft.bee.osql.api.Condition condition)
selectJson in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int updateBy(T entity,
String... whereFields)
updateBy in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int updateBy(T entity,
org.teasoft.bee.osql.IncludeType includeType,
String... whereFields)
updateBy in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int updateBy(T entity,
org.teasoft.bee.osql.api.Condition condition,
String... whereFields)
updateBy in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int updateById(T entity,
org.teasoft.bee.osql.api.Condition condition)
updateById in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int update(T entity,
org.teasoft.bee.osql.api.Condition condition,
String... updateFields)
update in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int update(T entity,
org.teasoft.bee.osql.api.Condition condition)
update in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(List<T> entityList)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(List<T> entityList, int batchSize)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(List<T> entityList, String excludeFields)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int insert(List<T> entityList, int batchSize, String excludeFields)
insert in interface org.teasoft.bee.osql.api.SuidRichpublic org.teasoft.bee.osql.api.SuidRich setDynamicParameter(String para, String value)
setDynamicParameter in interface org.teasoft.bee.osql.api.SuidsetDynamicParameter in interface org.teasoft.bee.osql.api.SuidRichsetDynamicParameter in class ObjSQLpublic <T> boolean exist(T entity)
exist in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int update(T oldEntity,
T newEntity)
update in interface org.teasoft.bee.osql.api.SuidRichpublic <T> int save(T entity)
save in interface org.teasoft.bee.osql.api.SuidRichentity - public <T> boolean createTable(Class<T> entityClass, boolean isDropExistTable)
createTable in interface org.teasoft.bee.osql.api.SuidRichentityClass - table's entityClass(do not allow null).isDropExistTable - whether drop the exist table before createpublic <T> void indexNormal(Class<T> entityClass, String fields, String indexName)
indexNormal in interface org.teasoft.bee.osql.api.SuidRichentityClass - table's entityClass(do not allow null).fields - field name,if more than one,separate with comma.indexName - index namepublic <T> void unique(Class<T> entityClass, String fields, String indexName)
unique in interface org.teasoft.bee.osql.api.SuidRichentityClass - table's entity(do not allow null).fields - field name,if more than one,separate with comma.indexName - index namepublic <T> void primaryKey(Class<T> entityClass, String fields, String keyName)
primaryKey in interface org.teasoft.bee.osql.api.SuidRichentity - table's entity(do not allow null).fields - field name,if more than one,separate with comma.keyName - key nameCopyright © 2025. All rights reserved.