public class BasicEntity extends java.lang.Object implements Entity, java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
EntityBuilder |
entityBuilder()
Get an
EntityBuilder
pre-filled with the state of
this Entity to create
a mutable clone as Entity
instances must be immutable |
boolean |
equals(java.lang.Object obj) |
Link |
getLink(java.lang.String rel)
Get the named
Link |
java.util.Map<java.lang.String,Link> |
getLinks()
Return all
Link
in a Map keyed
with the name |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Get all properties in a
Map
keyed with the name of the property |
java.lang.Object |
getProperty(java.lang.String name)
Get the named property
as an
Object |
<T> T |
getProperty(java.lang.String name,
java.lang.Class<T> convertTo)
Get a property with type
|
java.lang.String |
getProperty(java.lang.String name,
java.text.Format format)
Get a property as a formattted
string using the supplied
Format |
<T> T |
getProperty(java.lang.String name,
PropertyConverter<T,java.lang.Object> converter)
Get a property with
the type
Object using
the supplied PropertyConverter |
java.util.Collection<Entity> |
getRelation(java.lang.String rel)
Get the named relation
|
java.util.Map<java.lang.String,java.util.Collection<Entity>> |
getRelations()
Get a
Map containing
all related Entity keyed with
name (rel). |
int |
hashCode() |
java.lang.String |
toString() |
public java.lang.String getProperty(java.lang.String name,
java.text.Format format)
EntityFormatgetProperty in interface Entitypublic java.lang.Object getProperty(java.lang.String name)
EntityObjectgetProperty in interface Entityname - name of propertyObject formpublic <T> T getProperty(java.lang.String name,
java.lang.Class<T> convertTo)
EntitygetProperty in interface Entitypublic <T> T getProperty(java.lang.String name,
PropertyConverter<T,java.lang.Object> converter)
EntityObject using
the supplied PropertyConvertergetProperty in interface Entityname - name of property to convert and returnconverter - PropertyConverter to perform conversionspublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
EntityMap
keyed with the name of the propertygetProperties in interface EntityMap of propertiespublic java.util.Map<java.lang.String,java.util.Collection<Entity>> getRelations()
EntityMap containing
all related Entity keyed with
name (rel).getRelations in interface EntityMap with Entitypublic java.util.Collection<Entity> getRelation(java.lang.String rel)
EntitygetRelation in interface Entityrel - String name of the relation to fetchCollection of Entity that have this namepublic java.util.Map<java.lang.String,Link> getLinks()
EntityLink
in a Map keyed
with the namepublic Link getLink(java.lang.String rel)
EntityLinkpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic EntityBuilder entityBuilder()
EntityEntityBuilder
pre-filled with the state of
this Entity to create
a mutable clone as Entity
instances must be immutableentityBuilder in interface EntityEntityBuilder for this Entity