Package org.mybatis.pagination.dto.datatables

Examples of org.mybatis.pagination.dto.datatables.SearchField


                    ? CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sColName)
                    : sColName;
            if (!Strings.isNullOrEmpty(searchValue)) {
                regex = Boolean.valueOf(httpRequest.getParameter(B_REGEX + col));
                searchable = Boolean.valueOf(httpRequest.getParameter(B_SORTTABLE + col));
                searchFields.add(new SearchField(sColName, regex, searchable, searchValue));
            } else if (!Strings.isNullOrEmpty(sSearch)) {
                searchFields.add(new SearchField(sColName, false, false, sSearch));
            }
        }
        return searchFields;
    }
View Full Code Here


    }

    @Test
    public void testPagainationAndSearch() throws Exception {
        List<SearchField> searchFields = Lists.newArrayList();
        searchFields.add(new SearchField("name", false, false, "11"));

        PagingCriteria baseCriteria = PagingCriteria.createCriteriaWithSearch(0, 15, 15, searchFields);
        PageMyBatis<Resources> pageMyBatis = resourcesMapper.selectByPage(baseCriteria);
        for (Resources pageMyBati : pageMyBatis) {
            System.out.println(pageMyBati);
View Full Code Here

    }

    @Test
    public void testPagainationAndOrderSearch() throws Exception {
        List<SearchField> searchFields = Lists.newArrayList();
        searchFields.add(new SearchField("name", false, false, "11"));

        PagingCriteria baseCriteria = PagingCriteria.createCriteriaWithSearch(0, 15, 15, searchFields);
        PageMyBatis<Resources> pageMyBatis = resourcesMapper.selectByPageOrder(baseCriteria);
        for (Resources pageMyBati : pageMyBatis) {
            System.out.println(pageMyBati);
View Full Code Here

    }

    @Test
    public void testPaginationMoreWhere() throws Exception {
        List<SearchField> searchFields = Lists.newArrayList();
        searchFields.add(new SearchField("name", false, false, "11"));

        PagingCriteria baseCriteria = PagingCriteria.createCriteriaWithSearch(0, 15, 15, searchFields);
        PageMyBatis<Resources> pageMyBatis = resourcesMapper.selectByPageOrderAndWhere(baseCriteria,"aa");
        for (Resources pageMyBati : pageMyBatis) {
            System.out.println(pageMyBati);
View Full Code Here

TOP

Related Classes of org.mybatis.pagination.dto.datatables.SearchField

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.