public class ODataEntityDefaultImpl extends java.lang.Object implements ODataEntity
ODataEntity
.ODataPayload.Type
Constructor and Description |
---|
ODataEntityDefaultImpl(java.lang.String type)
Constructor.
|
ODataEntityDefaultImpl(java.lang.String type,
java.util.Map<AnnotationName,java.lang.String> localAnnotations) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAnnotation(AnnotationName name)
Returns the annotation value specified by the given fully qualified local annotation name.
|
java.lang.String |
getAnnotation(java.lang.String namespace,
java.lang.String name)
Returns the annotation value specified by the given local annotation namespace and localname.
|
java.util.Set<AnnotationName> |
getAnnotationNames()
Returns a set of fully qualified local annotation names.
|
java.net.URL |
getEditMediaLink()
Returns the edit media link of this entity.
|
java.lang.String |
getEditResourcePath()
Returns the path to the endpoint through which this entity can be edited.
|
java.lang.String |
getEntityType()
Returns the type of the entity in it's fully-qualified form which includes the namespace prefix.
|
java.lang.String |
getEtag()
Returns the ETag of the entry backing this entity.
|
java.lang.String |
getMediaContentType()
Returns the content type of the media.
|
java.lang.String |
getMediaEtag()
Returns the ETag of the media resource.
|
java.net.URL |
getMediaLink()
Returns the media link of this entity.
|
ODataNavigationProperty |
getNavigationProperty(java.lang.String key)
Returns the navigation property associated with the given key.
|
java.util.Set<java.lang.String> |
getNavigationPropertyNames()
Returns the set containing the names of navigation properties.
|
ODataPropMap |
getProperties()
Returns the current map containing the data properties of this entity.
|
java.lang.String |
getResourcePath()
Returns the path from which this entity has been obtained.
|
int |
hashCode() |
boolean |
isMediaEntry()
Convenience method telling whether this entity is a media entry.
|
void |
setEditResourcePath(java.lang.String editResourcePath) |
void |
setEtag(java.lang.String etag)
Sets the ETag of the entry backing this entity.
|
void |
setMediaEtag(java.lang.String mediaEtag)
Sets the media ETag
|
void |
setMediaLink(java.lang.String mediaContentType,
java.net.URL mediaLink,
java.net.URL editMediaLink)
Sets the media links and the media content type of this entity.
|
ODataNavigationProperty |
setNavigationProperty(java.lang.String key,
ODataNavigationProperty link)
Associates the specified key with the specified navigation property.
|
void |
setResourcePath(java.lang.String resourcePath) |
void |
setResourcePath(java.lang.String resourcePath,
java.lang.String editResourcePath)
Sets resource paths.
|
public ODataEntityDefaultImpl(java.lang.String type)
type
- type of the entitypublic ODataEntityDefaultImpl(java.lang.String type, java.util.Map<AnnotationName,java.lang.String> localAnnotations)
public java.lang.String getResourcePath()
ODataEntity
getResourcePath
in interface ODataEntity
public void setResourcePath(java.lang.String resourcePath)
public java.lang.String getEditResourcePath()
ODataEntity
getEditResourcePath
in interface ODataEntity
public void setEditResourcePath(java.lang.String editResourcePath)
public boolean isMediaEntry()
ODataEntity
isMediaEntry
in interface ODataEntity
public java.lang.String getMediaContentType()
ODataEntity
getMediaContentType
in interface ODataEntity
public java.net.URL getMediaLink()
ODataEntity
getMediaLink
in interface ODataEntity
public java.net.URL getEditMediaLink()
ODataEntity
getEditMediaLink
in interface ODataEntity
public void setMediaLink(java.lang.String mediaContentType, java.net.URL mediaLink, java.net.URL editMediaLink)
ODataEntity
setMediaLink
in interface ODataEntity
mediaContentType
- the media content type, can be nullmediaLink
- the media link, can be nulleditMediaLink
- the edit media link, can be nullpublic java.util.Set<java.lang.String> getNavigationPropertyNames()
ODataEntity
getNavigationPropertyNames
in interface ODataEntity
public ODataNavigationProperty getNavigationProperty(java.lang.String key)
ODataEntity
getNavigationProperty
in interface ODataEntity
key
- the key of the property, can be nullpublic ODataNavigationProperty setNavigationProperty(java.lang.String key, ODataNavigationProperty link)
ODataEntity
setNavigationProperty
in interface ODataEntity
key
- the key, must be non-nulllink
- the property, must be non-nullpublic ODataPropMap getProperties()
ODataEntity
getProperties
in interface ODataEntity
public java.lang.String getEntityType()
ODataEntity
getEntityType
in interface ODataEntity
public void setResourcePath(java.lang.String resourcePath, java.lang.String editResourcePath)
ODataEntity
setResourcePath
in interface ODataEntity
resourcePath
- the resource path, can be nulleditResourcePath
- the edit resource path, can be nullpublic java.lang.String getEtag()
ODataEntity
getEtag
in interface ODataEntity
public void setEtag(java.lang.String etag)
ODataEntity
setEtag
in interface ODataEntity
etag
- the entity tag, can be nullpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.Set<AnnotationName> getAnnotationNames()
ODataEntity
getAnnotationNames
in interface ODataEntity
public java.lang.String getAnnotation(AnnotationName name)
ODataEntity
getAnnotation
in interface ODataEntity
name
- fully qualified local annotation namepublic java.lang.String getAnnotation(java.lang.String namespace, java.lang.String name)
ODataEntity
getAnnotation
in interface ODataEntity
namespace
- annotation namespace, can be nullname
- annotation local name. It MUST be non-null, otherwise NullPointerException is thrownpublic java.lang.String getMediaEtag()
ODataEntity
getMediaEtag
in interface ODataEntity
public void setMediaEtag(java.lang.String mediaEtag)
ODataEntity
setMediaEtag
in interface ODataEntity
mediaEtag
- the media etag, can be null