Examples of removeRelation()


Examples of javax.management.relation.RelationService.removeRelation()

         rs = (RelationService) services.get(service);

         boolean caught = false;
         try
         {
            rs.removeRelation("RelationId");
         }
         catch (RelationServiceNotRegisteredException e)
         {
            caught = true;
         }
View Full Code Here

Examples of javax.management.relation.RelationService.removeRelation()

         rs = (RelationService) services.get(service);

         caught = false;
         try
         {
            rs.removeRelation(null);
         }
         catch (IllegalArgumentException e)
         {
            caught = true;
         }
View Full Code Here

Examples of javax.management.relation.RelationService.removeRelation()

            fail("removeRelation accepts a null relation");

         caught = false;
         try
         {
            rs.removeRelation("rubbish");
         }
         catch (RelationNotFoundException e)
         {
            caught = true;
         }
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

                    Identity fid = (Identity) alist.get(j);
                    Object fetched = null;
                    if (fid != null) {
                        fetched = tx.fetch(fieldClassMolder, fid, null);
                        if (fetched != null) {
                            fieldClassMolder.removeRelation(tx, fetched,
                                    fieldClassMolder, object);
                        }
                    }
                }
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

                Iterator itor = ClassMolderHelper.getIterator(_fieldMolder
                        .getValue(object, tx.getClassLoader()));
                while (itor.hasNext()) {
                    Object fobject = itor.next();
                    if (fobject != null && tx.isPersistent(fobject)) {
                        fieldClassMolder.removeRelation(tx, fobject,
                                fieldClassMolder, object);
                    }
                }
            }
        }
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

                Object reldel = tx.fetch(fieldClassMolder, removedId, null);
                if (reldel != null) {
                    if (_fieldMolder.isDependent()) {
                        tx.delete(reldel);
                    } else {
                        fieldClassMolder.removeRelation(tx, reldel,
                                this._classMolder, object);
                    }
//                } else {
//                    // should i notify user that the object does not exist?
//                    // user can't delete dependent object himself. So, must
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

                    Object toBeDeleted = lazy.find(itor.next());
                    if (toBeDeleted != null && tx.isPersistent(toBeDeleted)) {
                        if (_fieldMolder.isDependent()) {
                            tx.delete(toBeDeleted);
                        } else {
                            fieldClassMolder.removeRelation(tx, toBeDeleted,
                                    this._classMolder, object);
                        }
//                    } else {
//                        // what to do if it happens?
                    }
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

            } else if (tx.isAutoStore()) {
                if (curIdentity != null) {
                    Object deref = tx.fetch(fieldClassMolder, curIdentity, null);
                    if (deref != null) {
                        fieldClassMolder.removeRelation(tx, deref, _classMolder, object);
                    }
                }

                if ((value != null) && !tx.isRecorded(value)) {
                    tx.markCreate(fieldClassMolder, value, null);
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

                }
            } else {
                if (curIdentity != null) {
                    Object deref = tx.fetch(fieldClassMolder, curIdentity, null);
                    if (deref != null) {
                        fieldClassMolder.removeRelation(tx, deref, _classMolder, object);
                    }
                }

                // yip: user're pretty easily to run into cache
                // integrity problem here, if user forgot to create
View Full Code Here

Examples of org.exolab.castor.persist.ClassMolder.removeRelation()

            if (fetched != null) {
                if (_fieldMolder.isDependent()) {
                    tx.delete(fetched);
                } else {
                    // delete the object from the other side of the relation
                    fieldClassMolder.removeRelation(tx, fetched, _classMolder, object);
                }
            }
        }
       
        if (_fieldMolder.isDependent()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.