public interface LookupTable
getName()
method. The lookup table implementation can be used to retrieve an output value
identified by column name getOutputColumnName()
by looking up provided input values which are identified by
column names getInputColumnNames()
. The order of input values for lookup(Object...)
method must
match the order of column names returned by getInputColumnNames()
method.
A sample implementation of this interface is shown in GDPLookupTable.java which returns a GDP number corresponding to two inputs, Country and State by querying a database table. This implementation needs to be in the classpath of ADAPA library along with any necessary dependencies and it can be integrated into ADAPA by using a Spring configuration file as described in applicationContext.xml. All necessary dependencies are listed in dependencies.xml.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookUpNullValues()
Indicate if the table can be used to look up null values.
|
Class<?> |
getColumnClass(String columnName)
Returns the class of values for an input or the output column.
|
List<String> |
getInputColumnNames()
Get the names of the input columns.
|
String |
getName()
Get the name of the lookup table.
|
String |
getOutputColumnName()
Get the name of the output column.
|
Object |
lookup(Object... inputs)
Return the output value corresponding to the provided input values.
|
String getName()
String getOutputColumnName()
List<String> getInputColumnNames()
lookup(Object...)
method.Class<?> getColumnClass(String columnName)
columnName
- the name of the columnObject lookup(Object... inputs)
inputs
- the input valuesboolean canLookUpNullValues()
true
if the table can look up null valuesCopyright © 2005–2017 Zementis, Inc.. All rights reserved.