The Web Graph Database

wiki:Docs/BlessingUnblessingMeshObject

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:

Last modified 5 years ago Last modified on 07/24/09 16:23:26