Class ClientEntityImpl
java.lang.Object
org.apache.olingo.client.api.domain.ClientItem
org.apache.olingo.client.api.domain.AbstractClientPayload
org.apache.olingo.client.core.domain.ClientEntityImpl
- All Implemented Interfaces:
ClientAnnotatable,ClientEntity,ClientInvokeResult,ClientLinked,ClientSingleton
public class ClientEntityImpl
extends AbstractClientPayload
implements ClientEntity, ClientSingleton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddLink(ClientLink link) Puts the given link into one of available lists, based on its type.booleangetAssociationLink(String name) Gets association link with given name, if available, otherwise null.Returns all entity association links.Returns OData entity edit link.getETag()Gets ETag.getId()To request entity references in place of the actual entities, the client issues a GET request with /$ref appended to the resource path.getLink()Gets media content source.Gets media content type.getMediaEditLink(String name) Gets media-edit link with given name, if available, otherwise null.Returns entity media edit links.ETag of the binary stream represented by this media entity or named stream property.getNavigationLink(String name) Gets navigation link with given name, if available, otherwise null.Returns all entity navigation links (including inline entities / entity sets).getOperation(String title) Searches for operation with given title.Gets operations.Returns OData entity properties.getProperty(String name) Searches for property with given name.inthashCode()booleanChecks if the current entity is a media entity.booleanTRUE if read-only entity.booleanremoveLink(ClientLink link) Removes the given link from any list (association, navigation, edit-media).voidsetEditLink(URI editLink) Sets OData entity edit link.voidSets ETag.voidSet id for this OData entity.voidsetMediaContentSource(URI mediaContentSource) Sets media content source.voidsetMediaContentType(String mediaContentType) Sets media content type.voidsetMediaEntity(boolean isMediaEntity) Sets media entity flag.voidsetMediaETag(String eTag) Set media ETag.toString()Methods inherited from class org.apache.olingo.client.api.domain.AbstractClientPayload
getContextURL, setContextURLMethods inherited from class org.apache.olingo.client.api.domain.ClientItem
getName, setLink
-
Constructor Details
-
ClientEntityImpl
-
-
Method Details
-
getTypeName
- Specified by:
getTypeNamein interfaceClientEntity- Returns:
- the type name of this entity.
-
getETag
Description copied from interface:ClientEntityGets ETag.- Specified by:
getETagin interfaceClientEntity- Returns:
- ETag.
-
setETag
Description copied from interface:ClientEntitySets ETag.- Specified by:
setETagin interfaceClientEntity- Parameters:
eTag- ETag.
-
getOperation
Description copied from interface:ClientEntitySearches for operation with given title.- Specified by:
getOperationin interfaceClientEntity- Parameters:
title- operation to look for- Returns:
- operation if found with given title, null otherwise
-
getOperations
Gets operations.- Specified by:
getOperationsin interfaceClientEntity- Returns:
- operations.
-
getProperty
Description copied from interface:ClientEntitySearches for property with given name.- Specified by:
getPropertyin interfaceClientEntity- Parameters:
name- property to look for- Returns:
- property if found with given name, null otherwise
-
addLink
Description copied from interface:ClientLinkedPuts the given link into one of available lists, based on its type.- Specified by:
addLinkin interfaceClientLinked- Parameters:
link- to be added- Returns:
- true if the given link was added in one of available lists
-
removeLink
Description copied from interface:ClientLinkedRemoves the given link from any list (association, navigation, edit-media).- Specified by:
removeLinkin interfaceClientLinked- Parameters:
link- to be removed- Returns:
- true if the given link was contained in one of available lists
-
getAssociationLink
Description copied from interface:ClientLinkedGets association link with given name, if available, otherwise null.- Specified by:
getAssociationLinkin interfaceClientLinked- Parameters:
name- candidate link name- Returns:
- association link with given name, if available, otherwise null
-
getAssociationLinks
Description copied from interface:ClientLinkedReturns all entity association links.- Specified by:
getAssociationLinksin interfaceClientLinked- Returns:
- OData entity links.
-
getMediaEditLink
Description copied from interface:ClientEntityGets media-edit link with given name, if available, otherwise null.- Specified by:
getMediaEditLinkin interfaceClientEntity- Parameters:
name- candidate link name- Returns:
- media-edit link with given name, if available, otherwise null
-
getMediaEditLinks
Description copied from interface:ClientEntityReturns entity media edit links.- Specified by:
getMediaEditLinksin interfaceClientEntity- Returns:
- OData entity links.
-
getEditLink
Description copied from interface:ClientEntityReturns OData entity edit link.- Specified by:
getEditLinkin interfaceClientEntity- Returns:
- entity edit link.
-
setEditLink
Description copied from interface:ClientEntitySets OData entity edit link.- Specified by:
setEditLinkin interfaceClientEntity- Parameters:
editLink- edit link.
-
getLink
- Specified by:
getLinkin interfaceClientEntity- Overrides:
getLinkin classClientItem- Returns:
- ODataItem link (it's edit link for
ClientEntity).
-
isReadOnly
public boolean isReadOnly()Description copied from interface:ClientEntityTRUE if read-only entity.- Specified by:
isReadOnlyin interfaceClientEntity- Returns:
- TRUE if read-only; FALSE otherwise.
-
isMediaEntity
public boolean isMediaEntity()Description copied from interface:ClientEntityChecks if the current entity is a media entity.- Specified by:
isMediaEntityin interfaceClientEntity- Returns:
- 'TRUE' if media entity; 'FALSE' otherwise.
-
setMediaEntity
public void setMediaEntity(boolean isMediaEntity) Description copied from interface:ClientEntitySets media entity flag.- Specified by:
setMediaEntityin interfaceClientEntity- Parameters:
isMediaEntity- media entity flag value.
-
getMediaContentType
Description copied from interface:ClientEntityGets media content type.- Specified by:
getMediaContentTypein interfaceClientEntity- Returns:
- media content type.
-
setMediaContentType
Description copied from interface:ClientEntitySets media content type.- Specified by:
setMediaContentTypein interfaceClientEntity- Parameters:
mediaContentType- media content type.
-
getMediaContentSource
Description copied from interface:ClientEntityGets media content source.- Specified by:
getMediaContentSourcein interfaceClientEntity- Returns:
- media content source.
-
setMediaContentSource
Description copied from interface:ClientEntitySets media content source.- Specified by:
setMediaContentSourcein interfaceClientEntity- Parameters:
mediaContentSource- media content source.
-
getMediaETag
Description copied from interface:ClientEntityETag of the binary stream represented by this media entity or named stream property.- Specified by:
getMediaETagin interfaceClientEntity- Returns:
- media ETag value
-
setMediaETag
Description copied from interface:ClientEntitySet media ETag.- Specified by:
setMediaETagin interfaceClientEntity- Parameters:
eTag- media ETag value
-
getId
Description copied from interface:ClientEntityTo request entity references in place of the actual entities, the client issues a GET request with /$ref appended to the resource path.
If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.
If the resource path terminates on a collection, the response MUST be the format-specific representation of a collection of entity references pointing to the related entities. If no entities are related, the response is the format-specific representation of an empty collection.
If the resource path terminates on a single entity, the response MUST be the format-specific representation of an entity reference pointing to the related single entity. If the resource path terminates on a single entity and no such entity exists, the service returns 404 Not Found.- Specified by:
getIdin interfaceClientEntity- Returns:
- entity reference.
-
setId
Description copied from interface:ClientEntitySet id for this OData entity.- Specified by:
setIdin interfaceClientEntity- Parameters:
id- the if for this entity
-
getProperties
Description copied from interface:ClientEntityReturns OData entity properties.- Specified by:
getPropertiesin interfaceClientEntity- Returns:
- OData entity properties.
-
getAnnotations
- Specified by:
getAnnotationsin interfaceClientAnnotatable
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractClientPayload
-
equals
- Overrides:
equalsin classAbstractClientPayload
-
toString
- Overrides:
toStringin classAbstractClientPayload
-