Package net.stinfoservices.pacifiq.server.model

Examples of net.stinfoservices.pacifiq.server.model.Document


    }

    @Override
    @Transactional(readOnly = false)
    public Long saveDocument(DocumentDTO document) throws Exception {
        Document doc;
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");

        if (document.getId() == null) {
            doc = new Document();
            document.setOwner(user);
        } else {
            doc = documentDAO.find(document.getId());

        }
        applyDiffDocument(doc, document);
        if (getSession().getAttribute("file") instanceof byte[]) {
            doc.setBuffer((byte[]) getSession().getAttribute("file"));
        }
        alertManagement.alert(user);

        return (documentDAO.save(doc).getId());
    }
View Full Code Here


    public void update(DocumentDTO document) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");

        alertManagement.alert(user);

        Document doc = documentDAO.find(document.getId());

        applyDiffDocument(doc, document);
        documentDAO.save(doc);
    }
View Full Code Here

TOP

Related Classes of net.stinfoservices.pacifiq.server.model.Document

Copyright © 2018 www.massapicom. 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.