T
- type of the transfer object (DTO).I
- type of the transportable's id. It should be an immutable type.public abstract class AbstractTransportObject<T,I extends Serializable> extends Object implements TransportObject<T,I>
Constructor and Description |
---|
AbstractTransportObject()
Creates a transfer object with no identity.
|
AbstractTransportObject(Id<? extends T,I> id)
Creates a transfer object.
|
public AbstractTransportObject()
public <E extends T> Id<E,I> getId()
TransportObject
Employee
extends from Person
and
Person
implements TransportObject<Person, Long>
.
The following code would be possible.
Id<Person, Long> id = employee.getId(); Id<Employee, Long> id = employee.getId();
getId
in interface TransportObject<T,I extends Serializable>
Copyright © 2015. All Rights Reserved.