merge from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.remoting / src / main / java / eu / etaxonomy / cdm / api / cache / ICachedCommonService.java
1 // $Id$
2 /**
3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.cdm.api.cache;
11
12 import org.hibernate.collection.spi.PersistentCollection;
13
14 import eu.etaxonomy.cdm.api.cache.CachedCommonServiceImpl.CollectionField;
15 import eu.etaxonomy.cdm.model.common.CdmBase;
16
17 /**
18 * @author cmathew
19 * @date 14 Oct 2014
20 *
21 */
22 public interface ICachedCommonService {
23
24 public CdmBase find(Class<? extends CdmBase> clazz, int id);
25
26 public PersistentCollection initializeCollection(PersistentCollection col);
27
28 public void updatePersistentCollection(CollectionField colf);
29
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);
41
42 public CollectionField getCollectionField(PersistentCollection pc);
43
44
45
46 }