blob: 783a073cd6683bcb8bcca34fae87a5eeb86d3260 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_06) on Wed Jul 19 14:45:43 EDT 2006 -->
<TITLE>
DbLoader (Apache Cayenne API Documentation - v.2.0-incubating-SNAPSHOT)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.cayenne.access.DbLoader class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../apache-javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="DbLoader (Apache Cayenne API Documentation - v.2.0-incubating-SNAPSHOT)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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="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;<A HREF="../../../../org/apache/cayenne/access/DbGenerator.html" title="class in org.apache.cayenne.access"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/cayenne/access/DbLoaderDelegate.html" title="interface in org.apache.cayenne.access"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/cayenne/access/DbLoader.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DbLoader.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&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>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
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>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.cayenne.access</FONT>
<BR>
Class DbLoader</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.cayenne.access.DbLoader</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>DbLoader</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Utility class that does reverse engineering of the database. It can create DataMaps
using database meta data obtained via JDBC driver.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Michael Shengaout, Andrei Adamchik</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/cayenne/dba/DbAdapter.html" title="interface in org.apache.cayenne.dba">DbAdapter</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#adapter">adapter</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.sql.Connection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#con">con</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/cayenne/access/DbLoaderDelegate.html" title="interface in org.apache.cayenne.access">DbLoaderDelegate</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#delegate">delegate</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#genericClassName">genericClassName</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.sql.DatabaseMetaData</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#metaData">metaData</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#WILDCARD">WILDCARD</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#DbLoader(java.sql.Connection, org.apache.cayenne.dba.DbAdapter, org.apache.cayenne.access.DbLoaderDelegate)">DbLoader</A></B>(java.sql.Connection&nbsp;con,
<A HREF="../../../../org/apache/cayenne/dba/DbAdapter.html" title="interface in org.apache.cayenne.dba">DbAdapter</A>&nbsp;adapter,
<A HREF="../../../../org/apache/cayenne/access/DbLoaderDelegate.html" title="interface in org.apache.cayenne.access">DbLoaderDelegate</A>&nbsp;delegate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates new DbLoader.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/dba/DbAdapter.html" title="interface in org.apache.cayenne.dba">DbAdapter</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getAdapter()">getAdapter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns DbAdapter associated with this DbLoader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getCatalogs()">getCatalogs</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves catalogues for the database associated with this DbLoader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.sql.Connection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getCon()">getCon</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns database connection used by this DbLoader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getGenericClassName()">getGenericClassName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a name of a generic class that should be used for all ObjEntities.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.sql.DatabaseMetaData</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getMetaData()">getMetaData</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns DatabaseMetaData object associated with this DbLoader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getSchemas()">getSchemas</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the schemas for the database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])">getTables</A></B>(java.lang.String&nbsp;catalog,
java.lang.String&nbsp;schemaPattern,
java.lang.String&nbsp;tableNamePattern,
java.lang.String[]&nbsp;types)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all table names for given combination of the criteria.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#getTableTypes()">getTableTypes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all the table types for the given database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#loadDataMapFromDB(java.lang.String, java.lang.String, org.apache.cayenne.map.DataMap)">loadDataMapFromDB</A></B>(java.lang.String&nbsp;schemaName,
java.lang.String&nbsp;tablePattern,
<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;dataMap)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs database reverse engineering and generates DataMap that contains default
mapping of the tables and views.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#loadDataMapFromDB(java.lang.String, java.lang.String, java.lang.String[], org.apache.cayenne.map.DataMap)">loadDataMapFromDB</A></B>(java.lang.String&nbsp;schemaName,
java.lang.String&nbsp;tablePattern,
java.lang.String[]&nbsp;tableTypes,
<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;dataMap)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs database reverse engineering and generates DataMap object that contains
default mapping of the tables and views.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#loadDbEntities(org.apache.cayenne.map.DataMap, java.util.List)">loadDbEntities</A></B>(<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;map,
java.util.List&nbsp;tables)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads dbEntities for the specified tables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#loadDbRelationships(org.apache.cayenne.map.DataMap)">loadDbRelationships</A></B>(<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;map)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads database relationships into a DataMap.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#loadObjEntities(org.apache.cayenne.map.DataMap)">loadObjEntities</A></B>(<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;map)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an ObjEntity for each DbEntity in the map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#loadProceduresFromDB(java.lang.String, java.lang.String, org.apache.cayenne.map.DataMap)">loadProceduresFromDB</A></B>(java.lang.String&nbsp;schemaPattern,
java.lang.String&nbsp;namePattern,
<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;dataMap)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads database stored procedures into the DataMap.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#postprocessMasterDbRelationship(org.apache.cayenne.map.DbRelationship)">postprocessMasterDbRelationship</A></B>(<A HREF="../../../../org/apache/cayenne/map/DbRelationship.html" title="class in org.apache.cayenne.map">DbRelationship</A>&nbsp;relationship)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Detects correct relationship multiplicity and "to dep pk" flag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DbLoader.html#setGenericClassName(java.lang.String)">setGenericClassName</A></B>(java.lang.String&nbsp;genericClassName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a name of a generic class that should be used for all ObjEntities.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="WILDCARD"><!-- --></A><H3>
WILDCARD</H3>
<PRE>
public static final java.lang.String <B>WILDCARD</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.cayenne.access.DbLoader.WILDCARD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="con"><!-- --></A><H3>
con</H3>
<PRE>
protected java.sql.Connection <B>con</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="adapter"><!-- --></A><H3>
adapter</H3>
<PRE>
protected <A HREF="../../../../org/apache/cayenne/dba/DbAdapter.html" title="interface in org.apache.cayenne.dba">DbAdapter</A> <B>adapter</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="metaData"><!-- --></A><H3>
metaData</H3>
<PRE>
protected java.sql.DatabaseMetaData <B>metaData</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="delegate"><!-- --></A><H3>
delegate</H3>
<PRE>
protected <A HREF="../../../../org/apache/cayenne/access/DbLoaderDelegate.html" title="interface in org.apache.cayenne.access">DbLoaderDelegate</A> <B>delegate</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="genericClassName"><!-- --></A><H3>
genericClassName</H3>
<PRE>
protected java.lang.String <B>genericClassName</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DbLoader(java.sql.Connection, org.apache.cayenne.dba.DbAdapter, org.apache.cayenne.access.DbLoaderDelegate)"><!-- --></A><H3>
DbLoader</H3>
<PRE>
public <B>DbLoader</B>(java.sql.Connection&nbsp;con,
<A HREF="../../../../org/apache/cayenne/dba/DbAdapter.html" title="interface in org.apache.cayenne.dba">DbAdapter</A>&nbsp;adapter,
<A HREF="../../../../org/apache/cayenne/access/DbLoaderDelegate.html" title="interface in org.apache.cayenne.access">DbLoaderDelegate</A>&nbsp;delegate)</PRE>
<DL>
<DD>Creates new DbLoader.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getMetaData()"><!-- --></A><H3>
getMetaData</H3>
<PRE>
public java.sql.DatabaseMetaData <B>getMetaData</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD>Returns DatabaseMetaData object associated with this DbLoader.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getCon()"><!-- --></A><H3>
getCon</H3>
<PRE>
public java.sql.Connection <B>getCon</B>()</PRE>
<DL>
<DD>Returns database connection used by this DbLoader.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getGenericClassName()"><!-- --></A><H3>
getGenericClassName</H3>
<PRE>
public java.lang.String <B>getGenericClassName</B>()</PRE>
<DL>
<DD>Returns a name of a generic class that should be used for all ObjEntities. The most
common generic class is <A HREF="../../../../org/apache/cayenne/CayenneDataObject.html" title="class in org.apache.cayenne"><CODE>CayenneDataObject</CODE></A>. If
generic class name is null (which is the default), DbLoader will assign each entity
a unique class name derived from the table name.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setGenericClassName(java.lang.String)"><!-- --></A><H3>
setGenericClassName</H3>
<PRE>
public void <B>setGenericClassName</B>(java.lang.String&nbsp;genericClassName)</PRE>
<DL>
<DD>Sets a name of a generic class that should be used for all ObjEntities. The most
common generic class is <A HREF="../../../../org/apache/cayenne/CayenneDataObject.html" title="class in org.apache.cayenne"><CODE>CayenneDataObject</CODE></A>. If
generic class name is set to null (which is the default), DbLoader will assign each
entity a unique class name derived from the table name.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getAdapter()"><!-- --></A><H3>
getAdapter</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/dba/DbAdapter.html" title="interface in org.apache.cayenne.dba">DbAdapter</A> <B>getAdapter</B>()</PRE>
<DL>
<DD>Returns DbAdapter associated with this DbLoader.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCatalogs()"><!-- --></A><H3>
getCatalogs</H3>
<PRE>
public java.util.List <B>getCatalogs</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD>Retrieves catalogues for the database associated with this DbLoader.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>List with the catalog names, empty Array if none found.
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getSchemas()"><!-- --></A><H3>
getSchemas</H3>
<PRE>
public java.util.List <B>getSchemas</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD>Retrieves the schemas for the database.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>List with the schema names, empty Array if none found.
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getTableTypes()"><!-- --></A><H3>
getTableTypes</H3>
<PRE>
public java.util.List <B>getTableTypes</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD>Returns all the table types for the given database. Types may be such as "TABLE",
"VIEW", "SYSTEM TABLE", etc.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>List of Strings, empty array if nothing found.
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])"><!-- --></A><H3>
getTables</H3>
<PRE>
public java.util.List <B>getTables</B>(java.lang.String&nbsp;catalog,
java.lang.String&nbsp;schemaPattern,
java.lang.String&nbsp;tableNamePattern,
java.lang.String[]&nbsp;types)
throws java.sql.SQLException</PRE>
<DL>
<DD>Returns all table names for given combination of the criteria.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>catalog</CODE> - The name of the catalog, may be null.<DD><CODE>schemaPattern</CODE> - The pattern for schema name, use "%" for wildcard.<DD><CODE>tableNamePattern</CODE> - The pattern for table names, % for wildcard, if null or ""
defaults to "%".<DD><CODE>types</CODE> - The types of table names to retrieve, null returns all types.
<DT><B>Returns:</B><DD>List of TableInfo objects, empty array if nothing found.
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadDbEntities(org.apache.cayenne.map.DataMap, java.util.List)"><!-- --></A><H3>
loadDbEntities</H3>
<PRE>
public boolean <B>loadDbEntities</B>(<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;map,
java.util.List&nbsp;tables)
throws java.sql.SQLException</PRE>
<DL>
<DD>Loads dbEntities for the specified tables.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>map</CODE> - DataMap to be populated with DbEntities.<DD><CODE>tables</CODE> - The list of org.objectstyle.ashwood.dbutil.Table objects for which
DbEntities must be created.
<DT><B>Returns:</B><DD>false if loading must be immediately aborted.
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadObjEntities(org.apache.cayenne.map.DataMap)"><!-- --></A><H3>
loadObjEntities</H3>
<PRE>
public void <B>loadObjEntities</B>(<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;map)</PRE>
<DL>
<DD>Creates an ObjEntity for each DbEntity in the map. ObjEntities are created empty
without
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="loadDbRelationships(org.apache.cayenne.map.DataMap)"><!-- --></A><H3>
loadDbRelationships</H3>
<PRE>
public void <B>loadDbRelationships</B>(<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;map)
throws java.sql.SQLException</PRE>
<DL>
<DD>Loads database relationships into a DataMap.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="postprocessMasterDbRelationship(org.apache.cayenne.map.DbRelationship)"><!-- --></A><H3>
postprocessMasterDbRelationship</H3>
<PRE>
protected void <B>postprocessMasterDbRelationship</B>(<A HREF="../../../../org/apache/cayenne/map/DbRelationship.html" title="class in org.apache.cayenne.map">DbRelationship</A>&nbsp;relationship)</PRE>
<DL>
<DD>Detects correct relationship multiplicity and "to dep pk" flag. Only called on
relationships from PK to FK, not the reverse ones.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="loadDataMapFromDB(java.lang.String, java.lang.String, org.apache.cayenne.map.DataMap)"><!-- --></A><H3>
loadDataMapFromDB</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A> <B>loadDataMapFromDB</B>(java.lang.String&nbsp;schemaName,
java.lang.String&nbsp;tablePattern,
<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;dataMap)
throws java.sql.SQLException</PRE>
<DL>
<DD>Performs database reverse engineering and generates DataMap that contains default
mapping of the tables and views. By default will include regular tables and views.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE><DT><B>Since:</B></DT>
<DD>1.0.7</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="loadDataMapFromDB(java.lang.String, java.lang.String, java.lang.String[], org.apache.cayenne.map.DataMap)"><!-- --></A><H3>
loadDataMapFromDB</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A> <B>loadDataMapFromDB</B>(java.lang.String&nbsp;schemaName,
java.lang.String&nbsp;tablePattern,
java.lang.String[]&nbsp;tableTypes,
<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;dataMap)
throws java.sql.SQLException</PRE>
<DL>
<DD>Performs database reverse engineering and generates DataMap object that contains
default mapping of the tables and views. Allows to limit types of tables to read.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadProceduresFromDB(java.lang.String, java.lang.String, org.apache.cayenne.map.DataMap)"><!-- --></A><H3>
loadProceduresFromDB</H3>
<PRE>
public void <B>loadProceduresFromDB</B>(java.lang.String&nbsp;schemaPattern,
java.lang.String&nbsp;namePattern,
<A HREF="../../../../org/apache/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map">DataMap</A>&nbsp;dataMap)
throws java.sql.SQLException</PRE>
<DL>
<DD>Loads database stored procedures into the DataMap.
<p>
<i>As of 1.1 there is no boolean property or delegate method to make procedure
loading optional or to implement custom merging logic, so currently this method is
NOT CALLED from "loadDataMapFromDB" and should be invoked explicitly by the user.
</i>
</p>
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.sql.SQLException</CODE><DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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="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;<A HREF="../../../../org/apache/cayenne/access/DbGenerator.html" title="class in org.apache.cayenne.access"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/cayenne/access/DbLoaderDelegate.html" title="interface in org.apache.cayenne.access"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/cayenne/access/DbLoader.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DbLoader.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&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>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
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>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2006 <a href=
"http://apache.org" target="_top">Apache.org</a> All Rights Reserved.</i>
</BODY>
</HTML>