|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.commons.persistence.PersistenceHelper
public class PersistenceHelper
Description:
Helper methods to work with persistable objects
Initial Date: Nov 30, 2004
| Constructor Summary | |
|---|---|
PersistenceHelper()
|
|
| Method Summary | |
|---|---|
static Persistable |
getPersistableByPersistableKey(java.util.Iterator iter,
Persistable persistable)
FIXME:fj:c cleanup up these methods here and class SyncHelper Checks if the given persistable is in the given iterator (database identity). |
static int |
indexOf(java.util.List objects,
java.lang.Long key)
Returns the position of the object in the list. |
static int |
indexOf(java.util.List objects,
Persistable persistable)
Returns the position of the object in the list. |
static boolean |
listContainsObjectByKey(java.util.List objects,
java.lang.Long key)
Iterates over a list to see if there is an object in the list with the given persistable key that is used by the hibernate layer. |
static boolean |
listContainsObjectByKey(java.util.List objects,
Persistable persistable)
Iterates over a list to see if the given persistable object is already in this list. |
static int |
removeObjectsFromList(java.util.List originalList,
java.util.List toBeRemovedObjects)
Removes a list of persistable objects from another list with persistable objects by comparing the hibernate key instead of the object identity. |
static boolean |
replaceObjectInListByKey(java.util.List objects,
Persistable toBeReplacedObject)
Replace an object in the given list that has the same persistance key. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceHelper()
| Method Detail |
|---|
public static Persistable getPersistableByPersistableKey(java.util.Iterator iter,
Persistable persistable)
iter - Iterator of persistable objectspersistable - The persistable object that is looked for in the iterator
public static boolean listContainsObjectByKey(java.util.List objects,
Persistable persistable)
objects - List of persistable objectspersistable - Persistable object
public static boolean listContainsObjectByKey(java.util.List objects,
java.lang.Long key)
objects - List of persistable objectspersistable - Persistable object
public static int indexOf(java.util.List objects,
Persistable persistable)
objects - persistable -
public static int indexOf(java.util.List objects,
java.lang.Long key)
objects - key -
public static boolean replaceObjectInListByKey(java.util.List objects,
Persistable toBeReplacedObject)
objects - List ob original objectstoBeReplacedObject - The object that should be searched for in the list and the
replace value
public static int removeObjectsFromList(java.util.List originalList,
java.util.List toBeRemovedObjects)
originalList - toBeRemovedObjects -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||