|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This specialization of Model
declares methods necessary to allow
generic manipulation of a dataset model. A dataset model is a model
that supports multiple discreet sets of data, such as records, database rows,
or a list of business object with specific properties.
Method Summary | |
void |
beforeFirst()
Moves the internal location iterator to a special position such that a call to next() will position the location at the first dataset (if
available). |
boolean |
first()
Moves the internal location iterator to the first available dataset. |
int |
getLocation()
Get the relative location of the current data within the dataset. |
int |
getLocationOffset()
Returns the offset of this dataset from some implementation- or context-dependent reference location. |
int |
getSize()
Return the number of available datasets. |
boolean |
last()
Moves the internal location iterator to the last available dataset. |
boolean |
next()
Moves the internal location iterator to the next available dataset |
boolean |
previous()
Moves the internal location iterator to the previous available dataset |
void |
setLocation(int location)
Set the relative location of the current dataset. |
void |
setSize(int value)
Sets the number of available datasets. |
Methods inherited from interface com.iplanet.jato.model.Model |
getName, getValue, getValues, setName, setValue, setValues |
Method Detail |
public int getSize() throws ModelControlException
ModelControlException
- Thrown if an error occurrs determining the number of datasetspublic void setSize(int value) throws ModelControlException
ModelControlException
- Thrown if an error occurrs setting the number of datasets. Not all
model control implementations will allow the number of datasets to
be directly changed.public int getLocationOffset() throws ModelControlException
first()
and
last()
locations--this information is informational only.ModelControlException
- Thrown if an error occurrs determining the location offset, or if the
notion of location offset is not supported. However, if the latter is
the case, implementors are encouraged instead to return a value
indicating the situation, such as zero or negative one (0 or -1).public int getLocation() throws ModelControlException
first()
method is called. In
addition, this method will typically return negative one (-1) after the
beforeFirst()
method is called.ModelControlException
- Thrown if an error occurrs determining the current location, or if
the current location is undefined. However, if the latter is
the case, implementors are encouraged instead to return a value
indicating this situation, like negative one (-1).public void setLocation(int location) throws ModelControlException
first()
method. Normally, a call to this method with a parameter of negative one (-1)
should be equivalent to calling the beforeFirst()
method. However,
neither of these situations are guaranteed depending on the implementation.ModelControlException
- Thrown if an error occurrs setting the current location. Not all model
control implementations support setting the current location.public void beforeFirst() throws ModelControlException
next()
will position the location at the first dataset (if
available). Normally, a call to getLocation()
after this method
is called should return negative one (-1).ModelControlException
- Thrown if an error occurrs setting the location to this special positionpublic boolean first() throws ModelControlException
getLocation()
after this method is called should return zero
(0). The offset of this dataset from some implementation- or context-dependent
reference location is given by getLocationOffset()
. However, this
control object is under no obligation or burden to allow setting the location to
obtain datasets outside of the "window" defined by the boundaries of the
first()
and last()
locations.ModelControlException
- Thrown if an error occurrs moving to the first datasetpublic boolean next() throws ModelControlException
ModelControlException
- Thrown if an error occurrs positioning at the next datasetpublic boolean previous() throws ModelControlException
ModelControlException
- Thrown if an error occurrs positioning at the previous datasetpublic boolean last() throws ModelControlException
getLocation()
after this method is called should return
getSize()-1
.ModelControlException
- Thrown if an error occurrs moving to the last dataset
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |