⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 turbinecastorservice.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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 Fri Dec 06 19:57:08 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class  TurbineCastorService</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/TurbineCastorService.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-all.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;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TurbineCastorService.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;<A HREF="#fields_inherited_from_class_org.apache.turbine.services.BaseService">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;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.apache.turbine.services.castor</FONT><BR>Class  TurbineCastorService</H2><PRE>java.lang.Object  |  +--<A HREF="../../../../../org/apache/turbine/services/BaseInitable.html">org.apache.turbine.services.BaseInitable</A>        |        +--<A HREF="../../../../../org/apache/turbine/services/BaseService.html">org.apache.turbine.services.BaseService</A>              |              +--<A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">org.apache.turbine.services.TurbineBaseService</A>                    |                    +--<B>org.apache.turbine.services.castor.TurbineCastorService</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html">CastorService</A>, <A HREF="../../../../../org/apache/turbine/services/Initable.html">Initable</A>, <A HREF="../../../../../org/apache/turbine/services/Service.html">Service</A></DD></DL><HR><P><DL><DT>public class <B>TurbineCastorService</B><DT>extends <A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">TurbineBaseService</A><DT>implements <A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html">CastorService</A></DL><P>This is a Service that offers access to the object to relational mapping from <a href="http://castor.exolab.org">Castor</a>. Here's an example of how you might use it:<br> <code><pre> TurbineServices ts = TurbineServices.getInstance(); CastorService cs = (CastorService) ts.getService (CastorService.SERVICE_NAME); Database db = cs.<A HREF="../../../../../org/apache/turbine/services/castor/TurbineCastorService.html#getDatabase()"><CODE>getDatabase()</CODE></A>; db.begin(); ... db.commit(); db.close(); </pre></code> The following properties are needed to configure this service:<br> <code><pre> services.CastorService.classname=org.apache.turbine.services.castor.TurbineCastorService services.CastorService.properties.logfile=/tmp/castor.log services.CastorService.properties.logprefix=turbinecastor services.CastorService.properties.databasefile=/tmp/database.xml services.CastorService.properties.databasename=turbine </pre></code> <dl> <dt>classname</dt><dd>the classname of this service</dd> <dt>logfile</dt><dd>the path to a writable file. Castor uses its own log file</dd> <dt>logprefix</dt><dd>the prefix used in the logfile to distinguish from Castor log entry and this Service. This is a recommended property</dd> <dt>databasefile</dt><dd>the path to a readable file defining the mappings of the java objects an the underlying tables/columns</dd> <dt>databasename</dt><dd>references a name of a database definition tag used in the mapping file</dd> </dl><P><DL><DT><B>Version: </B><DD>$Id: TurbineCastorService.java,v 1.3 2002/08/14 16:27:45 henning Exp $</DD><DT><B>Author: </B><DD><a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>, <a href="mailto:celkins@scardini.com">Christopher Elkins</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_org.apache.turbine.services.BaseService"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.<A HREF="../../../../../org/apache/turbine/services/BaseService.html">BaseService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/BaseService.html#configuration">configuration</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#name">name</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#properties">properties</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#serviceBroker">serviceBroker</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_org.apache.turbine.services.BaseInitable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.<A HREF="../../../../../org/apache/turbine/services/BaseInitable.html">BaseInitable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/BaseInitable.html#initableBroker">initableBroker</A>, <A HREF="../../../../../org/apache/turbine/services/BaseInitable.html#isInitialized">isInitialized</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_org.apache.turbine.services.castor.CastorService"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface org.apache.turbine.services.castor.<A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html">CastorService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html#DATABASEFILE_PROPERTY">DATABASEFILE_PROPERTY</A>, <A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html#DATABASENAME_PROPERTY">DATABASENAME_PROPERTY</A>, <A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html#DEFAULT_LOGPREFIX">DEFAULT_LOGPREFIX</A>, <A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html#LOGFILE_PROPERTY">LOGFILE_PROPERTY</A>, <A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html#LOGPREFIX_PROPERTY">LOGPREFIX_PROPERTY</A>, <A HREF="../../../../../org/apache/turbine/services/castor/CastorService.html#SERVICE_NAME">SERVICE_NAME</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== 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/apache/turbine/services/castor/TurbineCastorService.html#TurbineCastorService()">TurbineCastorService</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&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>&nbsp;java.io.PrintWriter</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/castor/TurbineCastorService.html#getCastorLogger()">getCastorLogger</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets you the PrintWriter object Castor is using for logging.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;org.exolab.castor.jdo.Database</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/castor/TurbineCastorService.html#getDatabase()">getDatabase</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets a Castor Database object in the context of the defined environment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;org.exolab.castor.jdo.JDO</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/castor/TurbineCastorService.html#getJDO()">getJDO</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets a JDO object initialized to the database mentioned in the property databasename.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -