Package com.netrics.likeit
Class NetricsTableCursorCompoundRecSrc
- java.lang.Object
-
- com.netrics.likeit.NetricsTableCursorCompoundRecSrc
-
- All Implemented Interfaces:
NetricsBaseRecSrc,NetricsCompoundRecSrc
public class NetricsTableCursorCompoundRecSrc extends java.lang.Object implements NetricsCompoundRecSrc
Implements theNetricsCompoundRecSrcinterface by binding aNetricsTableCursorto a particular TIBCO® Patterns - Search server.
-
-
Constructor Summary
Constructors Constructor Description NetricsTableCursorCompoundRecSrc(NetricsTableCursor cursor, NetricsServerInterface host)Create a NetricsTableCursorCompoundRecSrc instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getChildTables()Get an unmodifiable list of child table names used.NetricsCompoundRecordgetNext()Returns the next record.java.lang.StringgetParentTable()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
-
NetricsTableCursorCompoundRecSrc
public NetricsTableCursorCompoundRecSrc(NetricsTableCursor cursor, NetricsServerInterface host)
Create a NetricsTableCursorCompoundRecSrc 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 NetricsCompoundRecord getNext() throws NetricsRecSrcException
Description copied from interface:NetricsCompoundRecSrcReturns the next record. We restrict the return value to NetricsCompoundRecord instead of the base NetricsBaseRecord.- Specified by:
getNextin interfaceNetricsBaseRecSrc- Specified by:
getNextin interfaceNetricsCompoundRecSrc- 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
-
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()
-
getParentTable
public java.lang.String getParentTable()
- Specified by:
getParentTablein interfaceNetricsCompoundRecSrc- Returns:
- the parent/primary table name for the compound record.
-
getChildTables
public java.util.List<java.lang.String> getChildTables()
Get an unmodifiable list of child table names used. This list represents all possible child tables. A particular compound record returned may not contain child records for all of these tables.- Specified by:
getChildTablesin interfaceNetricsCompoundRecSrc- Returns:
- the list of child table names.
Returns null if- (a) the underlying cursor has not has a list of child tables set via
NetricsTableCursor.setChildTables(java.lang.String[]), and - (b) the first batch of records has not been retrieved from the underlying cursor.
- (a) the underlying cursor has not has a list of child tables set via
-
-