Examples of localInstanceIn()


Examples of er.attachment.model.ERAttachment.localInstanceIn()

  public WOActionResults uploadSucceededAction() {

    EOEditingContext workingEC = masterObject().editingContext();
    ERAttachment existing = (ERAttachment)masterObject().valueForKey(relationshipKey());
    if (existing != null) {
      workingEC.deleteObject(existing.localInstanceIn(workingEC));
    }
    masterObject().addObjectToBothSidesOfRelationshipWithKey(newAttachment(), relationshipKey());
   
    _showUpload = false;
    return (WOActionResults)valueForBinding(Keys.uploadSucceededAction);
View Full Code Here

Examples of er.bugtracker.Framework.localInstanceIn()

    public WOComponent grabHat(WOComponent sender) {
        Framework framework = (Framework) object(sender);
        EOEditingContext peer = ERXEC.newEditingContext();
        peer.lock();
        try {
            framework = (Framework) framework.localInstanceIn(peer);
            framework.grabHat();
            peer.saveChanges();
        } finally {
            peer.unlock();
        }
View Full Code Here

Examples of er.bugtracker.Framework.localInstanceIn()

    public WOComponent returnHat(WOComponent sender) {
        Framework framework = (Framework) object(sender);
        EOEditingContext peer = ERXEC.newEditingContext();
        peer.lock();
        try {
            framework = (Framework) framework.localInstanceIn(peer);
            framework.releaseHat();
            peer.saveChanges();
        } finally {
            peer.unlock();
        }
View Full Code Here

Examples of er.taggable.model.ERTag.localInstanceIn()

        // rolls back.  It's mostly for your own good :)
        EOEditingContext newEditingContext = ERXEC.newEditingContext();
        try {
          ERTag newTag = createTagNamed(newEditingContext, tagName);
          newEditingContext.saveChanges();
          tag = newTag.localInstanceIn(editingContext);
        }
        catch (EOGeneralAdaptorException e) {
          // We'll assume this was because of a duplicate key exception and just retry the original
          // fetch WITHOUT createIfMissing.  If that returns a null, then we know it was some other
          // crazy exception and just throw it.
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.