ilog.views.util.data
Class IlvJDBCQueryParameters

java.lang.Object
  extended by ilog.views.util.data.IlvJDBCQueryParameters
Direct Known Subclasses:
IlvJDBCDataSource.QueryParameters

public class IlvJDBCQueryParameters
extends Object

A class that holds the parameters of an SQL query.

Since:
JViews 6.0

Constructor Summary
IlvJDBCQueryParameters(Element parentElement, Element queryElement)
          Creates query parameters from a DOM element.
IlvJDBCQueryParameters(String query, IlvJDBCConnectionParameters connection, IlvTableModelMapper mapper)
          Creates a new set of parameters for an SQL query.
 
Method Summary
static IlvJDBCQueryParameters deserialize(Element parentElement, Element queryElement)
          Loads query parameters from a DOM element.
 IlvJDBCConnectionParameters getConnection()
          Returns the database connection parameters.
 IlvTableModelMapper getMapper()
          Returns the table mapper used to map the results of the query to a Swing TableModel.
 String getQuery()
          Returns the SQL query string.
 Element serialize(Element element)
          Saves these query parameters to a DOM element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvJDBCQueryParameters

public IlvJDBCQueryParameters(String query,
                              IlvJDBCConnectionParameters connection,
                              IlvTableModelMapper mapper)
Creates a new set of parameters for an SQL query.

Parameters:
query - The SQL query string.
connection - The parameters of the database connection.
mapper - The table mapper used to map the results of the query to a Swing TableModel.

IlvJDBCQueryParameters

public IlvJDBCQueryParameters(Element parentElement,
                              Element queryElement)
                       throws Exception
Creates query parameters from a DOM element.

Parameters:
parentElement - The DOM element to where the connection parameters where saved (that is, the element parameters that was passed to serialize(org.w3c.dom.Element) when the query parameters were saved).
queryElement - The DOM element to read the query parameters from.
Throws:
Exception - If an error occurred while loading the parameters.
Method Detail

getQuery

public final String getQuery()
Returns the SQL query string.


getConnection

public final IlvJDBCConnectionParameters getConnection()
Returns the database connection parameters.


getMapper

public final IlvTableModelMapper getMapper()
Returns the table mapper used to map the results of the query to a Swing TableModel.


serialize

public Element serialize(Element element)
Saves these query parameters to a DOM element.

Parameters:
element - The DOM element to save to.
Returns:
The new sub-element that represents the query parameters.

deserialize

public static IlvJDBCQueryParameters deserialize(Element parentElement,
                                                 Element queryElement)
                                          throws Exception
Loads query parameters from a DOM element.

Parameters:
parentElement - The DOM element to where the connection parameters where saved (that is, the element parameters that was passed to serialize(org.w3c.dom.Element) when the query parameters were saved).
queryElement - The DOM element to read the query parameters from.
Throws:
Exception - If an error occurred while loading the parameters.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.