Holger's Java API

## com.antelmann.db
Class AbstractDBEntry

    java.lang.Object
      com.antelmann.db.AbstractDBEntry

All Implemented Interfaces:
  DBEntry, Serializable

Direct Known Subclasses:
  CalendarEntry, CardHeader, Category.Entry, Country, DefaultEntryRelationship, GeoLocation, GPersonalBlogEntry, Keyword, LockEntry, MessageEntry, PropertyEntryImpl, ProtocolNoteEntry, Stub, YouTubeVideo

    public abstract class AbstractDBEntry

extends Object
implements DBEntry

implements common functionality, including immutable ID and hashCode/equals methods based on the ID (and class).

Since:
  12. Juli 2007, 14:52
Author:
  Holger Antelmann
See Also:
  Serialized Form

Field Summary

Fields inherited from interface com.antelmann.db.DBEntry
`ENTRY_FLAVOR, ENTRY_LIST_FLAVOR`

Constructor Summary
`AbstractDBEntry(Object id)`

Method Summary
`boolean` `equals(Object obj)`
`Object` `getID()` returns a immutable, unique and persistent capable identifier for this resource.
`int` `hashCode()`
`static int` `hashEntry(DBEntry entry)`
`static boolean` `sameEntry(Object obj1, Object obj2)` requires `DBEntry` instances to not throw a ClassCastException
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AbstractDBEntry

    public AbstractDBEntry(Object id)

Method Detail

### getID

    public final Object getID()

  Description copied from interface: `DBEntry`
  returns a immutable, unique and persistent capable identifier for this resource. The returned value is unique throughout all instances of this class within a given system or database, respectively. The return value is practically always a `Serializable` for entries that are persistent.

  Specified by:
    `getID` in interface `DBEntry`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### sameEntry

    public static boolean sameEntry(Object obj1,
                                    Object obj2)

  requires `DBEntry` instances to not throw a ClassCastException

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### hashEntry

    public static int hashEntry(DBEntry entry)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads