EMMA Coverage Report (generated Sun May 02 20:42:29 CEST 2010)
[all classes][hu.netmind.beankeeper.db]

COVERAGE SUMMARY FOR SOURCE FILE [Limits.java]

nameclass, %method, %block, %line, %
Limits.java100% (1/1)100% (9/9)100% (62/62)100% (16/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Limits100% (1/1)100% (9/9)100% (62/62)100% (16/16)
Limits (int, int, int): void 100% (1/1)100% (15/15)100% (5/5)
getLimit (): long 100% (1/1)100% (3/3)100% (1/1)
getOffset (): long 100% (1/1)100% (3/3)100% (1/1)
getSize (): long 100% (1/1)100% (3/3)100% (1/1)
isEmpty (): boolean 100% (1/1)100% (9/9)100% (1/1)
setLimit (long): void 100% (1/1)100% (4/4)100% (2/2)
setOffset (long): void 100% (1/1)100% (4/4)100% (2/2)
setSize (long): void 100% (1/1)100% (4/4)100% (2/2)
toString (): String 100% (1/1)100% (17/17)100% (1/1)

1/**
2 * Copyright (C) 2006 NetMind Consulting Bt.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18 
19package hu.netmind.beankeeper.db;
20 
21/**
22 * A simple object which holds limits to a selection.
23 * Offset means the index of first row returned after applying the 
24 * conditions and ordering. Limit means to return at most the given amount
25 * of rows. A limit of 0 means no limit.
26 * @author Brautigam Robert
27 * @version Revision: $Revision$
28 */
29public class Limits
30{
31   private long offset;
32   private long limit;
33   private long size;
34 
35   public Limits(int offset,int limit, int size)
36   {
37      setOffset(offset);
38      setLimit(limit);
39      setSize(size);
40   }
41 
42   public long getOffset()
43   {
44      return offset;
45   }
46   public void setOffset(long offset)
47   {
48      this.offset=offset;
49   }
50 
51   public long getLimit()
52   {
53      return limit;
54   }
55   public void setLimit(long limit)
56   {
57      this.limit=limit;
58   }
59 
60   public boolean isEmpty()
61   {
62      return (limit<=0);
63   }
64 
65   public long getSize()
66   {
67      return size;
68   }
69   public void setSize(long size)
70   {
71      this.size=size;
72   }
73 
74   public String toString()
75   {
76      return "[Limit: "+offset+"-"+limit+"]";
77   }
78}
79 
80 

[all classes][hu.netmind.beankeeper.db]
EMMA 2.0.5312debian (C) Vladimir Roubtsov