You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/01/30 16:13:01 UTC

cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/platforms Platform.java

arminw      2003/01/30 07:12:59

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        ConnectionManagerIF.java
               src/java/org/apache/ojb/broker/metadata
                        AttributeContainer.java ClassDescriptor.java
                        JdbcConnectionDescriptor.java
                        SequenceDescriptor.java
               src/java/org/apache/ojb/broker/platforms Platform.java
  Log:
  update, add javadoc comments
  
  Revision  Changes    Path
  1.10      +1 -1      jakarta-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerIF.java
  
  Index: ConnectionManagerIF.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerIF.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ConnectionManagerIF.java	15 Jan 2003 10:43:28 -0000	1.9
  +++ ConnectionManagerIF.java	30 Jan 2003 15:12:57 -0000	1.10
  @@ -74,7 +74,7 @@
       /**
        * Returns the supported {@link org.apache.ojb.broker.platforms.Platform}
        * determined by the {@link org.apache.ojb.broker.metadata.JdbcConnectionDescriptor}.
  -     * @see getConnectionDescriptor
  +     * @see #getConnectionDescriptor
        */
       public Platform getSupportedPlatform();
   
  
  
  
  1.2       +80 -82    jakarta-ojb/src/java/org/apache/ojb/broker/metadata/AttributeContainer.java
  
  Index: AttributeContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/AttributeContainer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttributeContainer.java	29 Sep 2002 15:53:39 -0000	1.1
  +++ AttributeContainer.java	30 Jan 2003 15:12:57 -0000	1.2
  @@ -1,86 +1,84 @@
   package org.apache.ojb.broker.metadata;
  -
  -/* ====================================================================
  - * The Apache Software License, Version 1.1
  - *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *    notice, this list of conditions and the following disclaimer in
  - *    the documentation and/or other materials provided with the
  - *    distribution.
  - *
  - * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  - *       "This product includes software developed by the
  - *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software itself,
  - *    if and wherever such third-party acknowledgments normally appear.
  - *
  - * 4. The names "Apache" and "Apache Software Foundation" and
  - *    "Apache ObjectRelationalBridge" must not be used to endorse or promote products
  - *    derived from this software without prior written permission. For
  - *    written permission, please contact apache@apache.org.
  - *
  - * 5. Products derived from this software may not be called "Apache",
  - *    "Apache ObjectRelationalBridge", nor may "Apache" appear in their name, without
  - *    prior written permission of the Apache Software Foundation.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * ====================================================================
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - */
  -
  -/**
  - * This interface defines methods that are required for an object
  - * to support the nested "attribute" tag in the repository file.
  - * @author		Ron Gallagher
  - */
  -public interface AttributeContainer
  -{
  -	/**
  -     * Store the specified attribute and it's value.
  -     * @param attributeName the name of the attribute to retrieve
  -     * @param attributeValue the attribute's value
  -     */
  -    public void addAttribute(String attributeName, String attributeValue);
  -    
  -    /**
  -     * Get the value of an attribute
  -     * @param attributeName the attribute to retrieve
  -     * @param defaultValue the value to return if the attribute is not present
  -     * @return the attribute value
  -     */    
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache ObjectRelationalBridge" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
  + *    written permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    "Apache ObjectRelationalBridge", nor may "Apache" appear in their name, without
  + *    prior written permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
  +
  +/**
  + * This interface defines methods that are required for an object
  + * to support the nested "attribute" tag in the repository file.
  + * @author		Ron Gallagher
  + */
  +public interface AttributeContainer
  +{
  +	/**
  +     * Store the specified attribute and it's value.
  +     * @param attributeName the name of the attribute to retrieve
  +     * @param attributeValue the attribute's value
  +     */
  +    public void addAttribute(String attributeName, String attributeValue);
  +
  +    /**
  +     * Get the value of an attribute
  +     * @param attributeName the attribute to retrieve
  +     * @param defaultValue the value to return if the attribute is not present
  +     * @return the attribute value
  +     */
       public String getAttribute(String attributeName, String defaultValue);
  -    
  -    /**
  -     * Get the value of an attribute
  -     * @param attributeName the attribute to retrieve
  -     * @return the attribute value
  -     */    
  -    public String getAttribute(String attributeName);
  +    /**
  +     * Get the value of an attribute
  +     * @param attributeName the attribute to retrieve
  +     * @return the attribute value
  +     */
  +    public String getAttribute(String attributeName);
   }
   
  
  
  
  1.49      +31 -28    jakarta-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java
  
  Index: ClassDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- ClassDescriptor.java	24 Dec 2002 13:14:33 -0000	1.48
  +++ ClassDescriptor.java	30 Jan 2003 15:12:57 -0000	1.49
  @@ -304,8 +304,8 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns all defined {@link CollectionDescriptor} for
  +     * this class descriptor.
        */
       public Vector getCollectionDescriptors()
       {
  @@ -313,8 +313,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param cod
  +     * Add a {@link CollectionDescriptor}.
        */
       public void addCollectionDescriptor(CollectionDescriptor cod)
       {
  @@ -323,8 +322,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns all defined {@link ObjectReferenceDescriptor}.
        */
       public Vector getObjectReferenceDescriptors()
       {
  @@ -332,8 +330,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param ord
  +     * Add a {@link ObjectReferenceDescriptor}.
        */
       public void addObjectReferenceDescriptor(ObjectReferenceDescriptor ord)
       {
  @@ -529,8 +526,7 @@
       }
   
       /**
  -     * returns array of all FieldDescriptors.
  -     * @return FIELDDESCRIPTOR[]
  +     * Returns array of all FieldDescriptors.
        */
       public FieldDescriptor[] getFieldDescriptions()
       {
  @@ -538,9 +534,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param index
  -     * @return
  +     * Returns the matching {@link FieldDescriptor}.
        */
       public FieldDescriptor getFieldDescriptorByIndex(int index)
       {
  @@ -548,9 +542,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param name
  -     * @return
  +     * Returns the matching {@link FieldDescriptor}.
        */
       public FieldDescriptor getFieldDescriptorByName(String name)
       {
  @@ -1182,30 +1174,42 @@
           }
       }
   
  +    /**
  +     * Set name of the super class.
  +     */
       public void setSuperClass(String classname)
       {
           this.superClass = classname;
       }
   
  +    /**
  +     * Return the super class or <code>null</code>
  +     * if not declared in repository file.
  +     */
  +    public String getSuperClass()
  +    {
  +        return superClass;
  +    }
  +
  +    /**
  +     * TODO drop this method?
  +     */
       public void setSuperClassFieldRef(int fieldId)
       {
           this.superClassFieldRef = fieldId;
       }
   
  +    /**
  +     * TODO drop this method?
  +     */
       public int getSuperClassFieldRef()
       {
           return superClassFieldRef;
       }
   
  -    public String getSuperClass()
  -    {
  -        return superClass;
  -    }
  -
       /**
  -     * Insert the method's description here.
  -     * Creation date: (02.02.2001 17:49:11)
  -     * @return boolean
  +     * Return true, if the described class is
  +     * an interface.
        */
       public boolean isInterface()
       {
  @@ -1213,9 +1217,8 @@
       }
   
       /**
  -     * Insert the method's description here.
  -     * Creation date: (02.02.2001 17:49:11)
  -     * @param newIsInterface boolean
  +     * Set <code>true</code> if described class is
  +     * a interface.
        */
       public void setIsInterface(boolean newIsInterface)
       {
  
  
  
  1.21      +17 -29    jakarta-ojb/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java
  
  Index: JdbcConnectionDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JdbcConnectionDescriptor.java	15 Jan 2003 10:43:29 -0000	1.20
  +++ JdbcConnectionDescriptor.java	30 Jan 2003 15:12:58 -0000	1.21
  @@ -238,8 +238,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the database platform name.
        */
       public String getDbms()
       {
  @@ -247,8 +246,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Sets the database platform name.
        */
       public void setDbms(String str)
       {
  @@ -256,8 +254,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the driver name.
        */
       public String getDriver()
       {
  @@ -265,8 +262,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Set the database driver.
        */
       public void setDriver(String str)
       {
  @@ -274,8 +270,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the database protocol.
        */
       public String getProtocol()
       {
  @@ -283,8 +278,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Sets the database protocol.
        */
       public void setProtocol(String str)
       {
  @@ -292,8 +286,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the database sub-protocol.
        */
       public String getSubProtocol()
       {
  @@ -301,8 +294,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Sets the database sub-protocol.
        */
       public void setSubProtocol(String str)
       {
  @@ -310,8 +302,8 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the database alias name
  +     * used by OJB.
        */
       public String getDbAlias()
       {
  @@ -319,8 +311,8 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Sets the database alias name. These
  +     * names you could find in the repository.dtd.
        */
       public void setDbAlias(String str)
       {
  @@ -328,8 +320,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the database user name.
        */
       public String getUserName()
       {
  @@ -337,8 +328,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Sets the database user name.
        */
       public void setUserName(String str)
       {
  @@ -347,8 +337,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @return
  +     * Returns the database password.
        */
       public String getPassWord()
       {
  @@ -356,8 +345,7 @@
       }
   
       /**
  -     * Method declaration
  -     * @param str
  +     * Sets the database password.
        */
       public void setPassWord(String str)
       {
  
  
  
  1.2       +2 -6      jakarta-ojb/src/java/org/apache/ojb/broker/metadata/SequenceDescriptor.java
  
  Index: SequenceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/SequenceDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SequenceDescriptor.java	9 Jan 2003 16:58:36 -0000	1.1
  +++ SequenceDescriptor.java	30 Jan 2003 15:12:59 -0000	1.2
  @@ -18,11 +18,7 @@
    * All sequence manager implementation specific configuration
    * attributes are represented by key/value pairs in a
    * <code>Properties</code> object and could be reached via
  - * {@link #getConfigurationProperties}.
  - * <br/>
  - * Every new instantiated <code>SequenceDescriptor</code> was associated
  - * with the default sequence manager implementation
  - * {@link org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl}.
  + * {@link #getConfigurationProperties} or {@link #getConfigurationProperty(String key)}.
    *
    * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
    * @version $Id$
  
  
  
  1.12      +2 -2      jakarta-ojb/src/java/org/apache/ojb/broker/platforms/Platform.java
  
  Index: Platform.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/Platform.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Platform.java	9 Jan 2003 17:01:33 -0000	1.11
  +++ Platform.java	30 Jan 2003 15:12:59 -0000	1.12
  @@ -103,7 +103,7 @@
        * connection was returned to pool or closed.
        * Only when
        * {@link org.apache.ojb.broker.metadata.JdbcConnectionDescriptor#getUseAutoCommit()} was set to
  -     * {@link #AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE}
  +     * {@link org.apache.ojb.broker.metadata.JdbcConnectionDescriptor#AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE}
        * the change of the autoCommit state take effect.
        */
       public void changeAutoCommitState(JdbcConnectionDescriptor jcd, Connection con, boolean newState);