Package aim.domain.policy

Examples of aim.domain.policy.PolicyType


     *
     * @return <code>null</code>
     */
    public String showStatistic() {     
        final Object[] types = policiesTypes.toArray();
        final PolicyType selectedType = (PolicyType) types[selectedPolicyType];
        final BlankState policyState = (ALL_STATES.equals(selectedPolicyState)) ? (null) : (BlankState.valueOf(selectedPolicyState));
        policies = policyService.getBlankPoliciesForStatistic(selectedType, policyState, dateFrom, dateTo);
        emptyResult = (policies.size() == 0);
        if (!emptyResult) {
            for (LightPolicySet lightSet : policies) {
View Full Code Here


            }
        }
        addType = newType + "";
        if (!errorType) {
            sucessfullType = true;
            PolicyType newPolicyType = new PolicyType(newType, "");
            policyTypeService.addPolicyType(newPolicyType);           
            LightPolicySet newPolicyTypeInTable = new LightPolicySet();
            newPolicyTypeInTable.setType(newType);
            policiesTypes.add(newPolicyTypeInTable);
            newType = "";
View Full Code Here

    @PersistenceContext
    private EntityManager entityManager;

    @Test
    public void testPersistPolicyType() {
        final PolicyType policyType1 = new PolicyType("КАСКО", "машины");
        final PolicySeries serie1 = new PolicySeries("KKKKKK");
        final PolicySeries serie2 = new PolicySeries("KIKIKI");
        final PolicySeries serie3 = new PolicySeries("IKIKIK");
        policyType1.getTypeSeries().add(serie1);
        policyType1.getTypeSeries().add(serie2);
        policyType1.getTypeSeries().add(serie3);
        serie1.setPolicyType(policyType1);
        serie2.setPolicyType(policyType1);
        serie3.setPolicyType(policyType1);
        policyTypeDAO.persistPolicyType(policyType1);

        final PolicyType policyType2 = new PolicyType("Жизнь", "жизнь");
        final PolicySeries serie21 = new PolicySeries("JJJJJJ");
        final PolicySeries serie22 = new PolicySeries("JIDKIL");
        final PolicySeries serie23 = new PolicySeries("MKIOLM");
        policyType2.getTypeSeries().add(serie21);
        policyType2.getTypeSeries().add(serie22);
        policyType2.getTypeSeries().add(serie23);
        serie21.setPolicyType(policyType2);
        serie22.setPolicyType(policyType2);
        serie23.setPolicyType(policyType2);
        policyTypeDAO.persistPolicyType(policyType2);

        final PolicyType policyType3 = new PolicyType("дом", "дом");
        final PolicySeries serie31 = new PolicySeries("OPLIHN");
        final PolicySeries serie32 = new PolicySeries("JFYNDT");
        final PolicySeries serie33 = new PolicySeries("PROUFN");
        policyType3.getTypeSeries().add(serie31);
        policyType3.getTypeSeries().add(serie32);
        policyType3.getTypeSeries().add(serie33);
        serie31.setPolicyType(policyType3);
        serie32.setPolicyType(policyType3);
        serie33.setPolicyType(policyType3);
        policyTypeDAO.persistPolicyType(policyType3);

        assertEquals(policyType1, entityManager.find(PolicyType.class, policyType1.getId()));
        assertEquals(policyType2, entityManager.find(PolicyType.class, policyType2.getId()));
        assertEquals(policyType3, entityManager.find(PolicyType.class, policyType3.getId()));
    }
View Full Code Here

    @Test
    public void testGetAllPolicySeries() {
        final PolicySeries serie1 = new PolicySeries("ZCX");
        final PolicySeries serie2 = new PolicySeries("ZVC");
        final PolicySeries serie3 = new PolicySeries("ZBN");
        final PolicyType policyType = new PolicyType("UFO", "UFO Policy type");
        policyType.getTypeSeries().add(serie1);
        serie1.setPolicyType(policyType);
        policyType.getTypeSeries().add(serie2);
        serie2.setPolicyType(policyType);
        policyType.getTypeSeries().add(serie3);
        serie3.setPolicyType(policyType);
        entityManager.persist(policyType);

        final List<PolicySeries> series = policyTypeDAO.getAllPolicySeries();
View Full Code Here

    @Test
    public void testGetPolicyTypes() {
        final PolicySeries serie1 = new PolicySeries("AOO");
        final PolicySeries serie2 = new PolicySeries("BII");
        final PolicySeries serie3 = new PolicySeries("CUU");
        final PolicyType policyType1 = new PolicyType("ASome", "Policy type");
        final PolicyType policyType2 = new PolicyType("BSome", "Policy type");
        final PolicyType policyType3 = new PolicyType("CSome", "Policy type");
        policyType1.getTypeSeries().add(serie1);
        policyType1.getTypeSeries().add(serie2);
        policyType1.getTypeSeries().add(serie3);
        serie1.setPolicyType(policyType1);
        serie2.setPolicyType(policyType2);
View Full Code Here

    @PersistenceContext
    EntityManager entityManager;

    @Test
    public void testFillDb() {
        final PolicyType policyType1 = new PolicyType("КАСКО", "каско");
        final PolicySeries serie1 = new PolicySeries("KKKKKK");
        final PolicySeries serie2 = new PolicySeries("KIKIKI");
        final PolicySeries serie3 = new PolicySeries("IKIKIK");
        policyType1.getTypeSeries().add(serie1);
        policyType1.getTypeSeries().add(serie2);
        policyType1.getTypeSeries().add(serie3);
        serie1.setPolicyType(policyType1);
        serie2.setPolicyType(policyType1);
        serie3.setPolicyType(policyType1);
        entityManager.persist(policyType1);

        final PolicyType policyType2 = new PolicyType("Жилье", "жилье");
        final PolicySeries serie21 = new PolicySeries("JJJJJJ");
        final PolicySeries serie22 = new PolicySeries("JIDKIL");
        final PolicySeries serie23 = new PolicySeries("MKIOLM");
        policyType2.getTypeSeries().add(serie21);
        policyType2.getTypeSeries().add(serie22);
        policyType2.getTypeSeries().add(serie23);
        serie21.setPolicyType(policyType2);
        serie22.setPolicyType(policyType2);
        serie23.setPolicyType(policyType2);
        entityManager.persist(policyType2);

        final PolicyType policyType3 = new PolicyType("Жизнь", "жинь");
        final PolicySeries serie31 = new PolicySeries("OPLIHN");
        final PolicySeries serie32 = new PolicySeries("JFYNDT");
        final PolicySeries serie33 = new PolicySeries("PROUFN");
        policyType3.getTypeSeries().add(serie31);
        policyType3.getTypeSeries().add(serie32);
        policyType3.getTypeSeries().add(serie33);
        serie31.setPolicyType(policyType3);
        serie32.setPolicyType(policyType3);
        serie33.setPolicyType(policyType3);
        entityManager.persist(policyType3);
View Full Code Here

        final Set<UserRoles> firstAgentUserRoles = new TreeSet<UserRoles>();
        firstAgentUserRoles.add(UserRoles.ROLE_AGENT);
        agent.setAssociatedRoles(firstAgentUserRoles);
        userDAO.persist(agent);
        final PolicySeries serie = new PolicySeries("dasdas");
        final PolicyType type = new PolicyType("AUTOS", "for auto insurance");
        type.getTypeSeries().add(serie);
        serie.setPolicyType(type);
        policyTypeDAO.persistPolicyType(type);

        final long from = 0;
        final long to = 10;
View Full Code Here

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

        final PolicySeries serie = new PolicySeries("LS");
        final PolicyType type = new PolicyType("WEAPOS", "For Norris C. ");
        type.getTypeSeries().add(serie);
        serie.setPolicyType(type);
        policyTypeDAO.persistPolicyType(type);

        final long from = 0;
        final long to = 10;
View Full Code Here

TOP

Related Classes of aim.domain.policy.PolicyType

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.