Blessing and Unblessing a MeshObject
Blessing a MeshObject
Assume the following MeshObject needs to be blessed with EntityType org.infogrid.model.Test.AA:
MeshObject obj = ...;
A Transaction is necessary to create, delete or update any MeshObject.
To bless the MeshObject:
MeshBase mb = obj.getMeshObject();
Transaction tx = null;
try {
tx = mb.createTransactionAsap();
obj.bless( TestSubjectArea.AA ); // blessing
} finally {
if( tx != null ) {
tx.commitTransaction();
}
}
Unblessing a MeshObject
Assume the following MeshObject is currently blessed with EntityType org.infogrid.model.Test.AA and needs to be unblessed:
MeshObject obj = ...;
A Transaction is necessary to create, delete or update any MeshObject.
To unbless the MeshObject:
MeshBase mb = obj.getMeshObject();
Transaction tx = null;
try {
tx = mb.createTransactionAsap();
obj.unbless( TestSubjectArea.AA ); // unblessing
} finally {
if( tx != null ) {
tx.commitTransaction();
}
}
See also:
![[Logo]](/trac/chrome/site/projectlogo.png)