gr.uoa.di.madgik.searchlibrary.operatorlibrary.extjdbc
Class JdbcOp

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.extjdbc.JdbcOp

public class JdbcOp
extends Object

Operator class used to perform an external search to a jdbc database creating a org.gcube.searchservice.searchlibrary.resultset.ResultSet with the produced results

Author:
UoA

Field Summary
static String ObjectIdFieldNameDef
          The default name for the Field of the object id
static String PayloadFieldNameDef
          The default name for the Field of the payload
 
Constructor Summary
JdbcOp(long timeout, TimeUnit timeUnit, StatsContainer stats)
          Creates a new JdbcOp with the default field names for object id and payload
JdbcOp(StatsContainer stats)
          Creates a new JdbcOp ith the default timeout and the default field names for object id and payload
JdbcOp(String objectIdFieldName, String payloadFieldName, long timeout, TimeUnit timeUnit, StatsContainer stats)
          Creates a new JdbcOp with configurable timeout and field names for object id and payload
 
Method Summary
 URI compute(String query)
          Perform the external search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ObjectIdFieldNameDef

public static String ObjectIdFieldNameDef
The default name for the Field of the object id


PayloadFieldNameDef

public static String PayloadFieldNameDef
The default name for the Field of the payload

Constructor Detail

JdbcOp

public JdbcOp(StatsContainer stats)
Creates a new JdbcOp ith the default timeout and the default field names for object id and payload

Parameters:
stats - statistics

JdbcOp

public JdbcOp(long timeout,
              TimeUnit timeUnit,
              StatsContainer stats)
Creates a new JdbcOp with the default field names for object id and payload

Parameters:
timeUnit - The time unit of the timeout
stats - Statistics

JdbcOp

public JdbcOp(String objectIdFieldName,
              String payloadFieldName,
              long timeout,
              TimeUnit timeUnit,
              StatsContainer stats)
Creates a new JdbcOp with configurable timeout and field names for object id and payload

Parameters:
objectIdFieldName - The name of the Field which will hold the object id
payloadFieldName - The name of the Field which will hold the payload
timeout - The timeout which will be used by the writer
timeUnit - The time unit of the timeout
stats - Statistics
Method Detail

compute

public URI compute(String query)
            throws Exception
Perform the external search

Parameters:
query - The query string
Returns:
The locator of the output
Throws:
Exception - An unrecoverable for the operation error occured


Copyright © 2013. All Rights Reserved.