public abstract class AbstractDatabaseEntry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
m_creationTime |
private long |
m_expireTime
Stores the time when this entry will be deleted from the database.
|
static java.lang.String |
XML_ATTR_LAST_UPDATE |
static java.lang.String |
XML_LAST_UPDATE |
Constructor and Description |
---|
AbstractDatabaseEntry(long a_expireTime)
Creates a new AbstractDatabaseEntry with the specified expire time.
|
Modifier and Type | Method and Description |
---|---|
void |
deletePersistence() |
long |
getCreationTime()
Returns the time in milliseconds when this db entry was create, that means read from the network or
created from internal values.
|
long |
getExpireTime()
Returns the time (see System.currentTimeMillis()) when this DatabaseEntry will be removed
from the Database, if it is not updated meanwhile.
|
abstract java.lang.String |
getId()
Returns a unique ID for a database entry.
|
abstract long |
getLastUpdate()
Returns the time in milliseconds when this db entry was created from the origin instance.
|
abstract long |
getVersionNumber()
Returns version number which is used to determine the more recent infoservice entry, if two
entries are compared (higher version number -> more recent entry).
|
boolean |
isNewerThan(AbstractDatabaseEntry a_oldEntry)
Returns if this entry is newer than the given entry.
|
boolean |
isPersistanceDeletionAllowed() |
boolean |
isUserDefined()
Returns whether this entry was generated by a user within the JAP client (true) or
was generated by an InfoService itself (false).
|
void |
resetCreationTime() |
void |
setExpireTime(long a_expireTime)
Set a new expire time for this DB item
|
public static final java.lang.String XML_LAST_UPDATE
public static final java.lang.String XML_ATTR_LAST_UPDATE
private long m_expireTime
private long m_creationTime
public AbstractDatabaseEntry(long a_expireTime)
a_expireTime
- The time when this entry will be deleted from the database.public final boolean isNewerThan(AbstractDatabaseEntry a_oldEntry)
a_oldEntry
- AbstractDatabaseEntrypublic boolean isUserDefined()
public boolean isPersistanceDeletionAllowed()
public void deletePersistence()
public abstract java.lang.String getId()
public final long getExpireTime()
public final void setExpireTime(long a_expireTime)
a_expireTime
- public abstract long getLastUpdate()
public final long getCreationTime()
public final void resetCreationTime()
public abstract long getVersionNumber()
Copyright © 2023. All rights reserved.