A - the aggregate rootD - the dto typepublic abstract class AbstractBaseAssembler<A,D> extends Object implements Assembler<A,D>
BaseAssembler,
BaseTupleAssembler| Modifier | Constructor and Description |
|---|---|
|
AbstractBaseAssembler()
Creates an assembler with automatic resolution of its DTO class.
|
protected |
AbstractBaseAssembler(Class<D> dtoClass)
Creates an assembler with the DTO class explicitly specified.
|
| Modifier and Type | Method and Description |
|---|---|
Class<D> |
getDtoClass()
Returns the DTO type handled by the assembler.
|
protected D |
newDto()
This protected method is in charge of creating a new instance of the DTO.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitassembleDtoFromAggregate, assembleDtoFromAggregate, mergeAggregateWithDtopublic AbstractBaseAssembler()
public Class<D> getDtoClass()
Assembler
This method is used by Assembler.assembleDtoFromAggregate(Object)
to determine the DTO type to instantiate.
getDtoClass in interface Assembler<A,D>protected D newDto()
The actual implementation is fine for simple POJO, but it can be
extended. The developers will then use getDtoClass() to retrieve
the destination class.
Copyright © 2013-2016–2016 SeedStack. All rights reserved.