Examples of editingContext()


Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

            }
        } catch (NSValidation.ValidationException ex1) {
            _errors = ex1.getMessage();
        } finally {       
            if (eo != null && eo.editingContext() != null) {
                eo.editingContext().unlock();
            }
        }
    }
   
    @Override
View Full Code Here

Examples of er.bugtracker.Framework.editingContext()

    @Override
    protected NSArray defaultBranchChoices(D2WContext context) {
        NSArray result = super.defaultBranchChoices(context);
        log.debug("in: " + result);
        Framework framework = (Framework)object(context);
        boolean ownerIsSelf = ERXEOControlUtilities.eoEquals(framework.owner(), People.clazz.currentUser(framework.editingContext()));
        if(framework == null || (framework.owner() != null && !ownerIsSelf)) {
            result = choiceByRemovingKeys(new NSArray("grabHat"), result);
            result = choiceByRemovingKeys(new NSArray("returnHat"), result);
        } else if(ownerIsSelf) {
            result = choiceByRemovingKeys(new NSArray("grabHat"), result);
View Full Code Here

Examples of er.bugtracker.People.editingContext()

    @Override
    protected NSArray defaultBranchChoices(D2WContext context) {
        NSArray result = super.defaultBranchChoices(context);
        People people = (People) object(context);
        if(ERXEOControlUtilities.eoEquals(people, People.clazz.currentUser(people.editingContext())) || people.editingContext().globalIDForObject(people).isTemporary()) {
            result = choiceByRemovingKeys(new NSArray("delete"), result);
            result = choiceByRemovingKeys(new NSArray("view"), result);
        }
        return result;
    }
View Full Code Here

Examples of er.bugtracker.People.editingContext()

    @Override
    protected NSArray defaultBranchChoices(D2WContext context) {
        NSArray result = super.defaultBranchChoices(context);
        People people = (People) object(context);
        if(ERXEOControlUtilities.eoEquals(people, People.clazz.currentUser(people.editingContext())) || people.editingContext().globalIDForObject(people).isTemporary()) {
            result = choiceByRemovingKeys(new NSArray("delete"), result);
            result = choiceByRemovingKeys(new NSArray("view"), result);
        }
        return result;
    }
View Full Code Here

Examples of er.corebusinesslogic.ERCMailMessage.editingContext()

                try {
                    ERMailDelivery delivery = createMailDeliveryForMailMessage(mailMessage);

                    if (delivery != null) {
                        mailMessage.setState(ERCMailState.PROCESSING_STATE);
                        mailMessage.editingContext().saveChanges(); // This will throw if optimistic locking occurs
                        delivery.sendMail(true);

                        mailMessage.setState(ERCMailState.SENT_STATE);
                        mailMessage.setDateSent(new NSTimestamp());                           
                       
View Full Code Here

Examples of er.corebusinesslogic.ERCMailMessage.editingContext()

                            if (mailMessage.shouldArchiveSentMailAsBoolean()) {
                                mailMessage.archive();
                            }
                            // FIXME: Nasty stack overflow bug
                            if (!mailMessage.hasAttachments()) {
                              mailMessage.editingContext().deleteObject(mailMessage);
                            }
                        }
                    } else {
                        log.warn("Unable to create mail delivery for mail message: " + mailMessage);
                    }
View Full Code Here

Examples of er.corebusinesslogic.ERCMailMessage.editingContext()

                        log.warn("Unable to create mail delivery for mail message: " + mailMessage);
                    }
                } catch (EOGeneralAdaptorException ge) {
                    if ( _warnOnGeneralAdaptorExceptionLockingMessage )
                        log.warn("Caught general adaptor exception, reverting context. Might be running multiple mailers", ge);
                    mailMessage.editingContext().revert();
                } catch (Throwable e) {
                    if (e instanceof NSForwardException)
                        e = ((NSForwardException)e).originalException();
                    log.warn("Caught exception when sending mail: " + ERXUtilities.stackTrace(e));
                    log.warn("Message trying to send: " + mailMessage + " pk: " + mailMessage.primaryKey());
View Full Code Here

Examples of er.corebusinesslogic.ERCMailMessage.editingContext()

                    // Report the mailing error
                    ERCoreBusinessLogic.sharedInstance().reportException(e, new NSDictionary(mailMessage.snapshot(),
                                                                                    "Mail Message Snapshot"));
                } finally {
                    // The editingcontext will not have any changes if an optimistic error occurred
                    if (mailMessage.editingContext().hasChanges()) {
                        try {
                            mailMessage.editingContext().saveChanges();
                        } catch (RuntimeException runtime) {
                            log.error("RuntimeException during save changes!", runtime);
                            throw runtime;
View Full Code Here

Examples of er.corebusinesslogic.ERCMailMessage.editingContext()

                                                                                    "Mail Message Snapshot"));
                } finally {
                    // The editingcontext will not have any changes if an optimistic error occurred
                    if (mailMessage.editingContext().hasChanges()) {
                        try {
                            mailMessage.editingContext().saveChanges();
                        } catch (RuntimeException runtime) {
                            log.error("RuntimeException during save changes!", runtime);
                            throw runtime;
                        }
                    }
View Full Code Here

Examples of er.extensions.eof.ERXGenericRecord.editingContext()

        private final NSMutableSet<String> _warned = new NSMutableSet();

        protected NSArray indexableObjectsForObject(String type, EOEnterpriseObject object) {
            ERXGenericRecord eo = (ERXGenericRecord) object;
            EOEditingContext ec = eo.editingContext();
            NSMutableSet<EOEnterpriseObject> result = new NSMutableSet();
            String entityName = eo.entityName();
            ConfigurationEntry config = _configuration.entryForKey(entityName);
            if (config != null) {
                if (!config.active) {
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.