Package com.tibco.patterns.learn.recpair
Class RLinkServerInterface
- java.lang.Object
-
- com.tibco.patterns.learn.recpair.RLinkServerInterface
-
public final class RLinkServerInterface extends java.lang.ObjectProvides more convenient communication with the Patterns server in situations that are frequently used in record pair scoring for Learn.
-
-
Constructor Summary
Constructors Constructor Description RLinkServerInterface(com.netrics.likeit.NetricsServerInterface netricsSI)Constructs RLinkServerInterface object that wraps the given object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getFieldValues(java.lang.String table, java.lang.String key)com.netrics.likeit.NetricsServerInterfacensi()Returns the server interface object to be used for all standard server methods.java.util.List<com.netrics.likeit.NetricsSearchResult>searchForRecord(com.netrics.likeit.NetricsSearchCfg tblCfg, com.netrics.likeit.NetricsSearchOpts opts)Searches for a given record in a single table.booleantblExists(java.lang.String table)Checks if a table exists on the server.voidtblSafeDelete(java.lang.String table)Deletes a table if it exists on the server, otherwise does nothing.
-
-
-
Method Detail
-
nsi
public com.netrics.likeit.NetricsServerInterface nsi()
Returns the server interface object to be used for all standard server methods.- Returns:
- the internal NetricsServerInterface object.
-
tblExists
public boolean tblExists(java.lang.String table) throws com.netrics.likeit.NetricsException, java.io.IOExceptionChecks if a table exists on the server.- Parameters:
table- - the name of a table on the server.- Returns:
- true if the specified table exists on the server.
- Throws:
com.netrics.likeit.NetricsException- - errors on the serverjava.io.IOException- if I/O error occurs while communicating with server
-
tblSafeDelete
public void tblSafeDelete(java.lang.String table) throws com.netrics.likeit.NetricsException, java.io.IOExceptionDeletes a table if it exists on the server, otherwise does nothing.- Parameters:
table- - the name of a table on the server.- Throws:
com.netrics.likeit.NetricsException- if the server indicates that an error has occured (Possible errors - EXPECTTBLDESC, NOTBLDESC, NOSYSINIT)java.io.IOException- if an I/O error occurs while communicating with server
-
getFieldValues
public java.util.List<java.lang.String> getFieldValues(java.lang.String table, java.lang.String key) throws java.io.IOException, com.netrics.likeit.NetricsException- Parameters:
table- - the name of the table on the server.key- - the key of a record in the table.- Returns:
- field values for the record specified by the key.
- Throws:
com.netrics.likeit.NetricsException- if the server indicates that an error has occuredjava.io.IOException- if an I/O error occurs while communicating with server
-
searchForRecord
public java.util.List<com.netrics.likeit.NetricsSearchResult> searchForRecord(com.netrics.likeit.NetricsSearchCfg tblCfg, com.netrics.likeit.NetricsSearchOpts opts) throws com.netrics.likeit.NetricsException, java.io.IOExceptionSearches for a given record in a single table.- Parameters:
tblCfg- - search configuration for the table which will be searchedopts- - configuration object for the overall search- Returns:
- the search results (a fixed size list). If the input record has all blank field values that are queried by Simple/Cognate querylets, returns an empty list instead of throwing an exception.
- Throws:
com.netrics.likeit.NetricsException- If the server indicates that an error has occuredjava.io.IOException- If an I/O error occurs- See Also:
NetricsServerInterface.search(NetricsSearchCfg[],NetricsSearchOpts)
-
-