public class EntityData extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityData.ReferenceComparator |
static class |
EntityData.TitleComparator |
| Constructor and Description |
|---|
EntityData(EntityReference ref,
String displayTitle)
Minimal constructor - used for most basic cases
Use the setters to add in properties or the entity data if desired |
EntityData(EntityReference ref,
String displayTitle,
Object entity)
Basic constructor
Use this to construct a search result using the typical minimal amount of information, Use the setters to add in properties or the entity data if desired |
EntityData(EntityReference ref,
String displayTitle,
Object entity,
Map<String,Object> entityProperties)
Full constructor
Use this if you want to return the entity itself along with the key meta data and properties |
EntityData(Object data)
Using this as a data wrapper only
|
EntityData(Object data,
Map<String,Object> entityProperties)
Using this as a data wrapper only
|
EntityData(String reference,
String displayTitle)
Minimal constructor - used for most basic cases
Use the setters to add in properties or the entity if desired |
EntityData(String reference,
String displayTitle,
Object entity)
Basic constructor
Use this to construct a search result using the typical minimal amount of information, Use the setters to add in properties or the entity if desired |
EntityData(String reference,
String displayTitle,
Object entity,
Map<String,Object> entityProperties)
Full constructor
Use this if you want to return the entity itself along with the key meta data and properties |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Object |
getData()
(OPTIONAL - may be null)
This is the entity data object itself (if there is one),
this is included at the discretion of the entity provider author,
if this is null then the entity data is not available or would be prohibitively large (i.e. typically left out for efficiency)
|
String |
getDisplayTitle()
A string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the data represented by an entity
|
String |
getEntityId() |
Map<String,Object> |
getEntityProperties()
A set of properties to return along with the entity information,
this may be presented and used for filtering,
this will be empty if it is not used
|
EntityReference |
getEntityRef()
The entity reference object which makes it easy to get to the prefix or id of this entity if needed
|
String |
getEntityReference()
The entity reference - a globally unique reference to an entity,
consists of the entity prefix and optional segments (normally the id at least)
|
String |
getEntityURL()
The entityURL to the entity represented by this reference,
should be an absolute entityURL (server name optional)
|
int |
hashCode() |
boolean |
isDataOnly() |
boolean |
isDisplayTitleSet() |
boolean |
isPopulated() |
void |
setData(Object entity) |
void |
setDataOnly(boolean dataOnly)
FOR INTERNAL USE ONLY - do not use
|
void |
setDisplayTitle(String displayTitle)
A string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the data represented by an entity
|
void |
setEntityProperties(Map<String,Object> entityProperties)
(OPTIONAL - may be null)
A set of properties to return along with the entity information,
this may be presented and used for filtering,
should be null or empty if not used
|
void |
setEntityURL(String url)
WARNING: for internal use only
|
void |
setPopulated(boolean populated)
FOR INTERNAL USE ONLY - do not use
|
String |
toString() |
public EntityData(String reference, String displayTitle)
reference - a globally unique reference to an entity,
consists of the entity prefix and id (e.g. /prefix/id)entityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitypublic EntityData(String reference, String displayTitle, Object entity)
reference - a globally unique reference to an entity,
consists of the entity prefix and id (e.g. /prefix/id)entityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see Resolvablepublic EntityData(String reference, String displayTitle, Object entity, Map<String,Object> entityProperties)
reference - a globally unique reference to an entity,
consists of the entity prefix and id (e.g. /prefix/id)entityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see ResolvableentityProperties - a set of properties to return along with the entity information,
this may be presented and used for filtering,public EntityData(EntityReference ref, String displayTitle)
ref - an object which represents a globally unique reference to an entity,
consists of the entity prefix and identityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitypublic EntityData(EntityReference ref, String displayTitle, Object entity)
ref - an object which represents a globally unique reference to an entity,
consists of the entity prefix and identityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see Resolvablepublic EntityData(EntityReference ref, String displayTitle, Object entity, Map<String,Object> entityProperties)
ref - an object which represents a globally unique reference to an entity,
consists of the entity prefix and identityDisplayTitle - a string which is suitable for display and provides a short summary of the entity,
typically 100 chars or less, this may be the name or title of the entity represented by an entitydata - an entity data object, see ResolvableentityProperties - a set of properties to return along with the entity information,
this may be presented and used for filtering,public EntityData(Object data)
data - any data to wrap this inpublic void setData(Object entity)
public Object getData()
public String getEntityId()
public String getEntityReference()
public EntityReference getEntityRef()
public void setDisplayTitle(String displayTitle)
public String getDisplayTitle()
public boolean isDisplayTitleSet()
public void setEntityURL(String url)
url - the url to access this entitypublic String getEntityURL()
public void setEntityProperties(Map<String,Object> entityProperties)
entityProperties - a map of property name => valuepublic Map<String,Object> getEntityProperties()
public void setPopulated(boolean populated)
public boolean isPopulated()
public void setDataOnly(boolean dataOnly)
public boolean isDataOnly()
Copyright © 2003–2022 Sakai Project. All rights reserved.