public abstract class ObjSQLAbstractServiceImpl extends Object implements ObjSQLService
| Constructor and Description |
|---|
ObjSQLAbstractServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginSameConnection()
declare begin Same Connection for some ORM operation.
|
<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.
|
void |
endSameConnection()
declare end Same Connection for some ORM operation.
|
String |
getDataSourceName()
get DataSource name which set for current instance.
|
InterceptorChain |
getInterceptorChain()
Get the Interceptor chain, which can be used for a generated object set a specific interceptor.
|
abstract Suid |
getSuid() |
<T> int |
insert(T entity)
According to entity object insert record.
|
<T> long |
insertAndReturnId(T entity)
According to entity object insert record and return id value.
|
<T> List<T> |
select(T entity)
According to entity object select records from database.
|
<T> List<T> |
select(T entity,
Condition condition)
Select the records according to entity and condition.
|
void |
setDataSourceName(String dsName)
Set the dataSource for current instance.
|
Suid |
setDynamicParameter(String para,
String value)
set dynamic parameter for dynamic table & entity name
This method is called earlier than the select, update, insert, delete methods. |
void |
setNameTranslate(NameTranslate nameTranslate)
Set the NameTranslate for current instance.
|
<T> int |
update(T entity)
According to entity object update record.This method just has id field to SQL where expression.
|
public abstract Suid getSuid()
public <T> int insert(T entity)
Suidpublic <T> long insertAndReturnId(T entity)
SuidinsertAndReturnId in interface Suidentity - table's entity(do not allow null).public <T> List<T> select(T entity)
Suidselect in interface Suidentity - table's entity(do not allow null).public <T> int delete(T entity)
Suiddelete in interface Suidentity - table's entity(do not allow null).public <T> int update(T entity)
Suidupdate in interface SuidSuidRich.update(Object,java.lang.String)public <T> List<T> select(T entity, Condition condition)
Suidpublic <T> int delete(T entity,
Condition condition)
Suiddelete in interface Suidentity - 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.public Suid setDynamicParameter(String para, String value)
SuidsetDynamicParameter in interface Suidpara - parameter namevalue - parameter valuepublic void beginSameConnection()
SuidbeginSameConnection in interface Suidpublic void endSameConnection()
SuidendSameConnection in interface Suidpublic void setDataSourceName(String dsName)
CommOperatesetDataSourceName in interface CommOperatedsName - dataSource namepublic String getDataSourceName()
CommOperategetDataSourceName in interface CommOperatepublic InterceptorChain getInterceptorChain()
CommOperategetInterceptorChain in interface CommOperatepublic void setNameTranslate(NameTranslate nameTranslate)
CommOperatesetNameTranslate in interface CommOperatenameTranslate - nameTranslateCopyright © 2022. All rights reserved.