Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOEditingContext.unlock()


            editingContext.lock();
            try {
              ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(editingContext, new NSArray(gid), true);
            }
            finally {
              editingContext.unlock();
            }
          }
          finally {
            ERXObjectStoreCoordinatorSynchronizer.setProcessingRemoteNotifications(false);
          }
View Full Code Here


      editingContext.lock();
      try {
        SPPerson person = (SPPerson) ERXEOControlUtilities.convertGIDtoEO(editingContext, _personGID);
        _errorNoticeList.addNotice("Failed to send an email to '" + person.emailAddress() + "'.");
      } finally {
        editingContext.unlock();
        editingContext.dispose();
      }
    }

    public void deliverySucceeded(ERMessage message) {
View Full Code Here

      try {
        SPPerson person = (SPPerson) ERXEOControlUtilities.convertGIDtoEO(editingContext, _personGID);
        person.setEmailDeliveryFailure(Boolean.FALSE);
        editingContext.saveChanges();
      } finally {
        editingContext.unlock();
        editingContext.dispose();
      }
    }

    public void deliveryFailed(ERMessage message, Throwable failure) {
View Full Code Here

        SPPerson person = (SPPerson) ERXEOControlUtilities.convertGIDtoEO(editingContext, _personGID);
        _errorNoticeList.addNotice("Failed to send an email to '" + person.emailAddress() + "'.");
        person.setEmailDeliveryFailure(Boolean.TRUE);
        editingContext.saveChanges();
      } finally {
        editingContext.unlock();
        editingContext.dispose();
      }
      log.error("Failed to send email.", failure);
    }
  }
View Full Code Here

                    snapshotsForEntity.addObject(snapshot);
                    _entryCount++;
                }
            }
        }
        ec.unlock();
        return result.immutableClone();
    }

    public NSDictionary globalIDsGroupedByEntity(NSArray objects) {
        if (objects == nullreturn NSDictionary.EmptyDictionary;
View Full Code Here

      EOEnterpriseObject eo = entity.createInstanceWithEditingContext(editingContext, null);
      editingContext.insertObject(eo);
      return eo;
    }
    finally {
      editingContext.unlock();
    }
  }
 
  public Object primaryKeyForObject(Object obj, ERXRestContext context) {
    Object pkValue;
View Full Code Here

              EOEnterpriseObject eo = ERXEOControlUtilities.createAndAddObjectToRelationship(ec, object, key(), (String)valueForBinding("destinationEntityName"), null);
              EditPageInterface epi = (EditPageInterface)nextPage;
              epi.setObject(eo);
              epi.setNextPage(context().page());
            } finally {
              ec.unlock();
            }
          }
        } else {
          ERXEOControlUtilities.createAndAddObjectToRelationship(object().editingContext(), object(), key(), (String)valueForBinding("destinationEntityName"), null);
        }
View Full Code Here

                EOEnterpriseObject localObject = EOUtilities.localInstanceOfObject(context, object());
                epi.setObject(localObject);
                context.hasChanges(); // Ensuring it survives.
                returnedValue = (WOComponent) epi;
            } finally {
                context.unlock();
            }
        }
        return returnedValue;
    }
View Full Code Here

        NSLog.out.appendln("attribute "+attribute.name() + " does not exist in entity " + name() + " anymore, deleted from Valididy model");
        removeAttribute(attribute);
                } catch (Exception e1) {
                   
                } finally {
                    ec.unlock();
                    ec.dispose();
                   
                }
      }
  }
View Full Code Here

                        ec.setSharedEditingContext(null);
                        EOEnterpriseObject object = EOUtilities.localInstanceOfObject(ec, object());
                        ec.deleteObject(object);
                        ec.saveChanges();
                    } finally {
                        ec.unlock();
                        ec.dispose();
                    }
                } else {
                    editingContext.deleteObject(object());
                    if (ERXEOControlUtilities.isNewObject(object())) {
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.