T - public class ObjectPersistency<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
static HashMap<String,ObjectPersistency> |
persistencyMapping |
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(PersistencyCallback<T> obj) |
void |
deleteByKey(Object key) |
void |
deleteByValue(String fieldName,
Object value) |
void |
drop() |
boolean |
existEntryByFields(HashMap<String,Object> fieldValueMapping) |
boolean |
existsKey(Object key) |
static <T> ObjectPersistency<T> |
get(Class<T> clazz) |
List<T> |
getAll() |
T |
getByKey(Object key) |
Map<String,String> |
getInfo() |
List<T> |
getObjectByField(String fieldName,
Object value) |
List<T> |
getObjectByFields(HashMap<String,Object> fieldValueMapping) |
SimpleTable |
getTable() |
void |
insert(T object) |
void |
update(T obj) |
void |
updateByFields(T obj,
HashMap<String,Object> fieldValueMapping) |
public static HashMap<String,ObjectPersistency> persistencyMapping
public void addCallback(PersistencyCallback<T> obj)
public static <T> ObjectPersistency<T> get(Class<T> clazz) throws Exception
Exceptionpublic T getByKey(Object key) throws ObjectNotFoundException, Exception
ObjectNotFoundExceptionExceptionpublic void deleteByValue(String fieldName, Object value) throws Exception
Exceptionpublic List<T> getObjectByField(String fieldName, Object value) throws Exception
Exceptionpublic List<T> getObjectByFields(HashMap<String,Object> fieldValueMapping) throws Exception
Exceptionpublic SimpleTable getTable()
public boolean existEntryByFields(HashMap<String,Object> fieldValueMapping) throws Exception
Exceptionpublic void update(T obj) throws ObjectStateChangedException, ObjectNotFoundException, Exception
obj - ObjectStateChangedExceptionObjectNotFoundExceptionExceptionpublic void updateByFields(T obj, HashMap<String,Object> fieldValueMapping) throws ObjectStateChangedException, ObjectNotFoundException, Exception
obj - fieldValueMapping - ObjectStateChangedExceptionObjectNotFoundExceptionExceptionCopyright © 2015. All Rights Reserved.