|
db4o 2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
configuration interface for classes.
Examples: ../com/db4o/samples/translators/Default.java.
Use the global Configuration object to configure db4o before opening an
ObjectContainer
.
Example:
Configuration config = Db4o.configure();
ObjectClass oc = config.objectClass("package.className");
oc.updateDepth(3);
oc.minimumActivationDepth(3);
Method Summary | |
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 |
maximumActivationDepth(int depth)
sets the maximum activation depth to the desired value. |
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 |
objectOnActivate(java.lang.String methodName,
java.lang.String[] parameterFieldNames,
java.lang.String resultToField)
specifies a method of this class to be called upon activation. |
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. |
Method Detail |
public void cascadeOnActivate(boolean flag)
flag
- whether activation is to be cascaded to member objects.ObjectField#cascadeOnActivate()
,
ObjectContainer#activate()
,
public void cascadeOnDelete(boolean flag)
ObjectContainer#delete()
.
ObjectContainer#set()
.
ObjectContainer con;
Bar bar1 = new Bar();
Bar bar2 = new Bar();
foo.bar = bar1;
con.set(foo); // bar1 is stored as a member of foo
foo.bar = bar2;
con.set(foo); // bar2 is stored as a member of foo
flag
- whether deletes are to be cascaded to member objects.ObjectField#cascadeOnDelete()
,
ObjectContainer#delete()
,
public void cascadeOnUpdate(boolean flag)
ObjectContainer#set()
.
flag
- whether updates are to be cascaded to member objects.ObjectField#cascadeOnUpdate()
,
ObjectContainer#set()
,
public void maximumActivationDepth(int depth)
depth
- the desired maximum activation depthObjectClass#cascadeOnActivate()
public void minimumActivationDepth(int depth)
depth
- the desired minimum activation depthObjectClass#cascadeOnActivate()
public ObjectField objectField(java.lang.String fieldName)
ObjectField
object
to configure the specified field.
fieldName
- the fieldname of the field to be configured.ObjectField
object for configuration.public void objectOnActivate(java.lang.String methodName, java.lang.String[] parameterFieldNames, java.lang.String resultToField)
methodName
- the name of the method.parameterFieldNames
- a String array of the fieldNames of this class
to read parameters for the execution of the method from.resultToField
- the fieldname of the field that is to be set to
the result of the method execution.ObjectClass#cascadeOnActivate()
public void rename(java.lang.String newName)
newName
- the new fully qualified classname.public void storeTransientFields(boolean flag)
false
.flag
- whether or not transient fields are to be stored.public void translate(ObjectTranslator translator)
translator
- this may be an
ObjectTranslator
or an ObjectConstructor
public void updateDepth(int depth)
depth
- the depth of the desired update for this class.Configuration#updateDepth()
,
ObjectClass#cascadeOnUpdate()
,
ObjectField#cascadeOnUpdate()
,
|
db4o 2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |