File:  [Repository] / FM2SQL / doc / javadoc / DBBean.html
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon Oct 2 19:47:23 2006 UTC (18 years, 9 months ago) by casties
Branches: MAIN
CVS tags: HEAD
- reorganisation of project files
- fixed bug with initialisation of fm8 jdbc driver

    1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
    2: <!--NewPage-->
    3: <HTML>
    4: <HEAD>
    5: <!-- Generated by javadoc on Fri Jul 25 10:50:41 CEST 2003 -->
    6: <TITLE>
    7: : Class  DBBean
    8: </TITLE>
    9: <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
   10: </HEAD>
   11: <BODY BGCOLOR="white">
   12: 
   13: <!-- ========== START OF NAVBAR ========== -->
   14: <A NAME="navbar_top"><!-- --></A>
   15: <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
   16: <TR>
   17: <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
   18: <A NAME="navbar_top_firstrow"><!-- --></A>
   19: <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
   20:   <TR ALIGN="center" VALIGN="top">
   21:   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
   22:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   23:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
   24:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
   25:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
   26:   </TR>
   27: </TABLE>
   28: </TD>
   29: <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
   30: </EM>
   31: </TD>
   32: </TR>
   33: 
   34: <TR>
   35: <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   36: &nbsp;PREV CLASS&nbsp;
   37: &nbsp;<A HREF="DBFront.html"><B>NEXT CLASS</B></A></FONT></TD>
   38: <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   39:   <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
   40: &nbsp;<A HREF="DBBean.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
   41: </TR>
   42: <TR>
   43: <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
   44:   SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
   45: <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
   46: DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
   47: </TR>
   48: </TABLE>
   49: <!-- =========== END OF NAVBAR =========== -->
   50: 
   51: <HR>
   52: <!-- ======== START OF CLASS DATA ======== -->
   53: <H2>
   54: Class  DBBean</H2>
   55: <PRE>
   56: java.lang.Object
   57:   |
   58:   +--<B>DBBean</B>
   59: </PRE>
   60: <HR>
   61: <DL>
   62: <DT>public class <B>DBBean</B><DT>extends java.lang.Object</DL>
   63: 
   64: <P>
   65: DBBean - Database bean
   66: 
   67: <p> a Javabean  to perform queries on a JDBC Database, 
   68:  or excute any other SQL statement
   69:  </p>
   70:  <p>
   71:  Usage:  
   72:  <pre>
   73:    DBean bean = new DBBean();
   74:  // setting user and passwd 
   75:   bean.setUserAndPasswd("bla","bla");
   76:   try 
   77:   {
   78:     bean.setConnection("jdbc:fmpro:http://localhost");
   79:     Vector names=bean.getTableNames();
   80:     Vector[] result=bean.getQueryData(names.get(0).toString());
   81:   // print results to screen
   82:      for(int i=0;i&lt;result[1].size();++i)
   83:      {
   84:        //print Header
   85:        System.out.print(" "+result[1].get(i));
   86:      }
   87:   System.out.println();
   88:   for(int j=0;j&lt;result[0].size();++j)
   89:   {
   90:      Vector row=(Vector)result[0].get(j);
   91:      //print rows
   92:      for(int k=0;k&lt;row.size();++k)
   93:      System.out.print(" "+row.get(k));
   94:      System.out.println();
   95:   }
   96:  } catch(Exception e) 
   97:    {
   98:      System.out.println("Error while connecting to database"+ e);
   99:    }
  100:  </pre>
  101: 
  102:  </p>
  103: <P>
  104: <HR>
  105: 
  106: <P>
  107: <!-- ======== INNER CLASS SUMMARY ======== -->
  108: 
  109: 
  110: <!-- =========== FIELD SUMMARY =========== -->
  111: 
  112: <A NAME="field_summary"><!-- --></A>
  113: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  114: <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  115: <TD COLSPAN=2><FONT SIZE="+2">
  116: <B>Field Summary</B></FONT></TD>
  117: </TR>
  118: <TR BGCOLOR="white" CLASS="TableRowColor">
  119: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  120: <CODE>&nbsp;int</CODE></FONT></TD>
  121: <TD><CODE><B><A HREF="DBBean.html#maxHits">maxHits</A></B></CODE>
  122: 
  123: <BR>
  124: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  125: </TR>
  126: </TABLE>
  127: &nbsp;
  128: <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  129: 
  130: <A NAME="constructor_summary"><!-- --></A>
  131: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  132: <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  133: <TD COLSPAN=2><FONT SIZE="+2">
  134: <B>Constructor Summary</B></FONT></TD>
  135: </TR>
  136: <TR BGCOLOR="white" CLASS="TableRowColor">
  137: <TD><CODE><B><A HREF="DBBean.html#DBBean()">DBBean</A></B>()</CODE>
  138: 
  139: <BR>
  140: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a database bean</TD>
  141: </TR>
  142: <TR BGCOLOR="white" CLASS="TableRowColor">
  143: <TD><CODE><B><A HREF="DBBean.html#DBBean(java.lang.String)">DBBean</A></B>(java.lang.String&nbsp;jdbcConnectionURL)</CODE>
  144: 
  145: <BR>
  146: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a database bean
  147:  and tries to connect to database 
  148: specified in the jdbcConnectionURL</TD>
  149: </TR>
  150: </TABLE>
  151: &nbsp;
  152: <!-- ========== METHOD SUMMARY =========== -->
  153: 
  154: <A NAME="method_summary"><!-- --></A>
  155: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  156: <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  157: <TD COLSPAN=2><FONT SIZE="+2">
  158: <B>Method Summary</B></FONT></TD>
  159: </TR>
  160: <TR BGCOLOR="white" CLASS="TableRowColor">
  161: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  162: <CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
  163: <TD><CODE><B><A HREF="DBBean.html#getColumnNames()">getColumnNames</A></B>()</CODE>
  164: 
  165: <BR>
  166: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  167: </TR>
  168: <TR BGCOLOR="white" CLASS="TableRowColor">
  169: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  170: <CODE>&nbsp;java.sql.Connection</CODE></FONT></TD>
  171: <TD><CODE><B><A HREF="DBBean.html#getConnection()">getConnection</A></B>()</CODE>
  172: 
  173: <BR>
  174: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns the Connection if null creates a new one from the url property.</TD>
  175: </TR>
  176: <TR BGCOLOR="white" CLASS="TableRowColor">
  177: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  178: <CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
  179: <TD><CODE><B><A HREF="DBBean.html#getLayoutNames(java.lang.String)">getLayoutNames</A></B>(java.lang.String&nbsp;tableName)</CODE>
  180: 
  181: <BR>
  182: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns a Vector containing the layoutNames for the specified Table
  183:  if the database supports this otherwise Vector containing an empty String</TD>
  184: </TR>
  185: <TR BGCOLOR="white" CLASS="TableRowColor">
  186: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  187: <CODE>&nbsp;int</CODE></FONT></TD>
  188: <TD><CODE><B><A HREF="DBBean.html#getMaxHits()">getMaxHits</A></B>()</CODE>
  189: 
  190: <BR>
  191: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gets the maximum number of hits</TD>
  192: </TR>
  193: <TR BGCOLOR="white" CLASS="TableRowColor">
  194: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  195: <CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
  196: <TD><CODE><B><A HREF="DBBean.html#getNextRow()">getNextRow</A></B>()</CODE>
  197: 
  198: <BR>
  199: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  200: </TR>
  201: <TR BGCOLOR="white" CLASS="TableRowColor">
  202: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  203: <CODE>&nbsp;java.util.Vector[]</CODE></FONT></TD>
  204: <TD><CODE><B><A HREF="DBBean.html#getQueryData(java.lang.String)">getQueryData</A></B>(java.lang.String&nbsp;table)</CODE>
  205: 
  206: <BR>
  207: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the result for select * from table 
  208:    with maxHits = 500 default value</TD>
  209: </TR>
  210: <TR BGCOLOR="white" CLASS="TableRowColor">
  211: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  212: <CODE>&nbsp;java.util.Vector[]</CODE></FONT></TD>
  213: <TD><CODE><B><A HREF="DBBean.html#getQueryData(java.lang.String, int)">getQueryData</A></B>(java.lang.String&nbsp;query,
  214:              int&nbsp;maxHits)</CODE>
  215: 
  216: <BR>
  217: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the result of the query
  218:     or an Vector array of Vectors containing error messages</TD>
  219: </TR>
  220: <TR BGCOLOR="white" CLASS="TableRowColor">
  221: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  222: <CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
  223: <TD><CODE><B><A HREF="DBBean.html#getTableNames()">getTableNames</A></B>()</CODE>
  224: 
  225: <BR>
  226: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns a Vector containing the Tablenames or an error message in the Vector</TD>
  227: </TR>
  228: <TR BGCOLOR="white" CLASS="TableRowColor">
  229: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  230: <CODE>&nbsp;java.sql.ResultSet</CODE></FONT></TD>
  231: <TD><CODE><B><A HREF="DBBean.html#makeQuery(java.lang.String, int)">makeQuery</A></B>(java.lang.String&nbsp;query,
  232:           int&nbsp;numberOfHits)</CODE>
  233: 
  234: <BR>
  235: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;makes the database Query 
  236:    with the numberOfHits as maximum</TD>
  237: </TR>
  238: <TR BGCOLOR="white" CLASS="TableRowColor">
  239: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  240: <CODE>&nbsp;void</CODE></FONT></TD>
  241: <TD><CODE><B><A HREF="DBBean.html#setConnection(java.lang.String)">setConnection</A></B>(java.lang.String&nbsp;url)</CODE>
  242: 
  243: <BR>
  244: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the connection of this DBBean to the database specified in the url
  245:   property</TD>
  246: </TR>
  247: <TR BGCOLOR="white" CLASS="TableRowColor">
  248: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  249: <CODE>&nbsp;void</CODE></FONT></TD>
  250: <TD><CODE><B><A HREF="DBBean.html#setConnection(java.lang.String, java.lang.String, java.lang.String)">setConnection</A></B>(java.lang.String&nbsp;url,
  251:               java.lang.String&nbsp;user,
  252:               java.lang.String&nbsp;passwd)</CODE>
  253: 
  254: <BR>
  255: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the connection of this DBBean to the database specified in the url
  256:  and the url,user and passwd property of this DBBean instance</TD>
  257: </TR>
  258: <TR BGCOLOR="white" CLASS="TableRowColor">
  259: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  260: <CODE>&nbsp;void</CODE></FONT></TD>
  261: <TD><CODE><B><A HREF="DBBean.html#setMaxHits(int)">setMaxHits</A></B>(int&nbsp;maxHits)</CODE>
  262: 
  263: <BR>
  264: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the maximum number of hits</TD>
  265: </TR>
  266: <TR BGCOLOR="white" CLASS="TableRowColor">
  267: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  268: <CODE>&nbsp;void</CODE></FONT></TD>
  269: <TD><CODE><B><A HREF="DBBean.html#setPasswd(java.lang.String)">setPasswd</A></B>(java.lang.String&nbsp;passwd)</CODE>
  270: 
  271: <BR>
  272: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the database passwd</TD>
  273: </TR>
  274: <TR BGCOLOR="white" CLASS="TableRowColor">
  275: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  276: <CODE>&nbsp;void</CODE></FONT></TD>
  277: <TD><CODE><B><A HREF="DBBean.html#setURL(java.lang.String)">setURL</A></B>(java.lang.String&nbsp;url)</CODE>
  278: 
  279: <BR>
  280: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;just  sets the connection URL</TD>
  281: </TR>
  282: <TR BGCOLOR="white" CLASS="TableRowColor">
  283: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  284: <CODE>&nbsp;void</CODE></FONT></TD>
  285: <TD><CODE><B><A HREF="DBBean.html#setUser(java.lang.String)">setUser</A></B>(java.lang.String&nbsp;user)</CODE>
  286: 
  287: <BR>
  288: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the database user</TD>
  289: </TR>
  290: <TR BGCOLOR="white" CLASS="TableRowColor">
  291: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  292: <CODE>&nbsp;void</CODE></FONT></TD>
  293: <TD><CODE><B><A HREF="DBBean.html#setUserAndPasswd(java.lang.String, java.lang.String)">setUserAndPasswd</A></B>(java.lang.String&nbsp;user,
  294:                  java.lang.String&nbsp;passwd)</CODE>
  295: 
  296: <BR>
  297: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the database user and passwd</TD>
  298: </TR>
  299: <TR BGCOLOR="white" CLASS="TableRowColor">
  300: <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  301: <CODE>&nbsp;java.util.Vector[]</CODE></FONT></TD>
  302: <TD><CODE><B><A HREF="DBBean.html#TestDB(java.sql.DatabaseMetaData)">TestDB</A></B>(java.sql.DatabaseMetaData&nbsp;d)</CODE>
  303: 
  304: <BR>
  305: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test the database drivers features given by the DatabaseMetaData object</TD>
  306: </TR>
  307: </TABLE>
  308: &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  309: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  310: <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  311: <TD><B>Methods inherited from class java.lang.Object</B></TD>
  312: </TR>
  313: <TR BGCOLOR="white" CLASS="TableRowColor">
  314: <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  315: </TR>
  316: </TABLE>
  317: &nbsp;
  318: <P>
  319: 
  320: <!-- ============ FIELD DETAIL =========== -->
  321: 
  322: <A NAME="field_detail"><!-- --></A>
  323: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  324: <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  325: <TD COLSPAN=1><FONT SIZE="+2">
  326: <B>Field Detail</B></FONT></TD>
  327: </TR>
  328: </TABLE>
  329: 
  330: <A NAME="maxHits"><!-- --></A><H3>
  331: maxHits</H3>
  332: <PRE>
  333: public int <B>maxHits</B></PRE>
  334: <DL>
  335: </DL>
  336: 
  337: <!-- ========= CONSTRUCTOR DETAIL ======== -->
  338: 
  339: <A NAME="constructor_detail"><!-- --></A>
  340: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  341: <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  342: <TD COLSPAN=1><FONT SIZE="+2">
  343: <B>Constructor Detail</B></FONT></TD>
  344: </TR>
  345: </TABLE>
  346: 
  347: <A NAME="DBBean()"><!-- --></A><H3>
  348: DBBean</H3>
  349: <PRE>
  350: public <B>DBBean</B>()</PRE>
  351: <DL>
  352: <DD>Constructs a database bean</DL>
  353: <HR>
  354: 
  355: <A NAME="DBBean(java.lang.String)"><!-- --></A><H3>
  356: DBBean</H3>
  357: <PRE>
  358: public <B>DBBean</B>(java.lang.String&nbsp;jdbcConnectionURL)
  359:        throws java.lang.Exception</PRE>
  360: <DL>
  361: <DD>Constructs a database bean
  362:  and tries to connect to database 
  363: specified in the jdbcConnectionURL<DD><DL>
  364: <DT><B>Parameters:</B><DD><CODE>jdbcConnectionURL</CODE> - url to connect to database</DL>
  365: </DD>
  366: </DL>
  367: 
  368: <!-- ============ METHOD DETAIL ========== -->
  369: 
  370: <A NAME="method_detail"><!-- --></A>
  371: <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
  372: <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  373: <TD COLSPAN=1><FONT SIZE="+2">
  374: <B>Method Detail</B></FONT></TD>
  375: </TR>
  376: </TABLE>
  377: 
  378: <A NAME="setMaxHits(int)"><!-- --></A><H3>
  379: setMaxHits</H3>
  380: <PRE>
  381: public void <B>setMaxHits</B>(int&nbsp;maxHits)</PRE>
  382: <DL>
  383: <DD>sets the maximum number of hits</DL>
  384: <HR>
  385: 
  386: <A NAME="getMaxHits()"><!-- --></A><H3>
  387: getMaxHits</H3>
  388: <PRE>
  389: public int <B>getMaxHits</B>()</PRE>
  390: <DL>
  391: <DD>gets the maximum number of hits</DL>
  392: <HR>
  393: 
  394: <A NAME="getConnection()"><!-- --></A><H3>
  395: getConnection</H3>
  396: <PRE>
  397: public java.sql.Connection <B>getConnection</B>()
  398:                                   throws java.lang.Exception</PRE>
  399: <DL>
  400: <DD>returns the Connection if null creates a new one from the url property.</DL>
  401: <HR>
  402: 
  403: <A NAME="setConnection(java.lang.String)"><!-- --></A><H3>
  404: setConnection</H3>
  405: <PRE>
  406: public void <B>setConnection</B>(java.lang.String&nbsp;url)
  407:                    throws java.lang.Exception</PRE>
  408: <DL>
  409: <DD>sets the connection of this DBBean to the database specified in the url
  410:   property</DL>
  411: <HR>
  412: 
  413: <A NAME="setConnection(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
  414: setConnection</H3>
  415: <PRE>
  416: public void <B>setConnection</B>(java.lang.String&nbsp;url,
  417:                           java.lang.String&nbsp;user,
  418:                           java.lang.String&nbsp;passwd)
  419:                    throws java.lang.Exception</PRE>
  420: <DL>
  421: <DD>sets the connection of this DBBean to the database specified in the url
  422:  and the url,user and passwd property of this DBBean instance</DL>
  423: <HR>
  424: 
  425: <A NAME="getTableNames()"><!-- --></A><H3>
  426: getTableNames</H3>
  427: <PRE>
  428: public java.util.Vector <B>getTableNames</B>()</PRE>
  429: <DL>
  430: <DD>returns a Vector containing the Tablenames or an error message in the Vector</DL>
  431: <HR>
  432: 
  433: <A NAME="getLayoutNames(java.lang.String)"><!-- --></A><H3>
  434: getLayoutNames</H3>
  435: <PRE>
  436: public java.util.Vector <B>getLayoutNames</B>(java.lang.String&nbsp;tableName)
  437:                                 throws java.sql.SQLException</PRE>
  438: <DL>
  439: <DD>returns a Vector containing the layoutNames for the specified Table
  440:  if the database supports this otherwise Vector containing an empty String</DL>
  441: <HR>
  442: 
  443: <A NAME="getQueryData(java.lang.String)"><!-- --></A><H3>
  444: getQueryData</H3>
  445: <PRE>
  446: public java.util.Vector[] <B>getQueryData</B>(java.lang.String&nbsp;table)
  447:                                 throws java.sql.SQLException</PRE>
  448: <DL>
  449: <DD>Returns the result for select * from table 
  450:    with maxHits = 500 default value</DL>
  451: <HR>
  452: 
  453: <A NAME="getQueryData(java.lang.String, int)"><!-- --></A><H3>
  454: getQueryData</H3>
  455: <PRE>
  456: public java.util.Vector[] <B>getQueryData</B>(java.lang.String&nbsp;query,
  457:                                        int&nbsp;maxHits)
  458:                                 throws java.sql.SQLException</PRE>
  459: <DL>
  460: <DD>Returns the result of the query
  461:     or an Vector array of Vectors containing error messages</DL>
  462: <HR>
  463: 
  464: <A NAME="getColumnNames()"><!-- --></A><H3>
  465: getColumnNames</H3>
  466: <PRE>
  467: public java.util.Vector <B>getColumnNames</B>()</PRE>
  468: <DL>
  469: </DL>
  470: <HR>
  471: 
  472: <A NAME="makeQuery(java.lang.String, int)"><!-- --></A><H3>
  473: makeQuery</H3>
  474: <PRE>
  475: public java.sql.ResultSet <B>makeQuery</B>(java.lang.String&nbsp;query,
  476:                                     int&nbsp;numberOfHits)
  477:                              throws java.sql.SQLException</PRE>
  478: <DL>
  479: <DD>makes the database Query 
  480:    with the numberOfHits as maximum<DD><DL>
  481: <DT><B>Returns:</B><DD>the result as an ResultSet object</DL>
  482: </DD>
  483: </DL>
  484: <HR>
  485: 
  486: <A NAME="setUser(java.lang.String)"><!-- --></A><H3>
  487: setUser</H3>
  488: <PRE>
  489: public void <B>setUser</B>(java.lang.String&nbsp;user)</PRE>
  490: <DL>
  491: <DD>sets the database user</DL>
  492: <HR>
  493: 
  494: <A NAME="setPasswd(java.lang.String)"><!-- --></A><H3>
  495: setPasswd</H3>
  496: <PRE>
  497: public void <B>setPasswd</B>(java.lang.String&nbsp;passwd)</PRE>
  498: <DL>
  499: <DD>sets the database passwd</DL>
  500: <HR>
  501: 
  502: <A NAME="setUserAndPasswd(java.lang.String, java.lang.String)"><!-- --></A><H3>
  503: setUserAndPasswd</H3>
  504: <PRE>
  505: public void <B>setUserAndPasswd</B>(java.lang.String&nbsp;user,
  506:                              java.lang.String&nbsp;passwd)</PRE>
  507: <DL>
  508: <DD>sets the database user and passwd</DL>
  509: <HR>
  510: 
  511: <A NAME="setURL(java.lang.String)"><!-- --></A><H3>
  512: setURL</H3>
  513: <PRE>
  514: public void <B>setURL</B>(java.lang.String&nbsp;url)</PRE>
  515: <DL>
  516: <DD>just  sets the connection URL</DL>
  517: <HR>
  518: 
  519: <A NAME="TestDB(java.sql.DatabaseMetaData)"><!-- --></A><H3>
  520: TestDB</H3>
  521: <PRE>
  522: public java.util.Vector[] <B>TestDB</B>(java.sql.DatabaseMetaData&nbsp;d)
  523:                           throws java.sql.SQLException</PRE>
  524: <DL>
  525: <DD>Test the database drivers features given by the DatabaseMetaData object</DL>
  526: <HR>
  527: 
  528: <A NAME="getNextRow()"><!-- --></A><H3>
  529: getNextRow</H3>
  530: <PRE>
  531: public java.util.Vector <B>getNextRow</B>()
  532:                             throws java.lang.Exception</PRE>
  533: <DL>
  534: </DL>
  535: <!-- ========= END OF CLASS DATA ========= -->
  536: <HR>
  537: 
  538: <!-- ========== START OF NAVBAR ========== -->
  539: <A NAME="navbar_bottom"><!-- --></A>
  540: <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
  541: <TR>
  542: <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  543: <A NAME="navbar_bottom_firstrow"><!-- --></A>
  544: <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  545:   <TR ALIGN="center" VALIGN="top">
  546:   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  547:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  548:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  549:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  550:   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  551:   </TR>
  552: </TABLE>
  553: </TD>
  554: <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  555: </EM>
  556: </TD>
  557: </TR>
  558: 
  559: <TR>
  560: <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  561: &nbsp;PREV CLASS&nbsp;
  562: &nbsp;<A HREF="DBFront.html"><B>NEXT CLASS</B></A></FONT></TD>
  563: <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  564:   <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
  565: &nbsp;<A HREF="DBBean.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
  566: </TR>
  567: <TR>
  568: <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  569:   SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  570: <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  571: DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  572: </TR>
  573: </TABLE>
  574: <!-- =========== END OF NAVBAR =========== -->
  575: 
  576: <HR>
  577: 
  578: </BODY>
  579: </HTML>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>