forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRowSelection.cs
66 lines (59 loc) · 1.54 KB
/
RowSelection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
namespace NHibernate.Engine
{
/// <summary>
/// Information to determine how to run an IDbCommand and what
/// records to return from the IDataReader.
/// </summary>
[Serializable]
public sealed class RowSelection
{
/// <summary>
/// Indicates that the no value has been set on the Property.
/// </summary>
public static readonly int NoValue = -1;
private int firstRow = NoValue;
private int maxRows = NoValue;
private int timeout = NoValue;
private int fetchSize = NoValue;
/// <summary>
/// Gets or Sets the Index of the First Row to Select
/// </summary>
/// <value>The Index of the First Rows to Select</value>
/// <remarks>Defaults to 0 unless specifically set.</remarks>
public int FirstRow
{
get { return firstRow; }
set { firstRow = value; }
}
/// <summary>
/// Gets or Sets the Maximum Number of Rows to Select
/// </summary>
/// <value>The Maximum Number of Rows to Select</value>
/// <remarks>Defaults to NoValue unless specifically set.</remarks>
public int MaxRows
{
get { return maxRows; }
set { maxRows = value; }
}
/// <summary>
/// Gets or Sets the Timeout of the Query
/// </summary>
/// <value>The Query Timeout</value>
/// <remarks>Defaults to NoValue unless specifically set.</remarks>
public int Timeout
{
get { return timeout; }
set { timeout = value; }
}
public int FetchSize
{
get { return fetchSize; }
set { fetchSize = value; }
}
public bool DefinesLimits
{
get { return maxRows != NoValue || firstRow > 0; }
}
}
}