DLV
Class ODIJDBCPredicate

java.lang.Object
  extended byDLV.OutputDescriptorItem
      extended byDLV.ODIJDBCPredicate

public class ODIJDBCPredicate
extends OutputDescriptorItem

This class allows to specify that the output storage device is a database table. MultipleModel generation is not supported.

See Also:
OutputDescriptor, OutputDescriptorItem

Constructor Summary
ODIJDBCPredicate(java.sql.ResultSet rs)
          Builds an ODIJDBCPredicate, specifying output table by a java.sql.ResultSet.
ODIJDBCPredicate(java.sql.ResultSet rs, PredicateMetaData pmd)
          Builds an ODIJDBCPredicate, specifying output table by a java.sql.ResultSet and a PredicateMetaData.
ODIJDBCPredicate(java.lang.String name, java.sql.Statement st)
          Builds an ODIJDBCPredicate, specifying output table name.
 
Method Summary
 Predicate buildPredicate(java.lang.String name, int arity, Model m, int modelNumber)
           
 void flushAndClean()
           
 boolean[] getQuoted()
          Returns the specified array of boolean handling the quioted property for terms.
 boolean multipleModelAllowed()
          Returns true if this OutputDescriptorItem supports multiple model generation, false otherwise.
 void setQuoted(boolean[] quoted)
          Sets the quoted property of the JDBCPredicate.
 
Methods inherited from class DLV.OutputDescriptorItem
getReplace, setReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODIJDBCPredicate

public ODIJDBCPredicate(java.lang.String name,
                        java.sql.Statement st)
                 throws java.sql.SQLException
Builds an ODIJDBCPredicate, specifying output table name.

Parameters:
name - A database table name.
st - A valid java.sql.Statement object.

ODIJDBCPredicate

public ODIJDBCPredicate(java.sql.ResultSet rs)
Builds an ODIJDBCPredicate, specifying output table by a java.sql.ResultSet. Note that a ResultSet can be used as DVL output device if complies with

Parameters:
rs - A valid java.sql.ResultSet object.

ODIJDBCPredicate

public ODIJDBCPredicate(java.sql.ResultSet rs,
                        PredicateMetaData pmd)
Builds an ODIJDBCPredicate, specifying output table by a java.sql.ResultSet and a PredicateMetaData. Note that a ResultSet can be used as DVL output device if complies with

Parameters:
rs - A valid java.sql.ResultSet object.
pmd - A valid PredicateMetaData.
Method Detail

buildPredicate

public Predicate buildPredicate(java.lang.String name,
                                int arity,
                                Model m,
                                int modelNumber)
Specified by:
buildPredicate in class OutputDescriptorItem

setQuoted

public void setQuoted(boolean[] quoted)
Sets the quoted property of the JDBCPredicate.
If the i-th element of "quoted" is true the quoted property is set for the i-th term, if the i-th element of "quoted" is false the the quoted property is not set for the i-th term. "quoted" length must be lower than the arity of the built JDBCPredicate. let be qL the "quoted" length and Ar the arity than for each term i lower than qL the quoted property is applied following "quoted", for each term i lower than qL and lower than Ar quoted property is set to false.

Parameters:
quoted - An array of boolean.
See Also:
JDBCPredicate

getQuoted

public boolean[] getQuoted()
Returns the specified array of boolean handling the quioted property for terms.

See Also:
JDBCPredicate

multipleModelAllowed

public boolean multipleModelAllowed()
Description copied from class: OutputDescriptorItem
Returns true if this OutputDescriptorItem supports multiple model generation, false otherwise. Predicate and in most cases FilePredicate supports multiple models in output, but obviously JDBCPredicate does not allow to export more than one model.

Overrides:
multipleModelAllowed in class OutputDescriptorItem
Returns:
true if this OutputDescriptor supports multiple model generation, false otherwise.
See Also:
OutputDescriptorItem

flushAndClean

public void flushAndClean()
Specified by:
flushAndClean in class OutputDescriptorItem