Holger's
Java API

com.antelmann.sql
Class SQLValueRetriever

java.lang.Object
  extended by com.antelmann.sql.SQLValueRetriever
All Implemented Interfaces:
ValueRetriever<Object>, Serializable

public class SQLValueRetriever
extends Object
implements ValueRetriever<Object>, Serializable

allows to specify a serializable retriever for obtaining a value from a database. A new connection is created on each call to getRelevantValue() and closed thereafter.

Since:
01.01.2015, 03:05:21
Author:
holger
See Also:
Serialized Form

Constructor Summary
SQLValueRetriever(ConnectorSettings conSettings, String table, String idColumn, String idValue, String valueColumn)
           
 
Method Summary
 boolean equals(Object obj)
           
 ConnectorSettings getConnectorSettings()
           
 String getIdColumn()
           
 String getIdValue()
           
 Object getRelevantValue()
          returns the relevant value for this instance at the time of calling
 String getTable()
           
 String getValueColumn()
           
 int hashCode()
           
 void setConnectorSettings(ConnectorSettings conSettings)
           
 void setIdColumn(String idColumn)
           
 void setIdValue(String idValue)
           
 void setTable(String table)
           
 void setValueColumn(String valueColumn)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLValueRetriever

public SQLValueRetriever(ConnectorSettings conSettings,
                         String table,
                         String idColumn,
                         String idValue,
                         String valueColumn)
Method Detail

getConnectorSettings

public ConnectorSettings getConnectorSettings()

setConnectorSettings

public void setConnectorSettings(ConnectorSettings conSettings)

getTable

public String getTable()

setTable

public void setTable(String table)

getIdColumn

public String getIdColumn()

setIdColumn

public void setIdColumn(String idColumn)

getIdValue

public String getIdValue()

setIdValue

public void setIdValue(String idValue)

getValueColumn

public String getValueColumn()

setValueColumn

public void setValueColumn(String valueColumn)

getRelevantValue

public Object getRelevantValue()
                        throws IOException
Description copied from interface: ValueRetriever
returns the relevant value for this instance at the time of calling

Specified by:
getRelevantValue in interface ValueRetriever<Object>
Throws:
IOException - if any resource to fulfill the request is not accessible

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads