OSDN Git Service

6bf2bc4424ae142642c3746f71896669af8bb1af
[ea2ddl/ea2ddl.git] / ea2ddl-gen / dbflute / templates / om / java / allcommon / cbean / PagingBean.vm
1 ${database.allClassCopyright}package ${glPackageBaseCommonCBean};\r
2 \r
3 /**\r
4  * The bean of paging.\r
5  * @author ${database.ClassAuthor}\r
6  */\r
7 public interface ${glPagingBeanInterfaceName} extends ${glFetchNarrowingBeanInterfaceName}, ${glOrderByBeanInterfaceName} {\r
8 \r
9     // ===================================================================================\r
10     //                                                                Paging Determination\r
11     //                                                                ====================\r
12     // * * * * * * * *\r
13     // For SQL Comment\r
14     // * * * * * * * *\r
15     /**\r
16      * Is the execution for paging(NOT count)?\r
17      * @return Determination.\r
18      */\r
19     public boolean isPaging();\r
20 \r
21     // * * * * * * * *\r
22     // For Framework\r
23     // * * * * * * * *\r
24     /**\r
25      * Is the count executed later?\r
26      * @return Determination.\r
27      */\r
28     public boolean isCountLater();\r
29 \r
30     // ===================================================================================\r
31     //                                                                      Paging Setting\r
32     //                                                                      ==============\r
33     /**\r
34      * Set up paging resources.\r
35          * @param pageSize The page size per one page. (NotMinus & NotZero)\r
36          * @param pageNumber The number of page. It's ONE origin. (NotMinus & NotZero: If it's minus or zero, it treats as one.)\r
37      */\r
38     public void paging(int pageSize, int pageNumber);\r
39 \r
40     /**\r
41      * Set whether the execution for paging(NOT count). {INTERNAL METHOD}\r
42      * @param paging Determination.\r
43      */\r
44     public void xsetPaging(boolean paging);\r
45 \r
46     // ===================================================================================\r
47     //                                                                       Fetch Setting\r
48     //                                                                       =============\r
49     /**\r
50      * Fetch first. <br />\r
51      * If you invoke this, your SQL returns [fetch-size] records from first.\r
52      * @param fetchSize The size of fetch. (NotMinus & NotZero)\r
53      * @return this. (NotNull)\r
54      */\r
55     public ${glPagingBeanInterfaceName} fetchFirst(int fetchSize);\r
56 \r
57     /**\r
58      * Fetch scope. <br />\r
59      * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index].\r
60      * @param fetchStartIndex The start index of fetch. 0 origin. (NotMinus)\r
61      * @param fetchSize The size of fetch. (NotMinus & NotZero)\r
62      * @return this. (NotNull)\r
63      */\r
64     public ${glPagingBeanInterfaceName} fetchScope(int fetchStartIndex, int fetchSize);\r
65 \r
66     /**\r
67      * Fetch page. <br />\r
68      * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. <br />\r
69      * But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. <br />\r
70      * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number].\r
71      * @param fetchPageNumber The page number of fetch. 1 origin. (NotMinus & NotZero: If minus or zero, set one.)\r
72      * @return this. (NotNull)\r
73      */\r
74     public ${glPagingBeanInterfaceName} fetchPage(int fetchPageNumber);\r
75 \r
76     // ===================================================================================\r
77     //                                                                      Fetch Property\r
78     //                                                                      ==============\r
79     /**\r
80      * Get fetch-start-index.\r
81      * @return Fetch-start-index.\r
82      */\r
83     public int getFetchStartIndex();\r
84 \r
85     /**\r
86      * Get fetch-size.\r
87      * @return Fetch-size.\r
88      */\r
89     public int getFetchSize();\r
90 \r
91     /**\r
92      * Get fetch-page-number.\r
93      * @return Fetch-page-number.\r
94      */\r
95     public int getFetchPageNumber();\r
96 \r
97     /**\r
98      * Get page start index.\r
99      * @return Page start index. 0 origin. (NotMinus)\r
100      */\r
101     public int getPageStartIndex();\r
102 \r
103     /**\r
104      * Get page end index.\r
105      * @return Page end index. 0 origin. (NotMinus)\r
106      */\r
107     public int getPageEndIndex();\r
108 \r
109     /**\r
110      * Is fetch scope effective?\r
111      * @return Determination.\r
112      */\r
113     public boolean isFetchScopeEffective();\r
114 \r
115     // ===================================================================================\r
116     //                                                                       Hint Property\r
117     //                                                                       =============\r
118     // * * * * * * * *\r
119     // For SQL Comment\r
120     // * * * * * * * *\r
121     /**\r
122      * Get select-hint. {select [select-hint] * from table...}\r
123      * @return Select-hint. (NotNull)\r
124      */\r
125     public String getSelectHint();\r
126 \r
127     /**\r
128      * Get from-hint. {select * from table [from-hint] where ...}\r
129      * @return From-hint. (NotNull)\r
130      */\r
131     public String getFromHint();\r
132 \r
133     /**\r
134      * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]}\r
135      * @return Sql-suffix. (NotNull)\r
136      */\r
137     public String getSqlSuffix();\r
138 }\r