Class C2KLocalObjectMap<V extends C2KLocalObject>
java.lang.Object
org.cristalise.kernel.persistency.C2KLocalObjectMap<V>
- Type Parameters:
V-
- All Implemented Interfaces:
Map<String,,V> C2KLocalObject
- Direct Known Subclasses:
History
public class C2KLocalObjectMap<V extends C2KLocalObject>
extends Object
implements Map<String,V>, C2KLocalObject
A simple wrapper for ClusterStorage API to provide Map like access to cluster data.
It based on the cache of the ClusterStorage, i.e. it does no store any data.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionC2KLocalObjectMap(ItemPath item, ClusterType cluster) C2KLocalObjectMap(ItemPath item, ClusterType cluster, TransactionKey transKey) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Each C2KLocalObject is stored with a path identifier starting with the ClusterType: DomainPath: /Path/Domain/Name ItemPath: /Path/Item AgentPath: /Path/Agent RolePath: /Path/Role/Name Properties: /Property/Name Workflow: /LifeCycle/workflow Collections: /Collection/Name/Version (default Name='last') Outcomes: /Outcome/SchemaName/SchemaVersion/EventID Viewpoints: /ViewPoint/SchemaName/Name (default Name='last') Events: /AuditTrail/EventID Jobs: /Job/JobIDintgetName()Gets the name of the C2KLocalObjectbooleanisEmpty()keySet()voidvoidSets the name of the C2KLocalObjectintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cristalise.kernel.entity.C2KLocalObject
getClusterTypeMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
itemPath
-
clusterType
-
-
Constructor Details
-
C2KLocalObjectMap
-
C2KLocalObjectMap
-
-
Method Details
-
getLastId
public int getLastId() -
loadKeys
- Throws:
PersistencyException
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,V extends C2KLocalObject>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,V extends C2KLocalObject>
-
keySet
- Specified by:
keySetin interfaceMap<String,V extends C2KLocalObject>
-
get
- Specified by:
getin interfaceMap<String,V extends C2KLocalObject>
-
put
- Specified by:
putin interfaceMap<String,V extends C2KLocalObject>
-
remove
- Specified by:
removein interfaceMap<String,V extends C2KLocalObject>
-
size
public int size()- Specified by:
sizein interfaceMap<String,V extends C2KLocalObject>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<String,V extends C2KLocalObject>
-
putAll
- Specified by:
putAllin interfaceMap<String,V extends C2KLocalObject>
-
clear
public void clear()- Specified by:
clearin interfaceMap<String,V extends C2KLocalObject>
-
entrySet
- Specified by:
entrySetin interfaceMap<String,V extends C2KLocalObject>
-
values
- Specified by:
valuesin interfaceMap<String,V extends C2KLocalObject>
-
setName
Description copied from interface:C2KLocalObjectSets the name of the C2KLocalObject- Specified by:
setNamein interfaceC2KLocalObject- Parameters:
name- Name of the C2KLocalObject
-
getName
Description copied from interface:C2KLocalObjectGets the name of the C2KLocalObject- Specified by:
getNamein interfaceC2KLocalObject- Returns:
- name of the C2KLocalObject
-
getClusterPath
Description copied from interface:C2KLocalObjectEach C2KLocalObject is stored with a path identifier starting with the ClusterType:- DomainPath: /Path/Domain/Name
- ItemPath: /Path/Item
- AgentPath: /Path/Agent
- RolePath: /Path/Role/Name
- Properties: /Property/Name
- Workflow: /LifeCycle/workflow
- Collections: /Collection/Name/Version (default Name='last')
- Outcomes: /Outcome/SchemaName/SchemaVersion/EventID
- Viewpoints: /ViewPoint/SchemaName/Name (default Name='last')
- Events: /AuditTrail/EventID
- Jobs: /Job/JobID
- Specified by:
getClusterPathin interfaceC2KLocalObject- Returns:
- The path identifier (i.e. primary key) of the object
-