Package org.rhq.core.domain.operation

Examples of org.rhq.core.domain.operation.HistoryJobId


        return pagedResourceHistories;
    }

    @Override
    public OperationHistory getOperationHistoryByJobId(Subject subject, String historyJobId) {
        HistoryJobId jobIdObject = new HistoryJobId(historyJobId);

        Query query = entityManager.createNamedQuery(OperationHistory.QUERY_FIND_BY_JOB_ID);
        query.setParameter("jobName", jobIdObject.getJobName());
        query.setParameter("jobGroup", jobIdObject.getJobGroup());
        query.setParameter("createdTime", jobIdObject.getCreatedTime());

        OperationHistory history;

        try {
            history = (OperationHistory) query.getSingleResult();
View Full Code Here


        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        // cannot compare JobId with a HistoryJobId
        one = new HistoryJobId("name", "group", 1);
        two = new JobId("name", "group");
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        one = new JobId("name", "group");
        two = new HistoryJobId("name", "group", 1);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();
    }
View Full Code Here

        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();
    }

    public void testHistoryJobIdEquals() {
        HistoryJobId one;
        HistoryJobId two;

        one = new HistoryJobId("name", "group", 1);
        assert one.equals(one);
        assert one.getJobName().equals("name");
        assert one.getJobGroup().equals("group");
        assert one.getCreatedTime() == 1;

        one = new HistoryJobId("name", "group", 1);
        two = new HistoryJobId("name", "group", 1);
        assert one != two;
        assert one.getJobName().equals(two.getJobName());
        assert one.getJobGroup().equals(two.getJobGroup());
        assert one.getCreatedTime() == two.getCreatedTime();
        assert one.equals(two);
        assert one.hashCode() == two.hashCode();

        two = new HistoryJobId("nameX", "group", 1);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        two = new HistoryJobId("name", "groupX", 1);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        two = new HistoryJobId("name", "group", 2);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        one = new HistoryJobId("nameX", "group", 1);
        two = new HistoryJobId("name", "group", 1);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        one = new HistoryJobId("name", "groupX", 1);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        one = new HistoryJobId("name", "group", 2);
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.operation.HistoryJobId

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.