public abstract class AbstractKey extends Object implements Key
Modifier and Type | Field and Description |
---|---|
protected String |
description |
Modifier | Constructor and Description |
---|---|
protected |
AbstractKey(Key.Type type) |
protected |
AbstractKey(Key.Type type,
String description) |
Modifier and Type | Method and Description |
---|---|
static Key |
create(Key.Type type) |
protected String |
decrypt(String data)
Decrypts the given encrypted data.
|
String |
description()
Return the user provided description for the key
|
protected String |
encrypt(String data) |
boolean |
equals(Object o) |
<E extends Key> |
getId()
Gets the id of this object.
|
int |
hashCode() |
protected void |
setDescription(String description) |
String |
toString() |
Key.Type |
type()
Return the type of key
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
exportData, importData
protected String description
protected AbstractKey(Key.Type type)
public <E extends Key> Id<E,String> 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<Key,String>
public String description()
Key
description
in interface Key
protected void setDescription(String description)
protected String decrypt(String data)
data
- the encrypted dataCopyright © 2015. All Rights Reserved.