public class NamedAssociationWrapper extends Object implements NamedAssociation<Object>
| Modifier and Type | Field and Description |
|---|---|
protected NamedAssociation<Object> |
next |
| Constructor and Description |
|---|
NamedAssociationWrapper(NamedAssociation<Object> next) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsName(String name)
Checks if there is an association with the given name.
|
int |
count() |
boolean |
equals(Object obj) |
Object |
get(String name)
Retrieves a named association.
|
int |
hashCode() |
Iterator<String> |
iterator() |
String |
nameOf(Object entity)
Checks if the entity is present.
|
NamedAssociation<Object> |
next() |
boolean |
put(String name,
Object entity)
Adds a named assocation.
|
EntityReference |
referenceOf(String name)
Returns the EntityReference for the Association with the given name.
|
Iterable<EntityReference> |
references()
Returns an unmodifiable Iterable of the references to the associated entities.
|
boolean |
remove(String name)
Remove a named association.
|
Map<String,Object> |
toMap() |
String |
toString() |
protected NamedAssociation<Object> next
public NamedAssociationWrapper(NamedAssociation<Object> next)
public NamedAssociation<Object> next()
public int count()
count in interface NamedAssociation<Object>public boolean containsName(String name)
NamedAssociationcontainsName in interface NamedAssociation<Object>name - The name of the association we are checking if it exists.public boolean put(String name, Object entity)
NamedAssociationput in interface NamedAssociation<Object>name - The name of the association.entity - The entity for this named association.public boolean remove(String name)
NamedAssociationremove in interface NamedAssociation<Object>name - The name of the association.public Object get(String name)
NamedAssociationget in interface NamedAssociation<Object>name - The name of the association.public String nameOf(Object entity)
NamedAssociationnameOf in interface NamedAssociation<Object>entity - The entity to look for.public Map<String,Object> toMap()
toMap in interface NamedAssociation<Object>public Iterable<EntityReference> references()
NamedAssociationreferences in interface NamedAssociation<Object>public EntityReference referenceOf(String name)
NamedAssociationreferenceOf in interface NamedAssociation<Object>name - The name of the association to return the EntityReference for