Package org.zanata.search

Examples of org.zanata.search.FilterConstraints


    @Test
    public void canGetTextFlowsByStatusNotFuzzyNotNew() {
        // deLocale approved in this document
        DocumentId documentId = new DocumentId(1L, "");
        HLocale deLocale = getEm().find(HLocale.class, 3L);
        FilterConstraints notNewOrFuzzy =
                FilterConstraints.builder().keepAll().excludeFuzzy()
                        .excludeNew().build();

        List<HTextFlow> result =
                dao.getTextFlowByDocumentIdWithConstraints(documentId,
View Full Code Here


    @Test
    public void canGetTextFlowsByStatusNotFuzzyNotTranslated() {
        HLocale enUSLocale = getEm().find(HLocale.class, 4L);
        // all 3 text flows are fuzzy for en-US in this document
        DocumentId documentId2 = new DocumentId(2L, "");
        FilterConstraints notFuzzyOrTranslated =
                FilterConstraints.builder().keepAll().excludeTranslated()
                        .excludeFuzzy().build();
        List<HTextFlow> result =
                dao.getTextFlowByDocumentIdWithConstraints(documentId2,
                        enUSLocale, notFuzzyOrTranslated, 0, 10);
View Full Code Here

    @Test(enabled = false)
    public void thisBreaksForSomeReason() {
        // fails regardless of using different documentId, locale or constraints
        DocumentId id = new DocumentId(1L, "");
        HLocale locale = getEm().find(HLocale.class, 3L);
        FilterConstraints constraints = FilterConstraints.builder().build();

        dao.getTextFlowByDocumentIdWithConstraints(id, locale, constraints, 0,
                10);
        dao.getTextFlowByDocumentIdWithConstraints(id, locale, constraints, 0,
                10);
View Full Code Here

TOP

Related Classes of org.zanata.search.FilterConstraints

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.