@Singleton public class DataBaseApiDataAccessLayer extends Object implements ApiDataAccessLayer
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
DataBaseApiDataAccessLayer() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
createObject(EntityDef objectType,
Map<FieldDef,String> newData)
新增对象
|
boolean |
deleteObject(EntityDef objectType,
String id)
删除对象
|
String |
generateId(EntityDef objectType,
String apiPath)
生成 ID
|
Map<FieldDef,String> |
getObjectBy(EntityDef objectType,
FieldDef indexKey,
String indexValue)
点查 or 唯一索引
|
void |
init() |
List<Map<FieldDef,String>> |
listObjectBy(EntityDef objectType,
Map<QueryCondition,Object> conditions)
列表/搜索
|
boolean |
updateObject(EntityDef objectType,
String id,
Map<FieldDef,String> newData)
更新对象
|
@Init
public void init()
throws SQLException
SQLExceptionpublic Map<FieldDef,String> getObjectBy(EntityDef objectType, FieldDef indexKey, String indexValue)
ApiDataAccessLayergetObjectBy 在接口中 ApiDataAccessLayerpublic List<Map<FieldDef,String>> listObjectBy(EntityDef objectType, Map<QueryCondition,Object> conditions)
ApiDataAccessLayerlistObjectBy 在接口中 ApiDataAccessLayerpublic String generateId(EntityDef objectType, String apiPath)
ApiDataAccessLayergenerateId 在接口中 ApiDataAccessLayerpublic boolean deleteObject(EntityDef objectType, String id)
ApiDataAccessLayerdeleteObject 在接口中 ApiDataAccessLayerpublic boolean updateObject(EntityDef objectType, String id, Map<FieldDef,String> newData)
ApiDataAccessLayerupdateObject 在接口中 ApiDataAccessLayerpublic boolean createObject(EntityDef objectType, Map<FieldDef,String> newData)
ApiDataAccessLayercreateObject 在接口中 ApiDataAccessLayerCopyright © 2020–2021. All rights reserved.