|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.db.EntryClassMapper.Adapter
public static class EntryClassMapper.Adapter
a default implementation (based on some other basic mapping like EntryClassMapper.STRING_MAPPER)
which supports label customization per instance
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.antelmann.db.EntryClassMapper |
|---|
EntryClassMapper.Adapter |
| Field Summary |
|---|
| Fields inherited from interface com.antelmann.db.EntryClassMapper |
|---|
DEFAULT_MAPPER, STRING_MAPPER |
| Constructor Summary | |
|---|---|
EntryClassMapper.Adapter()
uses EntryClassMapper.STRING_MAPPER as the defaultMapper |
|
EntryClassMapper.Adapter(EntryClassMapper defaultMapper)
|
|
| Method Summary | |
|---|---|
Object |
entryClassToObject(Class<? extends DBEntry> resourceClass)
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. |
static FormattedCellRenderer |
getRenderer(EntryClassMapper ecm)
|
Class<? extends DBEntry> |
objectToEntryClass(Object referenceType)
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 |
static Converter<Class<? extends DBEntry>,Object> |
toConverter(EntryClassMapper ecm)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EntryClassMapper.Adapter()
EntryClassMapper.STRING_MAPPER as the defaultMapper
public EntryClassMapper.Adapter(EntryClassMapper defaultMapper)
| Method Detail |
|---|
public Object entryClassToObject(Class<? extends DBEntry> resourceClass)
EntryClassMapper
entryClassToObject in interface EntryClassMapperresourceClass - may be null (in which case null is usually expected as a return value)
public Class<? extends DBEntry> objectToEntryClass(Object referenceType)
throws ClassNotFoundException
EntryClassMapper
objectToEntryClass in interface EntryClassMapperreferenceType - may be null (in which case null is usually expected as a return value)
ClassNotFoundExceptionpublic String getLabelFor(Class<?> entryClass)
EntryClassMapper
getLabelFor in interface EntryClassMapper
public String setLabelFor(Class<?> entryClass,
String label)
EntryClassMapper
setLabelFor in interface EntryClassMapperpublic static FormattedCellRenderer getRenderer(EntryClassMapper ecm)
public static Converter<Class<? extends DBEntry>,Object> toConverter(EntryClassMapper ecm)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||