blob: 9234909c63aeb887a7246b98678b7eef68d95f7a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jan 11 10:54:25 PST 2005 -->
<TITLE>
: Class DatabaseHelper
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DatabaseHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/helper/SchemaHelper.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DatabaseHelper.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.eclipse.wst.rdb.internal.models.sql.schema.helper</FONT>
<BR>
Class DatabaseHelper</H2>
<PRE>
java.lang.Object
|
+--<B>org.eclipse.wst.rdb.internal.models.sql.schema.helper.DatabaseHelper</B>
</PRE>
<HR>
<DL>
<DT>public class <B>DatabaseHelper</B><DT>extends java.lang.Object</DL>
<P>
<DL>
<DT><B>Author: </B><DD>ckadner
Helper to provide convenience methods that are related to
<CODE>com.ibm.db.models.sql.schema.Database</CODE>.</DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/helper/DatabaseHelper.html#DatabaseHelper()">DatabaseHelper</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/helper/DatabaseHelper.html#compareIdentifiers(org.eclipse.wst.rdb.internal.models.sql.schema.Database, java.lang.String, java.lang.String)">compareIdentifiers</A></B>(<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Database.html">Database</A>&nbsp;database,
java.lang.String&nbsp;identifier,
java.lang.String&nbsp;lookupName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares an existing identifier in a Database with the lookup name
respecting delimited identifiers otherwise ignoring case.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Schema.html">Schema</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/helper/DatabaseHelper.html#findSchema(org.eclipse.wst.rdb.internal.models.sql.schema.Database, java.lang.String)">findSchema</A></B>(<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Database.html">Database</A>&nbsp;database,
java.lang.String&nbsp;schemaName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds a <code>Schema</code> by its name in a given <code>Database</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/helper/DatabaseHelper.html#findTables(org.eclipse.wst.rdb.internal.models.sql.schema.Database, java.lang.String)">findTables</A></B>(<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Database.html">Database</A>&nbsp;database,
java.lang.String&nbsp;tableName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds all <code>Table</code>s with the name <code>tableName</code> in all
<code>Schema</code>'s of the given <code>database</code>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="DatabaseHelper()"><!-- --></A><H3>
DatabaseHelper</H3>
<PRE>
public <B>DatabaseHelper</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="findSchema(org.eclipse.wst.rdb.internal.models.sql.schema.Database, java.lang.String)"><!-- --></A><H3>
findSchema</H3>
<PRE>
public static <A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Schema.html">Schema</A> <B>findSchema</B>(<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Database.html">Database</A>&nbsp;database,
java.lang.String&nbsp;schemaName)</PRE>
<DL>
<DD>Finds a <code>Schema</code> by its name in a given <code>Database</code>.
If the given <code>schemaName</code> is not delimited, the
search is not case sensitive.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>database</CODE> - the <code>Database</code> to find <code>Schema</code>s in<DD><CODE>schemaName</CODE> - the String name of the <code>Schema</code> to find<DT><B>Returns:</B><DD>the <code>Schema</code> found or <code>null</code> if no
corresponding <code>Schema</code> was found<DT><B>Throws:</B><DD><CODE>NullPointerException</CODE> - if given <code>database</code> or given
<code>schemaName</code> is <code>null</code></DL>
</DD>
</DL>
<HR>
<A NAME="findTables(org.eclipse.wst.rdb.internal.models.sql.schema.Database, java.lang.String)"><!-- --></A><H3>
findTables</H3>
<PRE>
public static java.util.List <B>findTables</B>(<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Database.html">Database</A>&nbsp;database,
java.lang.String&nbsp;tableName)</PRE>
<DL>
<DD>Finds all <code>Table</code>s with the name <code>tableName</code> in all
<code>Schema</code>'s of the given <code>database</code>.
Returns a list of <code>Table</code>s with associated <code>Schema</code>.
If the given <code>tableName</code> is not delimited, the
search is not case sensitive.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>database</CODE> - the <code>Database</code> to search in<DD><CODE>tableName</CODE> - the String name of the <code>Table</code> to find<DT><B>Returns:</B><DD>List of <code>Table</code>s with associated <code>Schema</code><DT><B>Throws:</B><DD><CODE>NullPointerException</CODE> - if given <code>schema</code> or given
<code>tableName</code> is <code>null</code></DL>
</DD>
</DL>
<HR>
<A NAME="compareIdentifiers(org.eclipse.wst.rdb.internal.models.sql.schema.Database, java.lang.String, java.lang.String)"><!-- --></A><H3>
compareIdentifiers</H3>
<PRE>
public static int <B>compareIdentifiers</B>(<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/Database.html">Database</A>&nbsp;database,
java.lang.String&nbsp;identifier,
java.lang.String&nbsp;lookupName)</PRE>
<DL>
<DD>Compares an existing identifier in a Database with the lookup name
respecting delimited identifiers otherwise ignoring case.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>database</CODE> - the Database to determin the delimiter for identifiers<DD><CODE>identifier</CODE> - a String identifier already existing in the Database<DD><CODE>lookupName</CODE> - the String name to compare to a existing identifier<DT><B>Returns:</B><DD>0 if lookupName is equal to identifier<DT><B>See Also: </B><DD><CODE>String.compareTo(java.lang.String)</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DatabaseHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../../../../org/eclipse/wst/rdb/internal/models/sql/schema/helper/SchemaHelper.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DatabaseHelper.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>