Package org.nxplanner.domain.repository

Examples of org.nxplanner.domain.repository.ObjectRepository.load()


        throws Exception {
        String oid = form.getOid();
        if (oid != null) {
            Class objectClass = getObjectType(actionMapping, request);
            ObjectRepository objectRepository = getRepository(objectClass);
            DomainObject object = (DomainObject) objectRepository.load(Integer.parseInt(oid));
            populateForm(form, object);
        }
    }

    protected void populateForm(AbstractEditorForm form, DomainObject object) throws Exception {
View Full Code Here


        Class objectClass = getObjectType(actionMapping, request);
        ObjectRepository objectRepository = getRepository(objectClass);
        DomainObject object;
        String action = form.getAction();
        if (action.equals(UPDATE_ACTION)) {
            object = (DomainObject)objectRepository.load(Integer.parseInt(oid));
            populateObject(request, object, form);
            objectRepository.update(object);
        } else if (action.equals(CREATE_ACTION)) {
            object = createObject(objectClass, request, form, objectRepository);
        } else {
View Full Code Here

        domainContext = new DomainContext();
        domainContext.populate(object);
        String projectIdParam = request.getParameter("projectId");
        if (domainContext.getProjectId() == 0 && StringUtils.isNotEmpty(projectIdParam) && !projectIdParam.equals("0")) {
            ObjectRepository objectRepository = getRepository(Project.class);
            Project project = (Project)objectRepository.load(Integer.parseInt((request.getParameter("projectId"))));
            domainContext.populate(project);
        }
        domainContext.save(request);
        return domainContext;
    }
View Full Code Here

            throws Exception {
        Class objectClass = getObjectType(actionMapping, request);
        ObjectRepository objectRepository = getRepository(objectClass);
        String forwardPath = null;
        if (isSecure(actionMapping)) {
            Object object = objectRepository.load(Integer.parseInt(request.getParameter("oid")));
            setDomainContext(request, object);
        }
        forwardPath = actionMapping.findForward("display").getPath();
        String returnto = request.getParameter("returnto");
        if (returnto != null) {
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.