Package org.rhq.core.domain.criteria

Examples of org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria


        MongoDBChangeSetEntry entry4 = new MongoDBChangeSetEntry("./3.bin", FILE_ADDED);
        entry4.setNewFileHash(sha256("./3.bin"));
        changeSet3.add(entry4);
        changeSetDAO.save(changeSet3);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(driftDefId);
        criteria.addFilterResourceId(resourceId1);
        criteria.addFilterVersion("1");
        criteria.fetchDrifts(true);

        Mapper mapper = new Mapper();
        DriftChangeSetDTO expected = mapper.toDTO(changeSet2);

View Full Code Here


        changeSetDTO.setDrifts(driftDTOs);

        driftServer.persistChangeSet(null, changeSetDTO);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(driftDef.getId());
        criteria.fetchDrifts(true);
       
        List<MongoDBChangeSet> changeSets = changeSetDAO.findByChangeSetCritiera(criteria);
        assertEquals(changeSets.size(), 1, "There should only be one change set for drift definition id " +
                driftDef.getId());
View Full Code Here

        changeSetDTO.setDrifts(driftDTOs);

        driftServer.persistChangeSet(null, changeSetDTO);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.fetchDrifts(true);

        List<MongoDBChangeSet> changeSets = changeSetDAO.findByChangeSetCritiera(criteria);
        assertEquals(changeSets.size(), 1, "There should only be one change set.");

        Mapper mapper = new Mapper();
View Full Code Here

        c2.setVersion(1);
        c2.setResourceId(2);
        c2.setDriftDefinitionId(2);
        dao.save(c2);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterId(c1.getId());

        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c1);

        String ignore = "drifts";
View Full Code Here

        c2.setVersion(2);
        c2.setResourceId(2);
        c2.setDriftDefinitionId(2);
        dao.save(c2);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterResourceId(1);
       
        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c1);
       
        String ignore = "drifts";
View Full Code Here

        c2.setVersion(2);
        c2.setResourceId(1);
        c2.setDriftDefinitionId(1);
        dao.save(c2);
       
        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(1);
        criteria.addFilterVersion("2");
       
        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c2);
       
        String ignore = "drifts";
View Full Code Here

        c3.setVersion(3);
        c3.setResourceId(1);
        c3.setDriftDefinitionId(1);
        dao.save(c3);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(1);
        criteria.addFilterStartVersion("2");

        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c2, c3);

        String ignore = "drifts";
View Full Code Here

        c3.setVersion(3);
        c3.setResourceId(1);
        c3.setDriftDefinitionId(1);
        dao.save(c3);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(1);
        criteria.addFilterEndVersion("2");

        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c1, c2);

        String ignore = "drifts";
View Full Code Here

        c2.setVersion(1);
        c2.setResourceId(2);
        c2.setDriftDefinitionId(2);
        dao.save(c2);
       
        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(1);
       
        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c1, c11);
       
        String ignore = "drifts";
View Full Code Here

        c2.setResourceId(1);
        c2.setDriftDefinitionId(1);
        c2.setCtime(c1.getCtime() + (1000 * 60 * 5))// 5 minutes ago
        dao.save(c2);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterDriftDefinitionId(1);
        criteria.addFilterCreatedAfter(creationTime + 1000);

        List<MongoDBChangeSet> actual = dao.findByChangeSetCritiera(criteria);
        List<MongoDBChangeSet> expected = asList(c2);

        String ignore = "drifts";
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria

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.