blob: e7c2e93c0084ffc983b5cb1a185e878d932fbaa5 (
plain) (
blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*******************************************************************************
* Copyright (c) 2001, 2008 Oracle Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Oracle Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsf.common.runtime.internal.model.bean;
import java.io.Serializable;
/**
* Design time analog of runtime DataModel bean
*
* @author cbateman
*
*/
public class DataModelInfo implements Serializable
{
/**
* serializable id
*/
private static final long serialVersionUID = 6461056497382677871L;
private final boolean _rowAvailable;
private final int _rowCount;
private final SerializableObject _rowData;
private final int _rowIndex;
private final SerializableObject _wrappedData;
/**
* @param rowAvailable
* @param rowCount
* @param rowData
* @param rowIndex
* @param wrappedData
*/
public DataModelInfo(boolean rowAvailable, int rowCount, Object rowData,
int rowIndex, Object wrappedData) {
super();
_rowAvailable = rowAvailable;
_rowCount = rowCount;
_rowData = new SerializableObject(rowData);
_rowIndex = rowIndex;
_wrappedData = new SerializableObject(wrappedData);
}
/**
* @return true if the current row is available
*/
public final boolean isRowAvailable() {
return _rowAvailable;
}
/**
* @return the row count of this model
*/
public final int getRowCount() {
return _rowCount;
}
/**
* @return the row data
*/
public final Object getRowData() {
return _rowData.getMaybeSerializable();
}
/**
* @return the row index
*/
public final int getRowIndex() {
return _rowIndex;
}
/**
* @return the wrapped data. may be null if wrapped object was not
* serializable.
*/
public final Object getWrappedData() {
return _wrappedData.getMaybeSerializable();
}
}
|