Class MessageReference
java.lang.Object
org.apache.olingo.odata2.api.exception.MessageReference
APPLICATION DEVELOPERS: Please use
ODataApplicationException to throw custom exceptions. This class is used
inside the library only.
A MessageReference references to the used message for an ODataMessageException and its sub
classes. It supports
internationalization and translation of exception messages.
Theses classes contain a MessageReference object which
can be mapped to a related key and message text in the resource bundles.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddContent(Object... content) Adds given content to message reference.create()static MessageReferencecreate(Class<? extends ODataException> clazz, String key) booleanMessageReferences are equal if their message keys have the same value.List<?>Receives content for thisMessageReference.getKey()Returns message key.inthashCode()updateContent(List<?> oldContent, Object... newContent)
-
Field Details
-
key
-
-
-
Method Details
-
create
Creates aMessageReferencefor givenclassandkey. This combination ofclassandkeyhas to be provided by a resource bundle.- Parameters:
clazz-ODataMessageExceptionfor which thisMessageReferenceshould be usedkey- unique key (in context ofODataMessageException) for reference to message text in resource bundle- Returns:
- created
MessageReference
-
create
-
getKey
Returns message key. -
addContent
Adds given content to message reference. -
getContent
Receives content for thisMessageReference. Beware that returned list is immutable. -
hashCode
public int hashCode() -
equals
MessageReferences are equal if their message keys have the same value. -
updateContent
-