Package com.db4o.ext
Class Db4oDatabase
- java.lang.Object
-
- com.db4o.ext.Db4oDatabase
-
-
Field Summary
Fields Modifier and Type Field Description byte[]
i_signature
Field is public for implementation reasons, DO NOT TOUCH!long
i_uuid
Field is public for implementation reasons, DO NOT TOUCH! This field is badly named, it really is the creation time.static int
STATIC_ID
static Db4oDatabase
STATIC_IDENTITY
-
Constructor Summary
Constructors Constructor Description Db4oDatabase()
constructor for persistenceDb4oDatabase(byte[] signature, long creationTime)
constructor for comparison and to store new ones
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bind(Transaction trans)
make sure this Db4oDatabase is stored.boolean
equals(java.lang.Object obj)
comparison by signature.static Db4oDatabase
generate()
generates a new Db4oDatabase object with a unique signature.long
getCreationTime()
int
getID(Transaction trans)
gets the db4o ID, and may cache it for performance reasons.byte[]
getSignature()
returns the unique signatureint
hashCode()
boolean
isOlderThan(Db4oDatabase peer)
Db4oDatabase
query(Transaction trans)
find a Db4oDatabase with the same signature as this onejava.lang.String
toString()
-
-
-
Field Detail
-
STATIC_IDENTITY
public static final Db4oDatabase STATIC_IDENTITY
-
STATIC_ID
public static final int STATIC_ID
- See Also:
- Constant Field Values
-
i_signature
public byte[] i_signature
Field is public for implementation reasons, DO NOT TOUCH!
-
i_uuid
public long i_uuid
Field is public for implementation reasons, DO NOT TOUCH! This field is badly named, it really is the creation time.
-
-
Method Detail
-
generate
public static Db4oDatabase generate()
generates a new Db4oDatabase object with a unique signature.
-
equals
public boolean equals(java.lang.Object obj)
comparison by signature.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getID
public int getID(Transaction trans)
gets the db4o ID, and may cache it for performance reasons.- Returns:
- the db4o ID for the ObjectContainer
-
getCreationTime
public long getCreationTime()
-
getSignature
public byte[] getSignature()
returns the unique signature
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isOlderThan
public boolean isOlderThan(Db4oDatabase peer)
-
bind
public int bind(Transaction trans)
make sure this Db4oDatabase is stored. Return the ID.
-
query
public Db4oDatabase query(Transaction trans)
find a Db4oDatabase with the same signature as this one
-
-