Package org.castor.persist.proxy

Examples of org.castor.persist.proxy.RelationCollection.find()


                // if ( fieldMolder.isDependent() ) {
                Iterator itor = deleted.iterator();
                while (itor.hasNext()) {
                    flags.setUpdateCache(true);
                    Object toBeDeleted = lazy.find(itor.next());
                    if (toBeDeleted != null && tx.isPersistent(toBeDeleted)) {
                        if (_fieldMolder.isDependent()) {
                            tx.delete(toBeDeleted);
                        } else {
                            fieldClassMolder.removeRelation(tx, toBeDeleted,
View Full Code Here


                flags.setUpdateCache(true);

                if (_fieldMolder.isDependent()) {
                    Iterator itor = added.iterator();
                    while (itor.hasNext()) {
                        Object toBeAdded = lazy.find(itor.next());
                        if (toBeAdded != null) {
                            tx.markCreate(fieldClassMolder, toBeAdded, oid);
//                        } else {
//                            // what to do if it happens?
                        }
View Full Code Here

                        }
                    }
                } else if (tx.isAutoStore()) {
                    Iterator itor = added.iterator();
                    while (itor.hasNext()) {
                        Object toBeAdded = lazy.find(itor.next());
                        if (toBeAdded != null) {
                            if (!tx.isRecorded(toBeAdded)) {
                                tx.markCreate(fieldClassMolder, toBeAdded, null);
                            }
                        }
View Full Code Here

                Iterator itor = deleted.iterator();
                while (itor.hasNext()) {
                    flags.setUpdateCache(true);
                    Identity deletedId = (Identity) itor.next();
                    Object toBeDeleted = lazy.find(deletedId);
                    if (toBeDeleted != null) {
                        if (tx.isPersistent(toBeDeleted)) {
                            tx.writeLock(toBeDeleted, 0);

                            _fieldMolder.getRelationLoader().deleteRelation(
View Full Code Here

                flags.setUpdateCache(true);

                Iterator itor = added.iterator();
                while (itor.hasNext()) {
                    Identity addedId = (Identity) itor.next();
                    Object toBeAdded = lazy.find(addedId);
                    if (toBeAdded != null) {
                        if (tx.isPersistent(toBeAdded)) {
                            _fieldMolder.getRelationLoader().createRelation(
                                    tx.getConnection(oid.getMolder().getLockEngine()),
                                    oid.getIdentity(), addedId);
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.