Class AbstractResponse<T>
- java.lang.Object
-
- com.anaptecs.jeaf.junit.rest.generics.AbstractResponse<T>
-
- All Implemented Interfaces:
com.anaptecs.jeaf.core.api.ServiceObject,java.io.Serializable
- Direct Known Subclasses:
GenericPageableResponseBase,GenericSingleValuedReponse
@Valid public abstract class AbstractResponse<T> extends java.lang.Object implements com.anaptecs.jeaf.core.api.ServiceObject- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractResponse.Builder<T>Class implements builder to create a new instance of classAbstractResponse.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResponse()Default constructor is only intended to be used for deserialization by tools like Jackson for JSON.protectedAbstractResponse(AbstractResponse.Builder<T> pBuilder)Initialize object using the passed builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToErrors(Message pErrors)Method adds the passed object toerrors.voidaddToErrors(java.util.Collection<Message> pErrors)Method adds all passed objects toerrors.voidaddToWarnings(Message pWarnings)Method adds the passed object towarnings.voidaddToWarnings(java.util.Collection<Message> pWarnings)Method adds all passed objects towarnings.voidclearErrors()Method removes all objects fromerrors.voidclearWarnings()Method removes all objects fromwarnings.java.util.List<Message>getErrors()Method returns associationerrors.java.util.List<Message>getWarnings()Method returns associationwarnings.voidremoveFromErrors(Message pErrors)Method removes the passed object fromerrors.voidremoveFromWarnings(Message pWarnings)Method removes the passed object fromwarnings.java.lang.StringtoString()Method creates a new String with the values of all attributes of this class.java.lang.StringBuildertoStringBuilder(java.lang.String pIndent)Method returns a StringBuilder that can be used to create a String representation of this object.
-
-
-
Constructor Detail
-
AbstractResponse
protected AbstractResponse()
Default constructor is only intended to be used for deserialization by tools like Jackson for JSON. For "normal" object creation builder should be used instead.
-
AbstractResponse
protected AbstractResponse(AbstractResponse.Builder<T> pBuilder)
Initialize object using the passed builder.- Parameters:
pBuilder- Builder that should be used to initialize this object. The parameter must not be null.
-
-
Method Detail
-
getErrors
public java.util.List<Message> getErrors()
Method returns associationerrors.- Returns:
ListValue to whicherrorsis set. The method never returns null and the returned collection is modifiable.
-
addToErrors
public void addToErrors(Message pErrors)
Method adds the passed object toerrors.- Parameters:
pErrors- Object that should be added toerrors. The parameter must not be null.
-
addToErrors
public void addToErrors(java.util.Collection<Message> pErrors)
Method adds all passed objects toerrors.- Parameters:
pErrors- Collection with all objects that should be added toerrors. The parameter must not be null.
-
removeFromErrors
public void removeFromErrors(Message pErrors)
Method removes the passed object fromerrors.- Parameters:
pErrors- Object that should be removed fromerrors. The parameter must not be null.
-
clearErrors
public void clearErrors()
Method removes all objects fromerrors.
-
getWarnings
public java.util.List<Message> getWarnings()
Method returns associationwarnings.- Returns:
ListValue to whichwarningsis set. The method never returns null and the returned collection is modifiable.
-
addToWarnings
public void addToWarnings(Message pWarnings)
Method adds the passed object towarnings.- Parameters:
pWarnings- Object that should be added towarnings. The parameter must not be null.
-
addToWarnings
public void addToWarnings(java.util.Collection<Message> pWarnings)
Method adds all passed objects towarnings.- Parameters:
pWarnings- Collection with all objects that should be added towarnings. The parameter must not be null.
-
removeFromWarnings
public void removeFromWarnings(Message pWarnings)
Method removes the passed object fromwarnings.- Parameters:
pWarnings- Object that should be removed fromwarnings. The parameter must not be null.
-
clearWarnings
public void clearWarnings()
Method removes all objects fromwarnings.
-
toStringBuilder
public java.lang.StringBuilder toStringBuilder(java.lang.String pIndent)
Method returns a StringBuilder that can be used to create a String representation of this object. The returned StringBuilder also takes care about attributes of super classes.- Returns:
StringBuilderStringBuilder representing this object. The method never returns null.
-
toString
public java.lang.String toString()
Method creates a new String with the values of all attributes of this class. All references to other objects will be ignored.- Overrides:
toStringin classjava.lang.Object- Returns:
StringString representation of this object. The method never returns null.
-
-