All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nuiton.topia.persistence.pager.TopiaPagerBean Maven / Gradle / Ivy

The newest version!
package org.nuiton.topia.persistence.pager;

/*
 * #%L
 * ToPIA Extension :: API
 * %%
 * Copyright (C) 2018 - 2022 Ultreia.io
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program.  If not, see
 * .
 * #L%
 */

import org.apache.commons.collections4.CollectionUtils;

import java.util.List;

/**
 * Extension of a {@link PagerBean} to add filter and ordering capacities.
 *
 * @author Tony Chemit - [email protected]
 * @since 2.6.14
 */
public class TopiaPagerBean extends PagerBean {

    private static final long serialVersionUID = 1L;

    // sorting order - asc or desc
    protected boolean sortAscendant;

    // get index row - i.e. user click to sort.
    protected String sortColumn;

    protected FilterRuleGroupOperator groupOp;

    private List rules;

    public boolean canFilter() {
        return groupOp != null && CollectionUtils.isNotEmpty(rules);
    }

    public FilterRuleGroupOperator getGroupOp() {
        return groupOp;
    }

    public void setGroupOp(FilterRuleGroupOperator groupOp) {
        this.groupOp = groupOp;
    }

    public List getRules() {
        return rules;
    }

    public void setRules(List rules) {
        this.rules = rules;
    }

    public boolean isSortAscendant() {
        return sortAscendant;
    }

    public void setSortAscendant(boolean sortAscendant) {
        this.sortAscendant = sortAscendant;
    }

    public String getSortColumn() {
        return sortColumn;
    }

    public void setSortColumn(String sortColumn) {
        this.sortColumn = sortColumn;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy