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/09/03 20:43:02 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/broker Identity.java

arminw      2003/09/03 11:43:02

  Modified:    src/java/org/apache/ojb/broker Identity.java
  Log:
  remove used constructor
  remove deprecated method
  
  Revision  Changes    Path
  1.25      +14 -29    db-ojb/src/java/org/apache/ojb/broker/Identity.java
  
  Index: Identity.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/Identity.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Identity.java	31 Aug 2003 00:48:46 -0000	1.24
  +++ Identity.java	3 Sep 2003 18:43:02 -0000	1.25
  @@ -103,14 +103,6 @@
       private Integer hashCode;
   
       /**
  -     * empty constructor is private.
  -     */
  -    private Identity()
  -    {
  -        super();
  -    }
  -
  -    /**
        * creates an Identity from a class and the objects primary key values.
        * used for the definition of proxies.
        *
  @@ -173,13 +165,14 @@
           }
           catch (Exception e)
           {
  -            throw new ClassNotPersistenceCapableException("Could not init Identity for given object " +
  +            throw new ClassNotPersistenceCapableException("Can not init Identity for given object " +
                       objectToIdentitify.getClass(), e);
           }
       }
   
       /**
  -     * factory method that returns an Identity object from the serialized Identity in anArray.
  +     * Factory method that returns an Identity object from the given
  +     * byte array - see {@link #serialize}.
        */
       public static Identity fromByteArray(byte[] anArray) throws PersistenceBrokerException
       {
  @@ -204,17 +197,7 @@
       }
   
       /**
  -     * return the Class of the real subject
  -     *
  -     * @deprecated use {@link #getObjectsTopLevelClass} instead
  -     */
  -    public Class getObjectsClass()
  -    {
  -        return objectsTopLevelClass;
  -    }
  -
  -    /**
  -     * return the top-level class of the real
  +     * Return the top-level class of the real
        * subject (means class name of a base class,
        * base interface denoted in the repository or
        * objects real class name if none top-level was found)
  @@ -226,7 +209,7 @@
       }
   
       /**
  -     * return the "real" Class of the real subject
  +     * Return the "real" Class of the real subject
        */
       public Class getObjectsRealClass()
       {
  @@ -234,7 +217,7 @@
       }
   
       /**
  -     * set the objects real class
  +     * Set the objects real class
        */
       public void setObjectsRealClass(Class objectsRealClass)
       {
  @@ -242,8 +225,8 @@
       }
   
       /**
  -     * return a serialized Identity as byte[]
  -     *
  +     * Return a serialized Identity as byte[].
  +     * @see #fromByteArray
        */
       public byte[] serialize() throws PersistenceBrokerException
       {
  @@ -303,8 +286,10 @@
           if (this.pkValues.length == 0)
           {
               throw new ClassNotPersistenceCapableException(
  -                    "OJB needs at least one primary key attribute for class " +
  -                    "objectClass=" + this.objectsTopLevelClass + ", objectsRealClass=" + this.objectsRealClass);
  +                    "OJB needs at least one primary key attribute for class "
  +                    + " objectsRealClass=" + this.objectsRealClass
  +                    + ", objectTopLevelClass=" + this.objectsTopLevelClass);
  +
           }
       }
   
  @@ -358,7 +343,7 @@
       {
           // arminw:
           // identity is quasi immutable, thus
  -        // we could note hashCode
  +        // we can note hashCode
           if(hashCode == null)
           {
               int result = this.getObjectsTopLevelClass().hashCode();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org