Package aim.domain.policy

Examples of aim.domain.policy.PolicySeries


    @Override
    public void run() {
        for (BlankPolicyDTO blankPolicyDTO : blankPolicies) {
            long from = blankPolicyDTO.getFrom();
            final long to = blankPolicyDTO.getTo();
            final PolicySeries policySeries = blankPolicyDTO.getPolicySeries();

            if (from + batchSize < to) {
                while (from + batchSize < to) {
                    blankPolicyDAO.batchInsert(policySeries, from, from + batchSize);
                    from += batchSize + 1;
View Full Code Here


     */
    @After("Pointcuts.blankPolicyOperationPointcut()")
    public void logBlankPolicyOperation(JoinPoint joinPoint) {
        final String userName = ((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername();
        final Object[] methodArgs = joinPoint.getArgs();
        final PolicySeries policySeries = (PolicySeries) methodArgs[FIRST_PARAMETR];
        final BlankPolicyAction action = new BlankPolicyAction(PosibleOperations.getMethod(joinPoint.getSignature().getName()), userName, policySeries.getPolicyType().getTitle(),
                policySeries.getSeries(), (Long) methodArgs[SECOND_PARAMETR], (Long) methodArgs[THIRD_PARAMETR]);
        logService.addLog(action);
    }
View Full Code Here

    @Test
    @Ignore("Multithread test")
    public void testCreatePolicy() {
        final PolicyType policiesType = new PolicyType("House", "House policy descrip.");
        final PolicySeries serie1 = new PolicySeries("DOM");
        policiesType.getTypeSeries().add(serie1);
        serie1.setPolicyType(policiesType);
        entityManager.persist(policiesType);

        final Collection<BlankPolicyDTO> policies = new ArrayList<BlankPolicyDTO>();
        policies.add(new BlankPolicyDTO(serie1, 1, 200));
        policies.add(new BlankPolicyDTO(serie1, 400, 500));
View Full Code Here

    }

    @Test
    public void testIssuePolicyToAgent() {
        final PolicyType policiesType = new PolicyType("House", "House policy descrip.");
        final PolicySeries serie1 = new PolicySeries("DOM");
        policiesType.getTypeSeries().add(serie1);
        serie1.setPolicyType(policiesType);
        entityManager.persist(policiesType);

        final Passport agentId = new Passport("АВ", "468454");
        final Account agent = new Account(new Employee(agentId, "Иванов", "Иван"));
        final Set<UserRoles> firstAgentUserRoles = new TreeSet<UserRoles>();
View Full Code Here

        firstAgentUserRoles.add(UserRoles.ROLE_AGENT);
        agent.setAssociatedRoles(firstAgentUserRoles);
        userDAO.persist(agent);

        final PolicyType policyTypeHouse = new PolicyType("HOUSE", "House insurance type");
        final PolicySeries houseSeriesOne = new PolicySeries("HOM");
        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));
View Full Code Here

    @Test
    public void testCheckExistanceOfEmptyPoliciesCount() {

        final PolicyType policyTypeHouse = new PolicyType("HOUSE", "House inurance type");
        final PolicySeries houseSeriesOne = new PolicySeries("HONE");
        houseSeriesOne.setPolicyType(policyTypeHouse);
        policyTypeHouse.getTypeSeries().add(houseSeriesOne);
        entityManager.persist(policyTypeHouse);

        final long beginNumber = 1;
        final long endNumber = 5;
View Full Code Here

    }

    @Test
    public void testGetExistingBlankPolicies() {
        final PolicyType policyTypeHouse = new PolicyType("HOUSE", "House inurance type");
        final PolicySeries houseSeriesOne = new PolicySeries("HONE");
        houseSeriesOne.setPolicyType(policyTypeHouse);
        policyTypeHouse.getTypeSeries().add(houseSeriesOne);
        entityManager.persist(policyTypeHouse);

        final long beginNumber = 1;
        final long endNumber = 5;
View Full Code Here

    @Test
    public void testExistingBlankPolicyCount() {

        final PolicyType policyTypeHouse = new PolicyType("HOUSE", "House inurance type");
        final PolicySeries houseSeriesOne = new PolicySeries("HONE");
        houseSeriesOne.setPolicyType(policyTypeHouse);
        policyTypeHouse.getTypeSeries().add(houseSeriesOne);
        policyTypeDAO.persistPolicyType(policyTypeHouse);

        final long beginNumber = 1;
        final long endNumber = 5;
View Full Code Here

    }

    @Test
    public void testFindBlankPolicyNoMatching() {
        final PolicyType type = new PolicyType("AGR", "Some type");
        final PolicySeries serie1 = new PolicySeries("AAA");
        serie1.setPolicyType(type);
        type.getTypeSeries().add(serie1);
        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)));
View Full Code Here

    }

    @Test
    public void testFindInventoryPolicyPartialMatching() {
        final PolicyType type = new PolicyType("AGR", "Some type");
        final PolicySeries series = new PolicySeries("AAA");
        series.setPolicyType(type);
        type.getTypeSeries().add(series);
        policyTypeDAO.persistPolicyType(type);

        final long beginNumber = 1;
        final long endNumber = 5;
View Full Code Here

TOP

Related Classes of aim.domain.policy.PolicySeries

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.