com.antelmann.db
Class EntryHeader<T extends DBEntry>
java.lang.Object
com.antelmann.db.AbstractDBEntry
com.antelmann.db.PropertyEntryImpl
com.antelmann.db.EntryHeader<T>
- All Implemented Interfaces:
- DBEntry, DBReference, PropertyEntry, DetailedString, Serializable
- Direct Known Subclasses:
- DBDocument.Header, GPerson.Header, ImageURLEntry.Thumbnail
public class EntryHeader<T extends DBEntry>
- extends PropertyEntryImpl
- implements DBReference
serves as a reference to a more complex DBEntry object
while allowing for more content than a mere Stub.
Commonly, EntryHeader subclasses are mapped with a read-only store to the database
(e.g. using a GenericPropertyEntryStore embedded in a ReadOnlyStore)
It is usually a good idea to override the toString() method.
- Since:
- 1. Mai 2008, 20:57
- Author:
- Holger Antelmann
- See Also:
GenericPropertyEntryStore,
PropertyEntryHeaderStore,
TaggableHeaderStore,
ReadOnlyStore,
Stub,
PropertyEntryTableModel,
Serialized Form
| Methods inherited from class com.antelmann.db.PropertyEntryImpl |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, asProperties, canRedo, canUndo, checkPropertyChange, clearProperties, containsPropertyText, containsValuePattern, equalWithProperties, equalWithProperties, getBoolean, getNumber, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyComparator, getPropertyExtractor, getPropertyExtractor, getPropertyKeys, getStringExtractor, getVetoableChangeListeners, isCaseInsensitive, isChangeListenerSupportEnabled, isKeyIn, isUndoSupport, isVetoableChangeSupportEnabled, putAll, redo, removeProperty, removePropertyChangeListener, removeVetoableChangeListener, setAllFrom, setCaseInsensitive, setChangeListenerSupport, setProperty, setUndoSupported, setVetoableChangeSupport, toDetailedString, undo, verifyProperties |
| Methods inherited from interface com.antelmann.db.DBEntry |
getID |
EntryHeader
public EntryHeader(Class<T> entryType,
Object id)
EntryHeader
public EntryHeader(Class<T> entryType,
Object id,
Map<String,?> properties)
getDisplayProperty
public String getDisplayProperty()
setDisplayProperty
public void setDisplayProperty(String displayProperty)
- allows to provide a displayProperty that is used when calling
toString()
toString
public String toString()
- Overrides:
toString in class AbstractDBEntry
getReferenceEntry
public T getReferenceEntry(Database<?> db)
throws DatabaseException
- retrieves and returns the original object for this EntryHeader
- Throws:
DatabaseException
equals
public boolean equals(Object obj)
- Overrides:
equals in class AbstractDBEntry
asStub
public Stub<T> asStub()
getReferenceClass
public Class<T> getReferenceClass()
- Description copied from interface:
DBReference
- indicates the type of DBEntry that represents the class of the reference ID,
so that the instance could be looked up in a Database;
this may be null only if the reference itself is null, too.
- Specified by:
getReferenceClass in interface DBReference
- See Also:
Database,
DBEntry#getClass(),
DefaultDBReference.isConsistent(DBReference)
getReferenceID
public Object getReferenceID()
- Description copied from interface:
DBReference
- returns the ID of the DBEntry this instance refers to;
this may be null only if the reference type returns null, too.
- Specified by:
getReferenceID in interface DBReference
- See Also:
DBEntry.getID(),
DefaultDBReference.isConsistent(DBReference)
getReferenceString
public String getReferenceString()
- Description copied from interface:
DBReference
- provides a meaningful (displayable) description for the referenceID/referenceType
or null if there is no reference for this entry.
Normally, this method would provide some cached info about the reference
w/o having to dereference the link through the database.
Note that this method may return null even if the reference itself is not null.
- Specified by:
getReferenceString in interface DBReference
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads