Common contract for lightweight beans that wrap a persisted domain entity for use in templates and JS controllers. Implementations such as ProfileBean and OrgData expose a stable identifier and a human-readable display name for their underlying entity, and give callers a way back to the real entity object when one is needed, for example to compare identity or look up further detail.
Implements: Relational
Properties
| Property | Returns | Description |
|---|---|---|
| entityName | String | Identifier used to refer to this entity within the generic EntityBean API, distinct from its display name. Implementations use a stable value such as a username or name, never null for a bean built from a persisted entity. |
Methods
getEntityName()
Returns: String
Identifier used to refer to this entity within the generic EntityBean API, distinct from its display name. Implementations use a stable value such as a username or name, never null for a bean built from a persisted entity.
formattedName()
Returns: String
Human-readable display name for this entity, such as a person's full name or an organisation's title.
entityObject()
Returns: BaseEntity
Returns the domain object underlying this bean, eg a Profile or Organisation.