|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EntryClassMapper
this interface maps between DBEntry classes and some Object that allows its external storage and retrieval and custom labeling for classes
Database| Nested Class Summary | |
|---|---|
static class |
EntryClassMapper.Adapter
a default implementation (based on some other basic mapping like STRING_MAPPER)
which supports label customization per instance |
| Field Summary | |
|---|---|
static EntryClassMapper |
DEFAULT_MAPPER
a default implementation that simply maps the class to itself; custom labels are not supported |
static EntryClassMapper |
STRING_MAPPER
a convenient implementation that maps to the String representing the class name; custom labels are not supported |
| Method Summary | |
|---|---|
Object |
entryClassToObject(Class<? extends DBEntry> entryClass)
converts the given Class into an object that can easily be stored/exported elsewhere. |
String |
getLabelFor(Class<?> entryClass)
allows to provide a user-friendly display name for a class independent of its mapping; the return value may not be mapped back to the given class. |
Class<? extends DBEntry> |
objectToEntryClass(Object entryClassRepresentation)
converts the given (maybe externally retrieved) Object into some DBEntry class to be used |
String |
setLabelFor(Class<?> entryClass,
String label)
allows to customize the label that is to be displayed for the given class |
| Field Detail |
|---|
static final EntryClassMapper DEFAULT_MAPPER
static final EntryClassMapper STRING_MAPPER
| Method Detail |
|---|
Object entryClassToObject(Class<? extends DBEntry> entryClass)
entryClass - may be null (in which case null is usually expected as a return value)
Class<? extends DBEntry> objectToEntryClass(Object entryClassRepresentation)
throws ClassNotFoundException
entryClassRepresentation - may be null (in which case null is usually expected as a return value)
ClassNotFoundExceptionString getLabelFor(Class<?> entryClass)
String setLabelFor(Class<?> entryClass,
String label)
throws UnsupportedOperationException
UnsupportedOperationException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||