[pal-cvs 2351] [85] added paging util for teeda.

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2007年 4月 25日 (水) 22:01:12 JST


Revision: 85
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=85
Author:   shinsuke
Date:     2007-04-25 22:01:12 +0900 (Wed, 25 Apr 2007)

Log Message:
-----------
added paging util for teeda.

Added Paths:
-----------
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/DefaultPager.java
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/Pager.java
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/PagerUtil.java
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractPagerPage.java
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractTwoPagerPage.java
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/PagerPage.java
    libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/TwoPagerPage.java


-------------- next part --------------
Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/DefaultPager.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/DefaultPager.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/DefaultPager.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.pager;
+
+public class DefaultPager implements Pager {
+    public static int DEFAULT_PAGER_LIMIT_SIZE = 25;
+
+    private int offset;
+
+    private int count;
+
+    private int limit;
+
+    public DefaultPager() {
+        super();
+        setOffset(0);
+        setCount(0);
+        setLimit(DEFAULT_PAGER_LIMIT_SIZE);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.pager.Pager#getLimit()
+     */
+    public int getLimit() {
+        return limit;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.pager.Pager#setLimit(int)
+     */
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.pager.Pager#getCount()
+     */
+    public int getCount() {
+        return count;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.pager.Pager#setCount(int)
+     */
+    public void setCount(int count) {
+        this.count = count;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.pager.Pager#getOffset()
+     */
+    public int getOffset() {
+        return offset;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.pager.Pager#setOffset(int)
+     */
+    public void setOffset(int offset) {
+        this.offset = offset;
+    }
+
+}
\ No newline at end of file


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/DefaultPager.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/Pager.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/Pager.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/Pager.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.pager;
+
+public interface Pager {
+
+    /**
+     * @return the limit
+     */
+    public abstract int getLimit();
+
+    /**
+     * @param limit
+     *            the limit to set
+     */
+    public abstract void setLimit(int limit);
+
+    /**
+     * @return the count
+     */
+    public abstract int getCount();
+
+    /**
+     * @param count
+     *            the count to set
+     */
+    public abstract void setCount(int count);
+
+    /**
+     * @return the offset
+     */
+    public abstract int getOffset();
+
+    /**
+     * @param offset
+     *            the offset to set
+     */
+    public abstract void setOffset(int offset);
+
+}
\ No newline at end of file


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/pager/Pager.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/PagerUtil.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/PagerUtil.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/PagerUtil.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.util;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.common.web.PagerPage;
+import jp.sf.pal.common.web.TwoPagerPage;
+import jp.sf.pal.common.pager.Pager;
+
+public class PagerUtil {
+    /**
+     * @return the facesContext
+     */
+    private static FacesContext getFacesContext() {
+        return FacesContext.getCurrentInstance();
+    }
+
+    public static void updatePageNumber(Pager pager, String prevKey,
+            String nextKey) {
+        Map requestMap = getFacesContext().getExternalContext()
+                .getRequestParameterMap();
+
+        String prev = (String) requestMap.get(prevKey);
+        if (prev != null) {
+            int pageNum = Integer.parseInt(prev);
+            pager.setOffset((pageNum - 1) * pager.getLimit());
+            return;
+        }
+
+        String next = (String) requestMap.get(nextKey);
+        if (next != null) {
+            int pageNum = Integer.parseInt(next);
+            pager.setOffset((pageNum - 1) * pager.getLimit());
+            return;
+        }
+    }
+
+    public static void updatePagerPage(PagerPage page, Pager pager) {
+        // update page
+        page.setCount(new Integer(pager.getCount()));
+        page.setMaxPageNumber(new Integer((pager.getCount() - 1)
+                / pager.getLimit() + 1));
+        page.setCurrentPageNumber(new Integer(pager.getOffset()
+                / pager.getLimit() + 1));
+        if (page.getMaxPageNumber().intValue() > page.getCurrentPageNumber()
+                .intValue()) {
+            page.setNextPageNumber(new Integer(page.getCurrentPageNumber()
+                    .intValue() + 1));
+        } else {
+            page.setNextPageNumber(null);
+        }
+        if (page.getCurrentPageNumber().intValue() > 1) {
+            page.setPreviousPageNumber(new Integer(page.getCurrentPageNumber()
+                    .intValue() - 1));
+        } else {
+            page.setPreviousPageNumber(null);
+        }
+    }
+
+    public static void updatePagerPage(TwoPagerPage page, Pager pager1,
+            Pager pager2) {
+        // update page
+        page.setCount1(new Integer(pager1.getCount()));
+        page.setMaxPageNumber1(new Integer((pager1.getCount() - 1)
+                / pager1.getLimit() + 1));
+        page.setCurrentPageNumber1(new Integer(pager1.getOffset()
+                / pager1.getLimit() + 1));
+        if (page.getMaxPageNumber1().intValue() > page.getCurrentPageNumber1()
+                .intValue()) {
+            page.setNextPageNumber1(new Integer(page.getCurrentPageNumber1()
+                    .intValue() + 1));
+        } else {
+            page.setNextPageNumber1(null);
+        }
+        if (page.getCurrentPageNumber1().intValue() > 1) {
+            page.setPreviousPageNumber1(new Integer(page
+                    .getCurrentPageNumber1().intValue() - 1));
+        } else {
+            page.setPreviousPageNumber1(null);
+        }
+
+        // update page
+        page.setCount2(new Integer(pager2.getCount()));
+        page.setMaxPageNumber2(new Integer((pager2.getCount() - 1)
+                / pager2.getLimit() + 1));
+        page.setCurrentPageNumber2(new Integer(pager2.getOffset()
+                / pager2.getLimit() + 1));
+        if (page.getMaxPageNumber2().intValue() > page.getCurrentPageNumber2()
+                .intValue()) {
+            page.setNextPageNumber2(new Integer(page.getCurrentPageNumber2()
+                    .intValue() + 1));
+        } else {
+            page.setNextPageNumber2(null);
+        }
+        if (page.getCurrentPageNumber2().intValue() > 1) {
+            page.setPreviousPageNumber2(new Integer(page
+                    .getCurrentPageNumber2().intValue() - 1));
+        } else {
+            page.setPreviousPageNumber2(null);
+        }
+    }
+}


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/util/PagerUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractPagerPage.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractPagerPage.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractPagerPage.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.web;
+
+public abstract class AbstractPagerPage implements PagerPage {
+
+    private Integer count;
+
+    private Integer currentPageNumber;
+
+    private Integer maxPageNumber;
+
+    private Integer previousPageNumber;
+
+    private Integer nextPageNumber;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#getCount()
+     */
+    public Integer getCount() {
+        return count;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#setCount(java.lang.Integer)
+     */
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#getCurrentPageNumber()
+     */
+    public Integer getCurrentPageNumber() {
+        return currentPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#setCurrentPageNumber(java.lang.Integer)
+     */
+    public void setCurrentPageNumber(Integer currentPageNumber) {
+        this.currentPageNumber = currentPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#getMaxPageNumber()
+     */
+    public Integer getMaxPageNumber() {
+        return maxPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#setMaxPageNumber(java.lang.Integer)
+     */
+    public void setMaxPageNumber(Integer maxPageNumber) {
+        this.maxPageNumber = maxPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#getNextPageNumber()
+     */
+    public Integer getNextPageNumber() {
+        return nextPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#setNextPageNumber(java.lang.Integer)
+     */
+    public void setNextPageNumber(Integer nextPageNumber) {
+        this.nextPageNumber = nextPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#getPreviousPageNumber()
+     */
+    public Integer getPreviousPageNumber() {
+        return previousPageNumber;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see jp.sf.pal.admin.web.PagerPage#setPreviousPageNumber(java.lang.Integer)
+     */
+    public void setPreviousPageNumber(Integer previousPageNumber) {
+        this.previousPageNumber = previousPageNumber;
+    }
+
+}
\ No newline at end of file


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractPagerPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractTwoPagerPage.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractTwoPagerPage.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractTwoPagerPage.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.web;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public abstract class AbstractTwoPagerPage implements TwoPagerPage {
+    private Integer count1;
+
+    private Integer currentPageNumber1;
+
+    private Integer maxPageNumber1;
+
+    private Integer previousPageNumber1;
+
+    private Integer nextPageNumber1;
+
+    private Integer count2;
+
+    private Integer currentPageNumber2;
+
+    private Integer maxPageNumber2;
+
+    private Integer previousPageNumber2;
+
+    private Integer nextPageNumber2;
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getCount1()
+     */
+    public Integer getCount1() {
+        return count1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setCount1(java.lang.Integer)
+     */
+    public void setCount1(Integer count1) {
+        this.count1 = count1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getCount2()
+     */
+    public Integer getCount2() {
+        return count2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setCount2(java.lang.Integer)
+     */
+    public void setCount2(Integer count2) {
+        this.count2 = count2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getCurrentPageNumber1()
+     */
+    public Integer getCurrentPageNumber1() {
+        return currentPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setCurrentPageNumber1(java.lang.Integer)
+     */
+    public void setCurrentPageNumber1(Integer currentPageNumber1) {
+        this.currentPageNumber1 = currentPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getCurrentPageNumber2()
+     */
+    public Integer getCurrentPageNumber2() {
+        return currentPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setCurrentPageNumber2(java.lang.Integer)
+     */
+    public void setCurrentPageNumber2(Integer currentPageNumber2) {
+        this.currentPageNumber2 = currentPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getMaxPageNumber1()
+     */
+    public Integer getMaxPageNumber1() {
+        return maxPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setMaxPageNumber1(java.lang.Integer)
+     */
+    public void setMaxPageNumber1(Integer maxPageNumber1) {
+        this.maxPageNumber1 = maxPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getMaxPageNumber2()
+     */
+    public Integer getMaxPageNumber2() {
+        return maxPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setMaxPageNumber2(java.lang.Integer)
+     */
+    public void setMaxPageNumber2(Integer maxPageNumber2) {
+        this.maxPageNumber2 = maxPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getNextPageNumber1()
+     */
+    public Integer getNextPageNumber1() {
+        return nextPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setNextPageNumber1(java.lang.Integer)
+     */
+    public void setNextPageNumber1(Integer nextPageNumber1) {
+        this.nextPageNumber1 = nextPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getNextPageNumber2()
+     */
+    public Integer getNextPageNumber2() {
+        return nextPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setNextPageNumber2(java.lang.Integer)
+     */
+    public void setNextPageNumber2(Integer nextPageNumber2) {
+        this.nextPageNumber2 = nextPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getPreviousPageNumber1()
+     */
+    public Integer getPreviousPageNumber1() {
+        return previousPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setPreviousPageNumber1(java.lang.Integer)
+     */
+    public void setPreviousPageNumber1(Integer previousPageNumber1) {
+        this.previousPageNumber1 = previousPageNumber1;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#getPreviousPageNumber2()
+     */
+    public Integer getPreviousPageNumber2() {
+        return previousPageNumber2;
+    }
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.common.web.TwoPagerPage#setPreviousPageNumber2(java.lang.Integer)
+     */
+    public void setPreviousPageNumber2(Integer previousPageNumber2) {
+        this.previousPageNumber2 = previousPageNumber2;
+    }
+}


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/AbstractTwoPagerPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/PagerPage.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/PagerPage.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/PagerPage.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.web;
+
+public interface PagerPage {
+    public static final String PREVIOUS_PAGE_NUMBER = "previousPageNumber";
+
+    public static final String NEXT_PAGE_NUMBER = "nextPageNumber";
+
+    public abstract Integer getCount();
+
+    public abstract void setCount(Integer count);
+
+    public abstract Integer getCurrentPageNumber();
+
+    public abstract void setCurrentPageNumber(Integer currentPageNumber);
+
+    public abstract Integer getMaxPageNumber();
+
+    public abstract void setMaxPageNumber(Integer maxPageNumber);
+
+    public abstract Integer getNextPageNumber();
+
+    public abstract void setNextPageNumber(Integer nextPageNumber);
+
+    public abstract Integer getPreviousPageNumber();
+
+    public abstract void setPreviousPageNumber(Integer previousPageNumber);
+
+}
\ No newline at end of file


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/PagerPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/TwoPagerPage.java
===================================================================
--- libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/TwoPagerPage.java	2007-04-25 12:59:32 UTC (rev 84)
+++ libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/TwoPagerPage.java	2007-04-25 13:01:12 UTC (rev 85)
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 jp.sf.pal.common.web;
+
+/**
+ * @author shinsuke
+ * 
+ */
+public interface TwoPagerPage {
+    public static final String PREVIOUS_PAGE_NUMBER1 = "previousPageNumber1";
+
+    public static final String NEXT_PAGE_NUMBER1 = "nextPageNumber1";
+
+    public static final String PREVIOUS_PAGE_NUMBER2 = "previousPageNumber2";
+
+    public static final String NEXT_PAGE_NUMBER2 = "nextPageNumber2";
+
+    /**
+     * @return Returns the count1.
+     */
+    public abstract Integer getCount1();
+
+    /**
+     * @param count1
+     *            The count1 to set.
+     */
+    public abstract void setCount1(Integer count1);
+
+    /**
+     * @return Returns the count2.
+     */
+    public abstract Integer getCount2();
+
+    /**
+     * @param count2
+     *            The count2 to set.
+     */
+    public abstract void setCount2(Integer count2);
+
+    /**
+     * @return Returns the currentPageNumber1.
+     */
+    public abstract Integer getCurrentPageNumber1();
+
+    /**
+     * @param currentPageNumber1
+     *            The currentPageNumber1 to set.
+     */
+    public abstract void setCurrentPageNumber1(Integer currentPageNumber1);
+
+    /**
+     * @return Returns the currentPageNumber2.
+     */
+    public abstract Integer getCurrentPageNumber2();
+
+    /**
+     * @param currentPageNumber2
+     *            The currentPageNumber2 to set.
+     */
+    public abstract void setCurrentPageNumber2(Integer currentPageNumber2);
+
+    /**
+     * @return Returns the maxPageNumber1.
+     */
+    public abstract Integer getMaxPageNumber1();
+
+    /**
+     * @param maxPageNumber1
+     *            The maxPageNumber1 to set.
+     */
+    public abstract void setMaxPageNumber1(Integer maxPageNumber1);
+
+    /**
+     * @return Returns the maxPageNumber2.
+     */
+    public abstract Integer getMaxPageNumber2();
+
+    /**
+     * @param maxPageNumber2
+     *            The maxPageNumber2 to set.
+     */
+    public abstract void setMaxPageNumber2(Integer maxPageNumber2);
+
+    /**
+     * @return Returns the nextPageNumber1.
+     */
+    public abstract Integer getNextPageNumber1();
+
+    /**
+     * @param nextPageNumber1
+     *            The nextPageNumber1 to set.
+     */
+    public abstract void setNextPageNumber1(Integer nextPageNumber1);
+
+    /**
+     * @return Returns the nextPageNumber2.
+     */
+    public abstract Integer getNextPageNumber2();
+
+    /**
+     * @param nextPageNumber2
+     *            The nextPageNumber2 to set.
+     */
+    public abstract void setNextPageNumber2(Integer nextPageNumber2);
+
+    /**
+     * @return Returns the previousPageNumber1.
+     */
+    public abstract Integer getPreviousPageNumber1();
+
+    /**
+     * @param previousPageNumber1
+     *            The previousPageNumber1 to set.
+     */
+    public abstract void setPreviousPageNumber1(Integer previousPageNumber1);
+
+    /**
+     * @return Returns the previousPageNumber2.
+     */
+    public abstract Integer getPreviousPageNumber2();
+
+    /**
+     * @param previousPageNumber2
+     *            The previousPageNumber2 to set.
+     */
+    public abstract void setPreviousPageNumber2(Integer previousPageNumber2);
+
+}
\ No newline at end of file


Property changes on: libraries/common-utils/trunk/src/main/java/jp/sf/pal/common/web/TwoPagerPage.java
___________________________________________________________________
Name: svn:eol-style
   + native


pal-cvs メーリングリストの案内
Zurück zum Archiv-Index