Examples of DictionaryCategory


Examples of org.dayatang.persistence.test.domain.DictionaryCategory

        assertFalse(results.contains(education));
    }

    @Test
    public void testNotEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance = repository.createCriteriaQuery(DictionaryCategory.class);
        List<DictionaryCategory> results = instance.notEmpty("dictionaries").list();
        assertFalse(results.contains(empty));
        assertTrue(results.contains(gender));
        assertTrue(results.contains(education));
View Full Code Here

Examples of org.dayatang.persistence.test.domain.DictionaryCategory

        Dictionary doctor = Dictionary.get(46L);
        assertFalse(results.contains(doctor));
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        entityManager.persist(category);
        return category;
    }
View Full Code Here

Examples of org.dayatang.persistence.test.domain.DictionaryCategory

        graduate = createDictionary("02", "研究生", education, 200, "05");
        associate = createDictionary("03", "专科", education, 300, "05");
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        repository.save(category);
        repository.flush();
        return category;
    }
View Full Code Here

Examples of org.dayatang.persistence.test.domain.DictionaryCategory

        assertTrue(results.contains(education));
    }

    @Test
    public void testIsEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance2.isEmpty("dictionaries");
        List<DictionaryCategory> results = repository.find(instance2);
        assertTrue(results.contains(empty));
        assertFalse(results.contains(gender));
        assertFalse(results.contains(education));
View Full Code Here

Examples of org.dayatang.persistence.test.domain.DictionaryCategory

        assertFalse(results.contains(education));
    }

    @Test
    public void testNotEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance2.notEmpty("dictionaries");
        List<DictionaryCategory> results = repository.find(instance2);
        assertFalse(results.contains(empty));
        assertTrue(results.contains(gender));
        assertTrue(results.contains(education));
View Full Code Here

Examples of org.dayatang.persistence.test.domain.DictionaryCategory

        Dictionary doctor = Dictionary.get(46L);
        assertFalse(results.contains(doctor));
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        entityManager.persist(category);
        repository.flush();
        return category;
    }
View Full Code Here

Examples of org.dayatang.utils.support.DictionaryCategory

        assertNull(result.getProp2());
    }

    @Test
    public void test() {
        DictionaryCategory category = new DictionaryCategory();
        category.setName("a category");
        category.setSortOrder(1);
        category.setId(3L);
        Dictionary dictionary1 = new Dictionary("01", "男", category);
        Dictionary dictionary2 = new Dictionary("01", "男", category);
        category.setDictionaries(Sets.newHashSet(dictionary1, dictionary2));
        System.out.println(instance.serialize(category));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.