Package com.db4o.ext
Class Db4oDatabase
- java.lang.Object
-
- com.db4o.ext.Db4oDatabase
-
-
Field Summary
Fields Modifier and Type Field Description byte[]i_signatureField is public for implementation reasons, DO NOT TOUCH!longi_uuidField is public for implementation reasons, DO NOT TOUCH! This field is badly named, it really is the creation time.static intSTATIC_IDstatic Db4oDatabaseSTATIC_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 intbind(Transaction trans)make sure this Db4oDatabase is stored.booleanequals(java.lang.Object obj)comparison by signature.static Db4oDatabasegenerate()generates a new Db4oDatabase object with a unique signature.longgetCreationTime()intgetID(Transaction trans)gets the db4o ID, and may cache it for performance reasons.byte[]getSignature()returns the unique signatureinthashCode()booleanisOlderThan(Db4oDatabase peer)Db4oDatabasequery(Transaction trans)find a Db4oDatabase with the same signature as this onejava.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
toStringin 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
-
-