Class GenericPageableResponseBase.BuilderBase<T>
- java.lang.Object
-
- com.anaptecs.jeaf.junit.rest.generics.AbstractResponse.Builder<T>
-
- com.anaptecs.jeaf.junit.rest.generics.GenericPageableResponseBase.BuilderBase<T>
-
- Direct Known Subclasses:
GenericPageableResponse.Builder
- Enclosing class:
- GenericPageableResponseBase<T>
public abstract static class GenericPageableResponseBase.BuilderBase<T> extends AbstractResponse.Builder<T>
Class implements builder to create a new instance of class GenericPageableResponse. As the class has read only attributes or associations instances can not be created directly. Instead this builder class has to be used.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilderBase()Use {@link GenericPageableResponse.builder()} instead of protected constructor to create new builder.protectedBuilderBase(GenericPageableResponseBase<T> pObject)Use {@link GenericPageableResponse.builder(GenericPageableResponse)} instead of protected constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericPageableResponse<T>build()Method creates a new instance of class GenericPageableResponse.GenericPageableResponse<T>buildValidated()Method creates a new validated instance of class GenericPageableResponse.GenericPageableResponseBase.BuilderBase<T>setErrors(java.util.List<Message> pErrors)Method sets associationAbstractResponse.errors.GenericPageableResponseBase.BuilderBase<T>setValues(java.util.List<T> pValues)Method sets associationvalues.GenericPageableResponseBase.BuilderBase<T>setWarnings(java.util.List<Message> pWarnings)Method sets associationAbstractResponse.warnings.
-
-
-
Constructor Detail
-
BuilderBase
protected BuilderBase()
Use {@link GenericPageableResponse.builder()} instead of protected constructor to create new builder.
-
BuilderBase
protected BuilderBase(GenericPageableResponseBase<T> pObject)
Use {@link GenericPageableResponse.builder(GenericPageableResponse)} instead of protected constructor to create new builder.
-
-
Method Detail
-
setErrors
public GenericPageableResponseBase.BuilderBase<T> setErrors(java.util.List<Message> pErrors)
Method sets associationAbstractResponse.errors.- Overrides:
setErrorsin classAbstractResponse.Builder<T>- Parameters:
pErrors- Collection to whichAbstractResponse.errorsshould be set.- Returns:
GenericPageableResponseBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setWarnings
public GenericPageableResponseBase.BuilderBase<T> setWarnings(java.util.List<Message> pWarnings)
Method sets associationAbstractResponse.warnings.- Overrides:
setWarningsin classAbstractResponse.Builder<T>- Parameters:
pWarnings- Collection to whichAbstractResponse.warningsshould be set.- Returns:
GenericPageableResponseBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
setValues
public GenericPageableResponseBase.BuilderBase<T> setValues(java.util.List<T> pValues)
Method sets associationvalues.- Parameters:
pValues- Collection to whichvaluesshould be set.- Returns:
GenericPageableResponseBase.BuilderBaseInstance of this builder to support chaining setters. Method never returns null.
-
build
public GenericPageableResponse<T> build()
Method creates a new instance of class GenericPageableResponse. The object will be initialized with the values of the builder.- Returns:
- GenericPageableResponse Created object. The method never returns null.
-
buildValidated
public GenericPageableResponse<T> buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class GenericPageableResponse. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- GenericPageableResponse Created and validated object. The method never returns null.
- Throws:
javax.validation.ConstraintViolationException- in case that one or more validations for the created object failed.
-
-