Package com.netrics.likeit
Class NetricsTableCursorRecSrc
- java.lang.Object
-
- com.netrics.likeit.NetricsTableCursorRecSrc
-
- All Implemented Interfaces:
NetricsBaseRecSrc,NetricsRecSrc
public class NetricsTableCursorRecSrc extends java.lang.Object implements NetricsRecSrc
Implements theNetricsRecSrcinterface by binding aNetricsTableCursorto a particular ibi™ Patterns - Search server.
-
-
Constructor Summary
Constructors Constructor Description NetricsTableCursorRecSrc(NetricsTableCursor cursor, NetricsServerInterface host)Create a NetricsTableCursorRecSrc instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetCount()Get the count of records that have been retrieved from the record source.NetricsRecordgetNext()Returns the next record.java.lang.StringgetPosition()Obtains the current position of the underlying cursor.booleanhasNext()True if getNext will return a record.voidreset()Resets the underlying cursor to the beginning.voidsetPosition(java.lang.String position)Reposition the underlying cursor.
-
-
-
Constructor Detail
-
NetricsTableCursorRecSrc
public NetricsTableCursorRecSrc(NetricsTableCursor cursor, NetricsServerInterface host)
Create a NetricsTableCursorRecSrc instance.- Parameters:
cursor- cursor underlying the record source.host- the cursor will traverse table(s) on this host.
-
-
Method Detail
-
hasNext
public boolean hasNext() throws NetricsRecSrcExceptionDescription copied from interface:NetricsBaseRecSrcTrue if getNext will return a record.- Specified by:
hasNextin interfaceNetricsBaseRecSrc- Returns:
- True if there is another record, false otherwise
- Throws:
NetricsRecSrcException- if an error occurs.
-
getNext
public NetricsRecord getNext() throws NetricsRecSrcException
Description copied from interface:NetricsRecSrcReturns the next record. This restricts the record returned to a single table record.- Specified by:
getNextin interfaceNetricsBaseRecSrc- Specified by:
getNextin interfaceNetricsRecSrc- Returns:
- the next record
- Throws:
NetricsRecSrcException- if an error occurs, or if there are no more records.
-
reset
public void reset()
Resets the underlying cursor to the beginning.- Specified by:
resetin interfaceNetricsBaseRecSrc
-
getCount
public java.lang.Integer getCount()
Description copied from interface:NetricsBaseRecSrcGet the count of records that have been retrieved from the record source.
Sources that don't support a count will return null.- Specified by:
getCountin interfaceNetricsBaseRecSrc- Returns:
- The number of records that have been retrieved from the record source.
-
getPosition
public java.lang.String getPosition()
Obtains the current position of the underlying cursor. This position may be used to later set the cursor position usingsetPosition(java.lang.String).- Returns:
- the current position of the underlying cursor.
-
setPosition
public void setPosition(java.lang.String position)
Reposition the underlying cursor.- Parameters:
position- a cursor position. This should be a value returned bygetPosition()
-
-