jcs.xml.resultset
Class Do2Vector

java.lang.Object
  |
  +--jcs.xml.resultset.Do2Vector

public class Do2Vector
extends java.lang.Object
implements java.io.Serializable

A client command line shell to demonstrate uses of the ResultSetVector class.

See Also:
Serialized Form

Method Summary
static void main(java.lang.String[] args)
          Invokes the constructors and methods of the resultSetVector class from a client command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
Invokes the constructors and methods of the resultSetVector class from a client command line. The purpose of these calls is to demonstrate or test the resultSetVector class.

Usage:

  java jcsexec.Do2Vector  -I inFile  -O outFile

  java jcsexec.Do2Vector -Q query -S server -O outFile
  

For example, assume that emps.xml is a file containing an XML result set, as produced by RX.query2Xml or by ResultSetXml.

Example command line:

 
  java jcsexec.Do2Vector -I emps.xml  -O emps-vector-out.xml
  
  java jcsexec.Do2Vector -Q "select * from emps"      \
       -S "antibes:4000?user=sa" -O emps-vector-out2.xml
  

The first of these calls will translate the XML result set contained in emps.xml to a Java vector, and then copy that vector into file emps-vector-out.xml. The second call will translate the SQL result set from the given query (-Q) to a Java vector, and then coppy that vector into file emps-vector-out2.xml.

The parameter tags are as follows. For a detailed description of the query parameter, see the ResultSetVector constructur, which this command-line routine invokes. For a description of the server parameter, method jcs.mics.ExecSql.connectTo.

Depending on whether the file (-I) or query (-Q) parameter is supplied, the method will invoke the appropriate constructor method of the ResultSetVector class. The action of these methods is either:

Parameters:
args - a string array with the command line arguments