public interface ObjectClass
CommonConfiguration.objectClass(Object) to configure
object class settings.| Modifier and Type | Method and Description |
|---|---|
void |
callConstructor(boolean flag)
advises db4o to try instantiating objects of this class with/without
calling constructors.
|
void |
cascadeOnActivate(boolean flag)
sets cascaded activation behaviour.
|
void |
cascadeOnDelete(boolean flag)
sets cascaded delete behaviour.
|
void |
cascadeOnUpdate(boolean flag)
sets cascaded update behaviour.
|
void |
compare(ObjectAttribute attributeProvider)
Deprecated.
since version 7.0
|
void |
enableReplication(boolean setting)
Deprecated.
As of version 8.0 please use
generateUUIDs(boolean) and FileConfiguration.generateCommitTimestamps(boolean) instead |
void |
generateUUIDs(boolean setting)
generate UUIDs for stored objects of this class.
|
void |
generateVersionNumbers(boolean setting)
Deprecated.
As of version 8.0 please use
FileConfiguration.generateCommitTimestamps(boolean) instead |
void |
indexed(boolean flag)
turns the class index on or off.
|
void |
maximumActivationDepth(int depth)
sets the maximum activation depth to the desired value.
|
int |
minimumActivationDepth()
gets the configured minimum activation depth.
|
void |
minimumActivationDepth(int depth)
sets the minimum activation depth to the desired value.
|
ObjectField |
objectField(java.lang.String fieldName)
returns an
ObjectField object
to configure the specified field. |
void |
persistStaticFieldValues()
turns on storing static field values for this class.
|
void |
rename(java.lang.String newName)
renames a stored class.
|
void |
storeTransientFields(boolean flag)
allows to specify if transient fields are to be stored.
|
void |
translate(ObjectTranslator translator)
registers a translator for this class.
|
void |
updateDepth(int depth)
specifies the updateDepth for this class.
|
void callConstructor(boolean flag)
Configuration.callConstructors(boolean).flag - - specify true, to request calling constructors, specify
false to request not calling constructors.Configuration.callConstructors(boolean)void cascadeOnActivate(boolean flag)
flag - whether activation is to be cascaded to member objects.ObjectField.cascadeOnActivate(boolean),
ObjectContainer.activate(java.lang.Object, int),
Using callbacks,
Why activation?void cascadeOnDelete(boolean flag)
ObjectContainer.delete(Object).
ObjectContainer.store(Object).
ObjectContainer con;
Bar bar1 = new Bar();
Bar bar2 = new Bar();
foo.bar = bar1;
con.store(foo); // bar1 is stored as a member of foo
foo.bar = bar2;
con.store(foo); // bar2 is stored as a member of foo
flag - whether deletes are to be cascaded to member objects.ObjectField.cascadeOnDelete(boolean),
ObjectContainer.delete(Object),
Using callbacksvoid cascadeOnUpdate(boolean flag)
ObjectContainer.store(Object).flag - whether updates are to be cascaded to member objects.ObjectField.cascadeOnUpdate(boolean),
com.db4o.ObjectContainer#set,
Using callbacksvoid compare(ObjectAttribute attributeProvider)
attributeProvider - the attribute provider to be usedvoid enableReplication(boolean setting)
generateUUIDs(boolean) and FileConfiguration.generateCommitTimestamps(boolean) insteadsetting - void generateUUIDs(boolean setting)
setting - void generateVersionNumbers(boolean setting)
FileConfiguration.generateCommitTimestamps(boolean) insteadsetting - void indexed(boolean flag)
void maximumActivationDepth(int depth)
global setting
depth - the desired maximum activation depthWhy activation?,
cascadeOnActivate(boolean)void minimumActivationDepth(int depth)
global setting
depth - the desired minimum activation depthWhy activation?,
cascadeOnActivate(boolean)int minimumActivationDepth()
ObjectField objectField(java.lang.String fieldName)
fieldName - the name of the field to be configured.ObjectField
object for configuration.void persistStaticFieldValues()
objectContainer.query().constrain(Foo.class); // JavaobjectContainer.Query().Constrain(typeof(Foo)); // C#objectContainer.store(Foo.staticMember); // Java
void rename(java.lang.String newName)
newName - the new fully qualified class name.void storeTransientFields(boolean flag)
false.flag - whether or not transient fields are to be stored.void translate(ObjectTranslator translator)
ObjectTranslator is not
compatible with the use of an
internal class ObjectMarshaller.translator - this may be an ObjectTranslator
or an ObjectConstructorObjectTranslator,
ObjectConstructorvoid updateDepth(int depth)
ObjectContainer.store(Object)
for further details.ObjectContainer.store(Object) will be updated.depth - the depth of the desired update for this class.Configuration.updateDepth(int),
cascadeOnUpdate(boolean),
ObjectField.cascadeOnUpdate(boolean),
Using callbacks