Examples of CHKDocument


Examples of com.spreadbible.ctlib.entities.CHKDocument

       
        // do some fun with the checkin
        System.err.println("Current docs:");
        List<CHKDocument> docs = ctlib.getCheckInService().getDocuments();
        for (int i = 0; i < docs.size(); i++) {
            CHKDocument doc = docs.get(i);
            ctlib.getCheckInService().fillDocument(doc);
            System.err.println("\tDoc: " + doc.getTitle());
            for (int j = 0; j < doc.getAssignees().size(); j++) {
                CDBPerson p = doc.getAssignees().get(j);
                System.err.println("\t\t" + p.getName() + " " + p.getLastName());
            }
        }
        System.err.println("------");
       
        // New document
        CHKDocument doc = new CHKDocument();
        doc.setTitle("Doc for " + new Date());
        doc.setDescription("test doc");
        ctlib.getCheckInService().setDocument(doc); // Register new document in the db

        Random rnd = new Random();
        rnd.setSeed(new Date().getTime());
        for (int i = 0; i < rnd.nextInt(persons.size()); i++) {
            doc.pushPerson(persons.get(rnd.nextInt(persons.size())));
            ctlib.getCheckInService().addPerson(doc);
        }
    }   
View Full Code Here

Examples of com.spreadbible.ctlib.entities.CHKDocument

     */
    public List<CHKDocument> getDocuments() throws Exception {
        List<CHKDocument> documents = new ArrayList<CHKDocument>();
        ResultSet result = CTLib.getMapper().call("checkin.chk-get-documents", null);
        while (result.next()) {
            CHKDocument doc = new CHKDocument();
            doc.setId(result.getInt("id"));
            doc.setTitle(result.getString("title"));
            doc.setDescription(result.getString("description"));
            doc.setArchived(result.getDate("archived"));
            doc.setCreated(result.getDate("created"));
            documents.add(doc);
        }

        return documents;
    }
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.