Package aim.domain.policy

Examples of aim.domain.policy.PolicyId


        final long beginNumber = 1;
        final long endNumber = 5;
        final long policyCount = endNumber - beginNumber + 1;
        for (long i = beginNumber; i <= endNumber; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(serie1, i));
            entityManager.persist(blankPolicy);
        }

        policyService.issuePolicyToAgent(serie1, beginNumber, endNumber, agent.getEmployee());
        //TODO assert
View Full Code Here


        houseSeriesOne.setPolicyType(policyTypeHouse);
        policyTypeHouse.getTypeSeries().add(houseSeriesOne);
        entityManager.persist(policyTypeHouse);

        for (long i = 1; i <= 5; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            blankPolicy.setInventoryPolicyState(BlankState.FILLED);
            blankPolicy.setAgent(agent.getEmployee());
            entityManager.persist(blankPolicy);
        }
        for (long i = 6; i <= 10; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            entityManager.persist(blankPolicy);
        }

        final Long retrivedEmptyBlankPolicyCount = policyService.checkExistanceOfEmptyPolicies(houseSeriesOne, 1, 10);
        assertTrue(retrivedEmptyBlankPolicyCount == 5);
View Full Code Here

        final long beginNumber = 1;
        final long endNumber = 5;
        final Long policyCount = endNumber - beginNumber + 1;
        for (long i = beginNumber; i <= endNumber; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            entityManager.persist(blankPolicy);
        }

        final Long retrivedBlankPolicyCount = policyService.checkExistanceOfPoliciesCount(houseSeriesOne,
                beginNumber, endNumber);
View Full Code Here

        final long beginNumber = 1;
        final long endNumber = 5;
        final long policyCount = 3;
        for (long i = beginNumber; i <= endNumber; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            entityManager.persist(blankPolicy);
        }

        final Collection<BlankPolicy> retrivedBlankPolicies = policyService.getExistingBlankPolicies(houseSeriesOne, 3, 100);
        assertEquals(policyCount, retrivedBlankPolicies.size());
View Full Code Here

        final long beginNumber = 1;
        final long endNumber = 5;
        final Long policyCount = endNumber - beginNumber + 1;
        for (long i = beginNumber; i <= endNumber; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            blankPolicyDAO.persistPolicy(blankPolicy);
        }

        final Long retrivedBlankPolicyCount = blankPolicyDAO.existingBlankPolicyCount(houseSeriesOne,
                beginNumber, endNumber);
View Full Code Here

        final PolicySeries serie2 = new PolicySeries("ABB");
        serie2.setPolicyType(type);
        type.getTypeSeries().add(serie2);
        policyTypeDAO.persistPolicyType(type);

        blankPolicyDAO.persistPolicy(new BlankPolicy(new PolicyId(serie1, 1)));
        blankPolicyDAO.persistPolicy(new BlankPolicy(new PolicyId(serie1, 2)));

        final List<BlankPolicy> policies = blankPolicyDAO.findBlankPolicies(serie1, 3, 4);

        assertTrue(policies.isEmpty());
    }
View Full Code Here

        policyTypeDAO.persistPolicyType(type);

        final long beginNumber = 1;
        final long endNumber = 5;
        for (long i = beginNumber; i <= endNumber; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(series, i));
            blankPolicyDAO.persistPolicy(blankPolicy);
        }

        final long serchingPolcyCount = 3;
        final List<BlankPolicy> policies = blankPolicyDAO.findBlankPolicies(series, beginNumber, 3);
View Full Code Here

        final long beginNumber = 1;
        final long endNumber = 5;
        final long policyCount = endNumber - beginNumber + 1;
        for (long i = beginNumber; i <= endNumber; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(series, i));
            blankPolicyDAO.persistPolicy(blankPolicy);
        }

        final List<BlankPolicy> policies = blankPolicyDAO.findBlankPolicies(series, 1, 5);
View Full Code Here

        houseSeriesOne.setPolicyType(policyTypeHouse);
        policyTypeHouse.getTypeSeries().add(houseSeriesOne);
        policyTypeDAO.persistPolicyType(policyTypeHouse);

        for (long i = 1; i <= 5; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            blankPolicy.setInventoryPolicyState(BlankState.FILLED);
            blankPolicy.setAgent(employee);
            blankPolicyDAO.persistPolicy(blankPolicy);
        }
        for (long i = 6; i <= 10; i++) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
            blankPolicyDAO.persistPolicy(blankPolicy);
        }

        final Long retrivedEmptyBlankPolicyCount = blankPolicyDAO.existingEmptyBlankPolicyCount(houseSeriesOne, 1, 10);
View Full Code Here

        final long beginNumber = 1;
        final long endNumber = 10;
        final long policyCount = (endNumber - beginNumber + 1) / 2;
        for (long i = beginNumber; i <= endNumber; i += 2) {
            final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(policySeries, i));
            blankPolicyDAO.persistPolicy(blankPolicy);
        }

        final List<Long> policiesNumbers = blankPolicyDAO.findNumbersOfExistingPolicies(policySeries, beginNumber, endNumber);
View Full Code Here

TOP

Related Classes of aim.domain.policy.PolicyId

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.