Examples of validateForUpdate()


Examples of org.apache.cayenne.DataObject.validateForUpdate()

                switch (object.getPersistenceState()) {
                    case PersistenceState.NEW:
                        object.validateForInsert(result);
                        break;
                    case PersistenceState.MODIFIED:
                        object.validateForUpdate(result);
                        break;
                    case PersistenceState.DELETED:
                        object.validateForDelete(result);
                        break;
                }
View Full Code Here

Examples of org.apache.cayenne.DataObject.validateForUpdate()

        if (updated != null) {
            Iterator it = updated.iterator();
            while (it.hasNext()) {
                DataObject dataObject = (DataObject) it.next();
                dataObject.validateForUpdate(validationResult);
            }
        }

        if (validationResult.hasFailures()) {
            throw new ValidationException(validationResult);
View Full Code Here

Examples of org.apache.cayenne.DataObject.validateForUpdate()

                switch (object.getPersistenceState()) {
                    case PersistenceState.NEW:
                        object.validateForInsert(result);
                        break;
                    case PersistenceState.MODIFIED:
                        object.validateForUpdate(result);
                        break;
                    case PersistenceState.DELETED:
                        object.validateForDelete(result);
                        break;
                }
View Full Code Here

Examples of org.apache.cayenne.Validating.validateForUpdate()

                switch (((Persistent) object).getPersistenceState()) {
                    case PersistenceState.NEW:
                        object.validateForInsert(result);
                        break;
                    case PersistenceState.MODIFIED:
                        object.validateForUpdate(result);
                        break;
                    case PersistenceState.DELETED:
                        object.validateForDelete(result);
                        break;
                }
View Full Code Here

Examples of org.apache.cayenne.Validating.validateForUpdate()

                switch (((Persistent) object).getPersistenceState()) {
                    case PersistenceState.NEW:
                        object.validateForInsert(result);
                        break;
                    case PersistenceState.MODIFIED:
                        object.validateForUpdate(result);
                        break;
                    case PersistenceState.DELETED:
                        object.validateForDelete(result);
                        break;
                }
View Full Code Here

Examples of org.apache.cayenne.Validating.validateForUpdate()

                switch (((Persistent) object).getPersistenceState()) {
                    case PersistenceState.NEW:
                        object.validateForInsert(result);
                        break;
                    case PersistenceState.MODIFIED:
                        object.validateForUpdate(result);
                        break;
                    case PersistenceState.DELETED:
                        object.validateForDelete(result);
                        break;
                }
View Full Code Here

Examples of org.apache.cayenne.Validating.validateForUpdate()

                switch (((Persistent) object).getPersistenceState()) {
                    case PersistenceState.NEW:
                        object.validateForInsert(result);
                        break;
                    case PersistenceState.MODIFIED:
                        object.validateForUpdate(result);
                        break;
                    case PersistenceState.DELETED:
                        object.validateForDelete(result);
                        break;
                }
View Full Code Here

Examples of org.mifosplatform.accounting.closure.command.GLClosureCommand.validateForUpdate()

    @Transactional
    @Override
    public CommandProcessingResult updateGLClosure(final Long glClosureId, final JsonCommand command) {
        final GLClosureCommand closureCommand = this.fromApiJsonDeserializer.commandFromApiJson(command.json());
        closureCommand.validateForUpdate();

        // is the glClosure valid
        final GLClosure glClosure = this.glClosureRepository.findOne(glClosureId);
        if (glClosure == null) { throw new GLClosureNotFoundException(glClosureId); }
View Full Code Here

Examples of org.mifosplatform.accounting.glaccount.command.GLAccountCommand.validateForUpdate()

    @Transactional
    @Override
    public CommandProcessingResult updateGLAccount(final Long glAccountId, final JsonCommand command) {
        try {
            final GLAccountCommand accountCommand = this.fromApiJsonDeserializer.commandFromApiJson(command.json());
            accountCommand.validateForUpdate();

            final Long parentId = command.longValueOfParameterNamed(GLAccountJsonInputParams.PARENT_ID.getValue());
            if (glAccountId.equals(parentId)) { throw new InvalidParentGLAccountHeadException(glAccountId, parentId); }
            // is the glAccount valid
            final GLAccount glAccount = this.glAccountRepository.findOne(glAccountId);
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.command.DocumentCommandValidator.validateForUpdate()

        try {
            this.context.authenticatedUser();

            String oldLocation = null;
            final DocumentCommandValidator validator = new DocumentCommandValidator(documentCommand);
            validator.validateForUpdate();
            // TODO check if entity id is valid and within data scope for the
            // user
            final Document documentForUpdate = this.documentRepository.findOne(documentCommand.getId());
            if (documentForUpdate == null) { throw new DocumentNotFoundException(documentCommand.getParentEntityType(),
                    documentCommand.getParentEntityId(), documentCommand.getId()); }
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.