Examples of ProjectDAO


Examples of org.zanata.dao.ProjectDAO

        // System.out.println("Total Projects: " + t);
    }

    @Test
    public void autowireProvided() {
        ProjectDAO dao = new ProjectDAO();
        dao =
                SeamAutowire.instance().ignoreNonResolvable()
                        .use("session", getSession()).autowire(dao);

        int t = dao.getTotalProjectCount();
        // System.out.println("Total Projects: " + t);
    }
View Full Code Here

Examples of org.zanata.dao.ProjectDAO

    @Test
    public void ignoreTranslationsFromObsoleteProjectAndVersion()
            throws Exception {
        ProjectIterationDAO projectIterationDAO =
                seam.autowire(ProjectIterationDAO.class);
        ProjectDAO projectDAO = seam.autowire(ProjectDAO.class);

        // Make versions and projects obsolete
        HProjectIteration version =
                projectIterationDAO.getBySlug("same-project", "same-version");
        assert version != null;
        version.setStatus(EntityStatus.OBSOLETE);
        projectIterationDAO.makePersistent(version);

        HProject project = projectDAO.getBySlug("different-project");
        assert project != null;
        project.setStatus(EntityStatus.OBSOLETE);
        projectDAO.makePersistent(project);

        // Run the copy trans scenario (very liberal, but nothing should be
        // translated)
        CopyTransExecution execution =
                new CopyTransExecution(IGNORE, IGNORE, IGNORE, true, true,
View Full Code Here

Examples of org.zanata.dao.ProjectDAO

        for (HDocument doc : version.getDocuments().values()) {
            doc.setObsolete(true);
            documentDAO.makePersistent(doc);
        }

        ProjectDAO projectDAO = seam.autowire(ProjectDAO.class);
        HProject project = projectDAO.getBySlug("different-project");
        assert project != null;
        for (HProjectIteration it : project.getProjectIterations()) {
            for (HDocument doc : it.getDocuments().values()) {
                doc.setObsolete(true);
                documentDAO.makePersistent(doc);
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.