Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2014-2015 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.dbflute.cbean.paging.numberlink.group;
The option of page group.

Author(s):
jflute
public class PageGroupOption implements PageNumberLinkOptionSerializable {
    // ===================================================================================
    //                                                                          Definition
    //                                                                          ==========
    
The serial version UID for object serialization. (Default)
    private static final long serialVersionUID = 1L;
    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    protected int _pageGroupSize;
    // ===================================================================================
    //                                                                      Basic Override
    //                                                                      ==============
    

Returns:
The view string of all attribute values. (NotNull)
    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("{");
        sb.append(" pageGroupSize=").append();
        sb.append("}");
        return sb.toString();
    }
    // ===================================================================================
    //                                                                            Accessor
    //                                                                            ========
    
Get the size of page group.

Returns:
The size of page group.
    public int getPageGroupSize() {
        return ;
    }

    
Set the size of page group.
 e.g. group-size=10, current-page=8
 PageGroupBean pageGroup = page.pageGroup(op -> op.groupSize(3));
 List<Integer> numberList = pageGroup.createPageNumberList();

 //  8 / 23 pages (453 records)
 // previous 1 2 3 4 5 6 7 8 9 10 next
 

Parameters:
pageGroupSize The size of page group.
Returns:
this. (NotNull)
    public PageGroupOption groupSize(int pageGroupSize) {
         = pageGroupSize;
        return this;
    }
New to GrepCode? Check out our FAQ X