Package org.rhq.core.domain.criteria

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


        final String packageId = getConfiguration().getSimpleValue(PROP_PACKAGE_ID, null);
        final String subjectId = getConfiguration().getSimpleValue(PROP_USER_ID, null);

        final Config config = new Config();

        RepoCriteria rc = new RepoCriteria();

        GWTServiceLookup.getRepoService().findReposByCriteria(rc, new AsyncCallback<PageList<Repo>>() {
            public void onSuccess(PageList<Repo> result) {
                config.allRepos = result;
View Full Code Here


        String scriptName = path.substring(slashIdx + 1);

        try {
            final RepoManagerRemote repoManager = rhqFacade.getProxy(RepoManagerRemote.class);

            final RepoCriteria repoCrit = new RepoCriteria();
            repoCrit.addFilterName(repoName);

            //Use CriteriaQuery to automatically chunk/page through criteria query results
            CriteriaQueryExecutor<Repo, RepoCriteria> queryExecutor = new CriteriaQueryExecutor<Repo, RepoCriteria>() {
                @Override
                public PageList<Repo> execute(RepoCriteria criteria) {
View Full Code Here

            assert retrievedRepos.get(0).isCandidate();
            reposToDelete.add(retrievedRepos.get(0).getId());

            Repo repoInGroup = retrievedRepos.get(0);

            RepoCriteria findWithRepoGroup = new RepoCriteria();
            findWithRepoGroup.fetchRepoRepoGroups(true);
            findWithRepoGroup.addFilterId(repoInGroup.getId());

            PageList<Repo> repoPageList = repoManager.findReposByCriteria(overlord, findWithRepoGroup);
            repoInGroup = repoPageList.get(0);

            Set<RepoRepoGroup> repoGroups = repoInGroup.getRepoRepoGroups();
            assert repoGroups.size() == 1;

            RepoRepoGroup repoRepoGroup = repoGroups.iterator().next();
            assert repoRepoGroup.getRepoRepoGroupPK().getRepoGroup().getName().equals("testRepoGroup");
            assert repoRepoGroup.getRepoRepoGroupPK().getRepo().getName().equals("testRepo2");

            // -> Repo with a parent
            retrievedRepos = repoManager.getRepoByName("testRepo3");
            assert retrievedRepos.size() == 1;
            assert retrievedRepos.get(0).isCandidate();
            reposToDelete.add(retrievedRepos.get(0).getId());
            relatedRepoId = retrievedRepos.get(0).getId();

            retrievedRepos = repoManager.getRepoByName("testRepo4");
            assert retrievedRepos.size() == 1;
            assert retrievedRepos.get(0).isCandidate();
            reposToDelete.add(retrievedRepos.get(0).getId());
            repoId = retrievedRepos.get(0).getId();

            RepoCriteria findWithRelationships = new RepoCriteria();
            findWithRelationships.addFilterName("testRepo4");
            findWithRelationships.fetchRepoRepoRelationships(true);
            PageList<Repo> childRepoList = repoManager.findReposByCriteria(overlord, findWithRelationships);
            assert childRepoList.size() == 1;

            Repo childRepo = childRepoList.get(0);
            Set<RepoRepoRelationship> childRepoRepoRelationship = childRepo.getRepoRepoRelationships();
View Full Code Here

TOP

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

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.