org.gcube.dbinterface.persistence
Class ObjectPersistency<T>
java.lang.Object
org.gcube.dbinterface.persistence.ObjectPersistency<T>
- Type Parameters:
T -
public class ObjectPersistency<T>
- extends Object
- Author:
- Lucio Lelii
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
persistencyMapping
public static HashMap<String,ObjectPersistency> persistencyMapping
addCallback
public void addCallback(PersistencyCallback<T> obj)
get
public static <T> ObjectPersistency<T> get(Class<T> clazz,
org.gcube.common.dbinterface.registry.DBInterface dbInterface)
throws Exception
- Throws:
Exception
deleteByKey
public void deleteByKey(Object key)
throws Exception
- Throws:
Exception
getInfo
public Map<String,String> getInfo()
throws Exception
- Throws:
Exception
getByKey
public T getByKey(Object key)
throws ObjectNotFoundException,
Exception
- Throws:
ObjectNotFoundException
Exception
insert
public void insert(T object)
throws Exception
- Throws:
Exception
drop
public void drop()
throws Exception
- Throws:
Exception
deleteByValue
public void deleteByValue(String fieldName,
Object value)
throws Exception
- Throws:
Exception
getObjectByField
public List<T> getObjectByField(String fieldName,
Object value)
throws Exception
- Throws:
Exception
getObjectByFields
public List<T> getObjectByFields(HashMap<String,Object> fieldValueMapping)
throws Exception
- Throws:
Exception
getAll
public List<T> getAll()
throws Exception
- Throws:
Exception
getTable
public org.gcube.common.dbinterface.tables.Table getTable()
existsKey
public boolean existsKey(Object key)
throws Exception
- Throws:
Exception
existEntryByFields
public boolean existEntryByFields(HashMap<String,Object> fieldValueMapping)
throws Exception
- Throws:
Exception
update
public void update(T obj)
throws ObjectStateChangedException,
ObjectNotFoundException,
Exception
- Parameters:
obj -
- Throws:
ObjectStateChangedException
ObjectNotFoundException
Exception
updateByFields
public void updateByFields(T obj,
HashMap<String,Object> fieldValueMapping)
throws ObjectStateChangedException,
ObjectNotFoundException,
Exception
- Parameters:
obj - fieldValueMapping -
- Throws:
ObjectStateChangedException
ObjectNotFoundException
Exception
Copyright © 2013. All Rights Reserved.