db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata ClassDescriptor.java RepositoryXmlHandler.java
Date Mon, 23 Aug 2004 18:35:59 GMT
brj         2004/08/23 11:35:59

  Modified:    src/java/org/apache/ojb/broker/metadata ClassDescriptor.java
                        RepositoryXmlHandler.java
  Log:
  updated javadoc for isInterface(), added isMappedToTable()
  
  Revision  Changes    Path
  1.91      +9 -12     db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java
  
  Index: ClassDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- ClassDescriptor.java	15 Aug 2004 12:42:28 -0000	1.90
  +++ ClassDescriptor.java	23 Aug 2004 18:35:58 -0000	1.91
  @@ -170,10 +170,6 @@
        */
       private int superClassFieldRef;
       /**
  -     * does the described class represent an interface?
  -     */
  -    private boolean m_isInterface = false;
  -    /**
        * the proxy class for the described class, may be null
        */
       private Class proxyClass = null;
  @@ -989,7 +985,7 @@
               Vector vec = new Vector();
               FieldDescriptor[] fields = null;
               // 1.a if descriptor describes an interface: take PK fields from an implementors
ClassDescriptor
  -            if (m_isInterface)
  +            if (!isMappedToTable())
               {
                   if (getExtentClasses().size() == 0)
                   {
  @@ -1618,21 +1614,22 @@
   
       /**
        * Return true, if the described class is
  -     * an interface.
  +     * an 'interface'. That is if the class is <b>not</b> mapped to a table.
  +     * @see mappedToTable()
        */
       public boolean isInterface()
       {
  -        return m_isInterface;
  +        return !isMappedToTable();
       }
   
       /**
  -     * Set <code>true</code> if described class is
  -     * a interface.
  +     * Return true if the class is mapped to a table.
        */
  -    public void setIsInterface(boolean newIsInterface)
  +    public boolean isMappedToTable()
       {
  -        m_isInterface = newIsInterface;
  +        return getTableName() != null;
       }
  +
   
       /**
        * @return boolean true if the mapped class is abstract
  
  
  
  1.61      +1 -5      db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryXmlHandler.java
  
  Index: RepositoryXmlHandler.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryXmlHandler.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- RepositoryXmlHandler.java	15 Aug 2004 12:42:28 -0000	1.60
  +++ RepositoryXmlHandler.java	23 Aug 2004 18:35:58 -0000	1.61
  @@ -240,10 +240,6 @@
                           String table = atts.getValue(RepositoryTags.getTagById(TABLE_NAME));
                           if (isDebug) logger.debug("     " + RepositoryTags.getTagById(TABLE_NAME)
+ ": " + table);
                           m_CurrentCLD.setTableName(table);
  -                        if (table == null)
  -                        {
  -                            m_CurrentCLD.setIsInterface(true);
  -                        }
   
                           // set row-reader attribute
                           String rowreader = atts.getValue(RepositoryTags.getTagById(ROW_READER));
  
  
  

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


Mime
View raw message