Revision e09f9c40
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java | ||
---|---|---|
9 | 9 |
*/ |
10 | 10 |
package eu.etaxonomy.taxeditor.service; |
11 | 11 |
|
12 |
import org.hibernate.collection.spi.PersistentCollection;
|
|
12 |
import java.util.UUID;
|
|
13 | 13 |
|
14 | 14 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
15 | 15 |
import eu.etaxonomy.taxeditor.remoting.cache.ProxyUtils.CollectionField; |
... | ... | |
23 | 23 |
|
24 | 24 |
public CdmBase find(Class<? extends CdmBase> clazz, int id); |
25 | 25 |
|
26 |
public PersistentCollection initializeCollection(PersistentCollection col); |
|
27 |
|
|
28 | 26 |
public void updatePersistentCollection(CollectionField colf); |
29 | 27 |
|
30 |
public boolean isEmpty(PersistentCollection col); |
|
31 |
|
|
32 |
public int size(PersistentCollection col); |
|
33 |
|
|
34 |
public Object get(PersistentCollection col, int index); |
|
35 |
|
|
36 |
public boolean contains(PersistentCollection col, Object element); |
|
37 |
|
|
38 |
public boolean containsKey(PersistentCollection col, Object key); |
|
39 |
|
|
40 |
public boolean containsValue(PersistentCollection col, Object element); |
|
28 |
/** |
|
29 |
* Initializes a collection or map. |
|
30 |
* |
|
31 |
* @param ownerUuid uuid of owner cdm entity |
|
32 |
* @param fieldName field name of collection or map |
|
33 |
* @return initialised collection or map |
|
34 |
*/ |
|
35 |
public Object initializeCollection(UUID ownerUuid, String fieldName); |
|
36 |
|
|
37 |
/** |
|
38 |
* Checks if a collection or map is empty. |
|
39 |
* |
|
40 |
* @param ownerUuid uuid of owner cdm entity |
|
41 |
* @param fieldName field name of collection or map |
|
42 |
* @return true if the collection of map is empty, else false |
|
43 |
*/ |
|
44 |
public boolean isEmpty(UUID ownerUuid, String fieldName); |
|
45 |
|
|
46 |
/** |
|
47 |
* Returns the size of requested collection or map. |
|
48 |
* |
|
49 |
* @param ownerUuid uuid of owner cdm entity |
|
50 |
* @param fieldName field name of collection or map |
|
51 |
* @return the size of the persistent collection |
|
52 |
*/ |
|
53 |
public int size(UUID ownerUuid, String fieldName); |
|
54 |
|
|
55 |
/** |
|
56 |
* Checks whether an object is contained within a persistent collection. |
|
57 |
* |
|
58 |
* @param ownerUuid uuid of owner cdm entity |
|
59 |
* @param fieldName field name of collection or map |
|
60 |
* @param element the element to check for |
|
61 |
* @return true if the element exists in the collection, false o/w |
|
62 |
*/ |
|
63 |
public boolean contains(UUID ownerUuid, String fieldName, Object element); |
|
64 |
|
|
65 |
/** |
|
66 |
* Checks whether an index object exists within a persistent collection |
|
67 |
* (usually a map) |
|
68 |
* |
|
69 |
* @param ownerUuid uuid of owner cdm entity |
|
70 |
* @param fieldName field name of map |
|
71 |
* @param key the index object to look for. |
|
72 |
* @return true if the index object exists in the collection, false o/w |
|
73 |
*/ |
|
74 |
public boolean containsKey(UUID ownerUuid, String fieldName, Object key); |
|
75 |
|
|
76 |
/** |
|
77 |
* checks whether an value object exists within a persistent collection |
|
78 |
* (usually a map) |
|
79 |
* |
|
80 |
* @param ownerUuid uuid of owner cdm entity |
|
81 |
* @param fieldName field name of map |
|
82 |
* @param key the value object to look for. |
|
83 |
* @return true if the value object exists in the collection, false o/w |
|
84 |
*/ |
|
85 |
public boolean containsValue(UUID ownerUuid, String fieldName, Object element); |
|
41 | 86 |
|
42 | 87 |
|
43 | 88 |
|
Also available in: Unified diff
#5031 Update remoting code to be compatible with new common service collection calls