public interface Command extends CommOperate
| Modifier and Type | Method and Description |
|---|---|
void |
beginSameConnection()
declare begin Same Connection for some ORM operation.
|
<T> boolean |
createTable(Class<T> entityClass,
boolean isDropExistTable)
According to the database table generated by JavaBean, JavaBean does not need to configure
too much field information. |
<T> int |
delete(T entity)
According to entity object delete record.
|
<T> int |
delete(T entity,
Condition condition)
Delete the records according to entity and condition.
|
int |
deleteById(Class<?> c,
Integer id)
Delete record by id.
|
int |
deleteById(Class<?> c,
Long id)
Delete record by id.
|
int |
deleteById(Class<?> c,
String ids)
Delete record by id.
|
<T> void |
dropIndex(Class<T> entityClass,
String indexName)
drop index
|
void |
endSameConnection()
declare end Same Connection for some ORM operation.
|
<T> void |
indexNormal(Class<T> entityClass,
String fields,
String indexName)
create normal index
|
<T> int |
insert(List<T> entityList)
Insert records by batch type.
|
<T> int |
insert(List<T> entityList,
int batchSize)
Insert records by batch type.
|
<T> int |
insert(List<T> entityList,
int batchSize,
String excludeFields)
Insert record by batch type,and can point out which field(s) don't need to insert.
|
<T> int |
insert(List<T> entityList,
String excludeFields)
Insert record by batch type,and can point out which field(s) don't need to insert.
|
<T> int |
insert(T entity)
According to entity object insert record.
|
<T> int |
insert(T[] entity)
Insert records by batch type.
|
<T> int |
insert(T[] entity,
int batchSize)
Insert records by batch type.
|
<T> int |
insert(T[] entity,
int batchSize,
String excludeFields)
Insert record by batch type,and can point out which field(s) don't need to insert.
|
<T> int |
insert(T[] entity,
String excludeFields)
Insert record by batch type,and can point out which field(s) don't need to insert.
|
<T> int |
insert(T entity,
IncludeType includeType)
Insert record according to entity.
|
<T> long |
insertAndReturnId(T entity)
According to entity object insert record and return id value.
|
<T> long |
insertAndReturnId(T entity,
IncludeType includeType)
According to entity object insert record and return id value.
|
<T> void |
primaryKey(Class<T> entityClass,
String fields,
String keyName)
create primaryKey index
|
<T> int |
save(T entity)
save one entity(one record).
|
<T> void |
unique(Class<T> entityClass,
String fields,
String indexName)
create unique index
|
<T> int |
update(T entity)
According to entity object update record(update record by id).This method just has id field to SQL where expression.
|
<T> int |
update(T entity,
Condition condition)
Update record,and can help with Condition.
|
<T> int |
update(T entity,
Condition condition,
String... updateFields)
Update record, can list update fields.
|
<T> int |
update(T entity,
IncludeType includeType)
Update record according to entity by primary key.
|
<T> int |
update(T entity,
IncludeType includeType,
String... updateFields)
Update record according to entity.
|
<T> int |
update(T entity,
String... updateFields)
Update record, can list update fields.
|
<T> int |
update(T oldEntity,
T newEntity)
Update the entity.
|
<T> int |
updateBy(T entity,
Condition condition,
String... whereFields)
Update record according to whereFields.
|
<T> int |
updateBy(T entity,
IncludeType includeType,
String... whereFields)
Update record according to whereFields.
|
<T> int |
updateBy(T entity,
String... whereFields)
Update record according to whereFields.
|
<T> int |
updateById(T entity,
Condition condition)
it is equivalent to updateBy(entity,"id",condition)
|
getDataSourceName, getInterceptorChain, setDataSourceName, setNameTranslateOneTime<T> int update(T entity)
update(Object,java.lang.String...)<T> int insert(T entity)
entity - table's entity(do not allow null).<T> long insertAndReturnId(T entity)
entity - table's entity(do not allow null).<T> int delete(T entity)
entity - table's entity(do not allow null).<T> int delete(T entity,
Condition condition)
entity - table's entity(do not allow null).condition - If the field of entity is not null or empty, it will be translate to field=value.Other can define with condition.<T> int update(T entity,
String... updateFields)
entity - table's entity(do not allow null).updateFields - update fields.
<T> int update(T entity,
IncludeType includeType,
String... updateFields)
entity - table's entity(do not allow null).if id's value is null can not as filter condition.includeType - whether null string and null as a filter conditions.updateFields - update fields.
<T> int insert(T[] entity)
entity - table's entity array(do not allow null).<T> int insert(T[] entity,
int batchSize)
entity - table's entity array(do not allow null).batchSize - batch size.<T> int insert(T[] entity,
String excludeFields)
entity - table's entity array(do not allow null).excludeFields - fields list that don't need to insert .<T> int insert(T[] entity,
int batchSize,
String excludeFields)
entity - table's entity array(do not allow null).batchSize - batch size.excludeFields - Don't insert fields list.<T> int insert(List<T> entityList)
entityList - table's entity list(do not allow null).<T> int insert(List<T> entityList, int batchSize)
entityList - table's entity list(do not allow null).batchSize - batch size.<T> int insert(List<T> entityList, String excludeFields)
entityList - table's entity list(do not allow null).excludeFields - fields list that don't need to insert.<T> int insert(List<T> entityList, int batchSize, String excludeFields)
entityList - table's entity list(do not allow null).batchSize - batch size.excludeFields - Don't insert fields list.<T> int update(T entity,
IncludeType includeType)
entity - table's entity(do not allow null),The id field in entity cannot be empty as a filtering condition.includeType - whether null string and null as a filter conditions.<T> int insert(T entity,
IncludeType includeType)
entity - table's entity(do not allow null).includeType - whether null string and null as a filter conditions.<T> long insertAndReturnId(T entity,
IncludeType includeType)
entity - table's entity(do not allow null).
includeType - whether null string and null as a filter conditions.int deleteById(Class<?> c, Integer id)
c - table's entity class(do not allow null).id - value of entity's id field.int deleteById(Class<?> c, Long id)
c - table's entity class(do not allow null).id - value of entity's id field.int deleteById(Class<?> c, String ids)
c - table's entity class(do not allow null).ids - ids values of entity's id field,if more than one,separate with comma.<T> int updateBy(T entity,
String... whereFields)
entity - table's entity(do not allow null).
whereFields - As a field list of where part in SQL, multiple fields can separated by commas in one
<T> int updateBy(T entity,
IncludeType includeType,
String... whereFields)
entity - table's entity(do not allow null).
includeType - whether null string and null as a filter conditions.whereFields - As a field list of where part in SQL, multiple fields can separated by commas in one
<T> int updateBy(T entity,
Condition condition,
String... whereFields)
entity - table's entity(do not allow null).
condition - Condition as filter the record.whereFields - As a field list of where part in SQL, multiple fields can separated by commas in one
<T> int updateById(T entity,
Condition condition)
entity - table's entity(do not allow null).
condition - Condition as filter the record.
<T> int update(T entity,
Condition condition,
String... updateFields)
entity - table's entity(do not allow null).
condition - Condition as filter the record.
updateFields - update fields.The methods setMultiply,setAdd,set in condition are not subject to this restriction.
<T> int update(T entity,
Condition condition)
entity - table's entity(do not allow null).
condition - Condition as filter the record.<T> int update(T oldEntity,
T newEntity)
oldEntity - Entity with old value field.newEntity - Entity with new value field.some fields(serialVersionUID,have annotation JoinTable or Ignore, value is null) would be ignored.<T> int save(T entity)
entity - <T> boolean createTable(Class<T> entityClass, boolean isDropExistTable)
entityClass - table's entityClass(do not allow null).isDropExistTable - whether drop the exist table before create<T> void indexNormal(Class<T> entityClass, String fields, String indexName)
entityClass - fields - indexName - <T> void unique(Class<T> entityClass, String fields, String indexName)
entityClass - fields - indexName - <T> void primaryKey(Class<T> entityClass, String fields, String keyName)
entityClass - fields - keyName - <T> void dropIndex(Class<T> entityClass, String indexName)
entityClass - indexName - void beginSameConnection()
void endSameConnection()
Copyright © 2025. All rights reserved.