T - type of DbEntity to be handled by this instancepublic abstract class AbstractEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity> extends Object implements IEntityHandler<T>
IEntityHandler| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
protected Map<String,com.google.common.base.Converter<Object,Object>> |
mappingConvertors
Converters for changing value.
|
protected Map<String,String> |
mappingFromDocToEntity |
protected Map<String,String> |
mappingFromEntityToDoc |
protected Map<String,String> |
mappingFromQueryToDoc
Additional map to customize mapping especially from Query to doc queries
|
BPM_ENTITY_CLASS| Constructor and Description |
|---|
AbstractEntityHandler(String schemaClass) |
AbstractEntityHandler(String schemaClass,
String pkField) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyRelationships(OSchemaHelper helper) |
void |
applySchema(OSchemaHelper helper) |
protected void |
checkMapping(OPersistenceSession session) |
protected void |
command(OPersistenceSession session,
String sql,
Object... args) |
protected Object |
convertValueFromEntity(String entityFieldName,
Object value) |
protected Object |
convertValueToEntity(String entityFieldName,
Object value) |
void |
create(T entity,
OPersistenceSession session) |
protected void |
delete(OPersistenceSession session,
Map<String,?> query,
com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger,
String... ignoreFileds) |
protected void |
delete(OPersistenceSession session,
Map<String,?> query,
String... ignoreFileds) |
protected void |
delete(OPersistenceSession session,
org.camunda.bpm.engine.query.Query<?,? super T> query,
com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger,
String... ignoreFileds) |
protected void |
delete(OPersistenceSession session,
org.camunda.bpm.engine.query.Query<?,? super T> query,
String... ignoreFileds) |
void |
delete(T entity,
OPersistenceSession session) |
void |
deleteBulk(org.camunda.bpm.engine.impl.db.entitymanager.operation.DbBulkOperation operation,
OPersistenceSession session) |
protected void |
enrichWhereByBean(OPersistenceSession session,
com.github.raymanrt.orientqb.query.core.AbstractQuery q,
com.orientechnologies.orient.core.metadata.schema.OClass schemaClass,
Object query,
List<Object> args,
List<String> ignore) |
protected void |
enrichWhereByMap(OPersistenceSession session,
com.github.raymanrt.orientqb.query.core.AbstractQuery q,
com.orientechnologies.orient.core.metadata.schema.OClass schemaClass,
Map<String,?> query,
List<Object> args,
List<String> ignore) |
Class<T> |
getEntityClass() |
protected org.apache.wicket.core.util.lang.PropertyResolver.IGetAndSet |
getGetAndSetter(Class<?> clazz,
String property) |
String |
getPkField() |
String |
getSchemaClass() |
boolean |
hasNeedInCache() |
protected void |
initMapping(OPersistenceSession session) |
protected <T> T |
invokeStatement(String statement,
Object... args) |
void |
lock(String statement,
Object parameter,
OPersistenceSession session) |
T |
mapToEntity(com.orientechnologies.orient.core.record.impl.ODocument doc,
T entity,
OPersistenceSession session) |
com.orientechnologies.orient.core.record.impl.ODocument |
mapToODocument(T entity,
com.orientechnologies.orient.core.record.impl.ODocument doc,
OPersistenceSession session) |
com.orientechnologies.orient.core.hook.ORecordHook.RESULT |
onTrigger(com.orientechnologies.orient.core.db.document.ODatabaseDocument db,
com.orientechnologies.orient.core.record.impl.ODocument doc,
com.orientechnologies.orient.core.hook.ORecordHook.TYPE iType) |
protected List<T> |
query(OPersistenceSession session,
Map<String,?> query,
com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger,
String... ignoreFileds) |
protected List<T> |
query(OPersistenceSession session,
Map<String,?> query,
String... ignoreFileds) |
protected List<T> |
query(OPersistenceSession session,
org.camunda.bpm.engine.query.Query<?,? super T> query,
com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger,
String... ignoreFileds) |
protected List<T> |
query(OPersistenceSession session,
org.camunda.bpm.engine.query.Query<?,? super T> query,
String... ignoreFileds) |
protected List<T> |
queryList(OPersistenceSession session,
String sql,
Object... args) |
protected T |
querySingle(OPersistenceSession session,
String sql,
Object... args) |
T |
read(String id,
OPersistenceSession session) |
com.orientechnologies.orient.core.record.impl.ODocument |
readAsDocument(String id,
OPersistenceSession session) |
List<T> |
selectList(String statement,
Object parameter,
OPersistenceSession session) |
T |
selectOne(String statement,
Object parameter,
OPersistenceSession session) |
boolean |
supportsStatement(String statement) |
void |
update(T entity,
OPersistenceSession session) |
void |
updateBulk(org.camunda.bpm.engine.impl.db.entitymanager.operation.DbBulkOperation operation,
OPersistenceSession session) |
protected com.github.raymanrt.orientqb.query.core.AbstractQuery |
where(com.github.raymanrt.orientqb.query.core.AbstractQuery q,
com.github.raymanrt.orientqb.query.Clause clause) |
protected final org.slf4j.Logger logger
protected Map<String,String> mappingFromQueryToDoc
public AbstractEntityHandler(String schemaClass)
public Class<T> getEntityClass()
getEntityClass in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public String getSchemaClass()
getSchemaClass in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public String getPkField()
getPkField in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void create(T entity, OPersistenceSession session)
create in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public T read(String id, OPersistenceSession session)
read in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public com.orientechnologies.orient.core.record.impl.ODocument readAsDocument(String id, OPersistenceSession session)
readAsDocument in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void update(T entity, OPersistenceSession session)
update in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void delete(T entity, OPersistenceSession session)
delete in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>protected void checkMapping(OPersistenceSession session)
protected org.apache.wicket.core.util.lang.PropertyResolver.IGetAndSet getGetAndSetter(Class<?> clazz, String property)
protected void initMapping(OPersistenceSession session)
protected Object convertValueFromEntity(String entityFieldName, Object value)
public T mapToEntity(com.orientechnologies.orient.core.record.impl.ODocument doc, T entity, OPersistenceSession session)
mapToEntity in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public boolean hasNeedInCache()
hasNeedInCache in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public com.orientechnologies.orient.core.record.impl.ODocument mapToODocument(T entity, com.orientechnologies.orient.core.record.impl.ODocument doc, OPersistenceSession session)
mapToODocument in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void applySchema(OSchemaHelper helper)
applySchema in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void applyRelationships(OSchemaHelper helper)
applyRelationships in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public boolean supportsStatement(String statement)
supportsStatement in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public List<T> selectList(String statement, Object parameter, OPersistenceSession session)
selectList in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public T selectOne(String statement, Object parameter, OPersistenceSession session)
selectOne in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void lock(String statement, Object parameter, OPersistenceSession session)
lock in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void deleteBulk(org.camunda.bpm.engine.impl.db.entitymanager.operation.DbBulkOperation operation,
OPersistenceSession session)
deleteBulk in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>public void updateBulk(org.camunda.bpm.engine.impl.db.entitymanager.operation.DbBulkOperation operation,
OPersistenceSession session)
updateBulk in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>protected T querySingle(OPersistenceSession session, String sql, Object... args)
protected List<T> queryList(OPersistenceSession session, String sql, Object... args)
protected void command(OPersistenceSession session, String sql, Object... args)
protected List<T> query(OPersistenceSession session, org.camunda.bpm.engine.query.Query<?,? super T> query, String... ignoreFileds)
protected List<T> query(OPersistenceSession session, org.camunda.bpm.engine.query.Query<?,? super T> query, com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger, String... ignoreFileds)
protected List<T> query(OPersistenceSession session, Map<String,?> query, String... ignoreFileds)
protected List<T> query(OPersistenceSession session, Map<String,?> query, com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger, String... ignoreFileds)
protected void delete(OPersistenceSession session, org.camunda.bpm.engine.query.Query<?,? super T> query, String... ignoreFileds)
protected void delete(OPersistenceSession session, org.camunda.bpm.engine.query.Query<?,? super T> query, com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger, String... ignoreFileds)
protected void delete(OPersistenceSession session, Map<String,?> query, String... ignoreFileds)
protected void delete(OPersistenceSession session, Map<String,?> query, com.google.common.base.Function<com.github.raymanrt.orientqb.query.Query,com.github.raymanrt.orientqb.query.Query> queryManger, String... ignoreFileds)
protected void enrichWhereByBean(OPersistenceSession session, com.github.raymanrt.orientqb.query.core.AbstractQuery q, com.orientechnologies.orient.core.metadata.schema.OClass schemaClass, Object query, List<Object> args, List<String> ignore) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
protected void enrichWhereByMap(OPersistenceSession session, com.github.raymanrt.orientqb.query.core.AbstractQuery q, com.orientechnologies.orient.core.metadata.schema.OClass schemaClass, Map<String,?> query, List<Object> args, List<String> ignore)
protected com.github.raymanrt.orientqb.query.core.AbstractQuery where(com.github.raymanrt.orientqb.query.core.AbstractQuery q,
com.github.raymanrt.orientqb.query.Clause clause)
public com.orientechnologies.orient.core.hook.ORecordHook.RESULT onTrigger(com.orientechnologies.orient.core.db.document.ODatabaseDocument db,
com.orientechnologies.orient.core.record.impl.ODocument doc,
com.orientechnologies.orient.core.hook.ORecordHook.TYPE iType)
onTrigger in interface IEntityHandler<T extends org.camunda.bpm.engine.impl.db.DbEntity>Copyright © 2019. All rights reserved.