Package com.abstratt.kirra
Class Instance
- java.lang.Object
-
- com.abstratt.kirra.Tuple
-
- com.abstratt.kirra.Instance
-
- All Implemented Interfaces:
InstanceProtocol
,Serializable
public class Instance extends Tuple implements InstanceProtocol
Represents an object and its relationships.Supports the idea of full vs. light instances (see
InstanceManagement.DataProfile
).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
disabledActions
A map of disabled action names -> reasons.protected Map<String,Instance>
links
protected String
objectId
protected InstanceManagement.DataProfile
profile
-
Fields inherited from class com.abstratt.kirra.Tuple
scopeName, scopeNamespace, shorthand, values
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getDisabledActions()
String
getEntityName()
String
getEntityNamespace()
Map<String,Instance>
getLinks()
String
getObjectId()
InstanceManagement.DataProfile
getProfile()
InstanceRef
getReference()
Instance
getRelated(String propertyName)
Instance
getSingleRelated(String reference)
protected TypeRef.TypeKind
getTypeKind()
boolean
isFull()
boolean
isInstanceOf(TypeRef type)
boolean
isNew()
void
setDisabledActions(Map<String,String> disabledActions)
void
setEntityName(String entityName)
void
setEntityNamespace(String namespace)
void
setLinks(Map<String,Instance> links)
void
setObjectId(String objectId)
void
setProfile(InstanceManagement.DataProfile profile)
void
setRelated(String propertyName, Instance toLink)
void
setSingleRelated(String propertyName, Instance toLink)
String
toString()
-
Methods inherited from class com.abstratt.kirra.Tuple
getScopeName, getScopeNamespace, getShorthand, getTypeRef, getValue, getValues, hasValueFor, setScopeName, setScopeNamespace, setShorthand, setTypeRef, setValue, setValues
-
-
-
-
Method Detail
-
getEntityName
public String getEntityName()
- Specified by:
getEntityName
in interfaceInstanceProtocol
-
getEntityNamespace
public String getEntityNamespace()
- Specified by:
getEntityNamespace
in interfaceInstanceProtocol
-
getObjectId
public String getObjectId()
- Specified by:
getObjectId
in interfaceInstanceProtocol
-
getReference
public InstanceRef getReference()
-
isInstanceOf
public boolean isInstanceOf(TypeRef type)
-
isNew
public boolean isNew()
-
setEntityName
public void setEntityName(String entityName)
-
setEntityNamespace
public void setEntityNamespace(String namespace)
-
setObjectId
public void setObjectId(String objectId)
-
getTypeKind
protected TypeRef.TypeKind getTypeKind()
- Overrides:
getTypeKind
in classTuple
-
setProfile
public void setProfile(InstanceManagement.DataProfile profile)
-
getProfile
public InstanceManagement.DataProfile getProfile()
-
isFull
public boolean isFull()
-
-