3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.cache
;
12 import org
.hibernate
.collection
.internal
.PersistentMap
;
13 import org
.hibernate
.collection
.spi
.PersistentCollection
;
15 import eu
.etaxonomy
.cdm
.api
.cache
.CachedCommonServiceImpl
.CollectionField
;
16 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
23 public interface ICachedCommonService
{
25 public CdmBase
find(Class
<?
extends CdmBase
> clazz
, int id
);
27 public PersistentCollection
initializeCollection(PersistentCollection col
);
29 public void updatePersistentCollection(CollectionField colf
);
31 public boolean isEmpty(PersistentCollection col
);
33 public int size(PersistentCollection col
);
35 public Object
get(PersistentCollection col
, int index
);
37 public boolean contains(PersistentCollection col
, Object element
);
39 public boolean containsKey(PersistentCollection col
, Object key
);
41 public boolean containsValue(PersistentCollection col
, Object element
);
43 public CollectionField
getCollectionField(PersistentCollection pc
);