T
- type of the transfer object (DTO)I
- type of the idpublic abstract class AbstractModel<T,I extends Serializable> extends Object implements Transportable<T,I>
BaseModel
.Constructor and Description |
---|
AbstractModel()
Creates a transfer object with no identity.
|
AbstractModel(Id<? extends T,I> id)
Creates a transfer object.
|
public <E extends T> Id<E,I> getId()
Transportable
A type for the identified must be specified to retrieve the id because
identified objects might be inheritable. For example, assume
Employee
extends from Person
and Person
implements Transportable<Person, Long>
. The following code
would be possible.
Id<Person, Long> id = employee.getId(); Id<Employee, Long> id = employee.getId();
getId
in interface Transportable<T,I extends Serializable>
Copyright © 2015. All Rights Reserved.