Package io.vertigo.datamodel.data.model
Class VAccessor<E extends Entity>
java.lang.Object
io.vertigo.datamodel.data.model.VAccessor<E>
- Type Parameters:
E- the type of entity
- All Implemented Interfaces:
Serializable
This class is a way to access an entity defined by a relationship.
It's a kind of box (aka optional) that offers a small list of methods.
- Author:
- pchretien
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VAccessor
Constructor.- Parameters:
clazz- the entity classrole- the role of the association (case of multiple associations with the same entity)
-
VAccessor
Constructor.- Parameters:
targetDtDefinition- the entity definitionrole- the role of the association (case of multiple associations with the same entity)
-
-
Method Details
-
get
- Returns:
- the entity
-
getUID
- Returns:
- the entity uid
-
getId
- Returns:
- the entity id
-
set
Sets the entity- Parameters:
entity- the entity
-
setId
Sets the entity id- Parameters:
id- the entity id
-
setUID
Sets the entity uri- Parameters:
uid- the entity uri
-
getRole
- Returns:
- Role of this relation
-
isLoaded
public final boolean isLoaded()- Returns:
- if entity is already loaded
-