User: dsundstrom
  Date: 02/02/26 15:28:56

  Modified:    src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge
                        JDBCAbstractCMPFieldBridge.java
                        JDBCCMPFieldBridge.java JDBCCMRFieldBridge.java
                        JDBCEntityBridge.java
  Log:
  Added new methods and interfaces requires by the generic bridge package
  for the new EJB-QL parser.
  
  Moved extraneous log messages to trace level.
  
  Wrapped log messages with isEnabled checks.
  
  Revision  Changes    Path
  1.12      +5 -1      
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCAbstractCMPFieldBridge.java
  
  Index: JDBCAbstractCMPFieldBridge.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCAbstractCMPFieldBridge.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JDBCAbstractCMPFieldBridge.java   12 Feb 2002 22:35:12 -0000      1.11
  +++ JDBCAbstractCMPFieldBridge.java   26 Feb 2002 23:28:55 -0000      1.12
  @@ -40,7 +40,7 @@
    *      One for each entity bean cmp field.       
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    */                            
   public abstract class JDBCAbstractCMPFieldBridge implements JDBCCMPFieldBridge {
      protected JDBCStoreManager manager;
  @@ -75,6 +75,10 @@
   
      public JDBCCMPFieldMetaData getMetaData() {
         return metadata;
  +   }
  +
  +   public JDBCStoreManager getManager() {
  +      return manager;
      }
   
      public String getFieldName() {
  
  
  
  1.10      +10 -5     
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCCMPFieldBridge.java
  
  Index: JDBCCMPFieldBridge.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCCMPFieldBridge.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JDBCCMPFieldBridge.java   15 Jan 2002 20:50:30 -0000      1.9
  +++ JDBCCMPFieldBridge.java   26 Feb 2002 23:28:55 -0000      1.10
  @@ -12,9 +12,10 @@
   import java.sql.ResultSet;
   
   import org.jboss.ejb.EntityEnterpriseContext;
  -import org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData;
  +import org.jboss.ejb.plugins.cmp.bridge.CMPFieldBridge;
  +import org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager;
   import org.jboss.ejb.plugins.cmp.jdbc.JDBCType;
  -
  +import org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData;
   
   /**
    * JDBCCMPFieldBridge represents one CMP field. This implementations of 
  @@ -29,10 +30,9 @@
    *      One for each entity bean cmp field.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
  -public interface JDBCCMPFieldBridge 
  -      extends JDBCFieldBridge {
  +public interface JDBCCMPFieldBridge extends JDBCFieldBridge, CMPFieldBridge {
   
      /**
       * Gets the java class type of the field.
  @@ -44,6 +44,11 @@
       * Get metadata for the field.
       */
      public JDBCCMPFieldMetaData getMetaData();
  +
  +   /**
  +    * Gets the JDBCStoreManager for this field
  +    */
  +   public JDBCStoreManager getManager();
   
      /**
       * Gets the value of this field in the specified primaryKey object.
  
  
  
  1.25      +16 -7     
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCCMRFieldBridge.java
  
  Index: JDBCCMRFieldBridge.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCCMRFieldBridge.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- JDBCCMRFieldBridge.java   22 Feb 2002 04:24:55 -0000      1.24
  +++ JDBCCMRFieldBridge.java   26 Feb 2002 23:28:55 -0000      1.25
  @@ -31,6 +31,8 @@
   import org.jboss.invocation.Invocation;
   import org.jboss.ejb.plugins.CMPPersistenceManager;
   import org.jboss.ejb.plugins.EntityInstanceCache;
  +import org.jboss.ejb.plugins.cmp.bridge.EntityBridge;
  +import org.jboss.ejb.plugins.cmp.bridge.CMRFieldBridge;
   import org.jboss.ejb.plugins.cmp.jdbc.JDBCContext;
   import org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager;
   import org.jboss.ejb.plugins.cmp.jdbc.JDBCType;
  @@ -53,9 +55,9 @@
    *      One for each role that entity has.       
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - * @version $Revision: 1.24 $
  + * @version $Revision: 1.25 $
    */                            
  -public class JDBCCMRFieldBridge implements JDBCFieldBridge {
  +public class JDBCCMRFieldBridge implements JDBCFieldBridge, CMRFieldBridge {
      // ------ Invocation messages ------
      
      /** tells the related continer to retrieve the id of the related entity */
  @@ -445,7 +447,14 @@
      /**
       * The related entity.
       */
  -   public JDBCEntityBridge getRelatedEntity() {
  +   public EntityBridge getRelatedEntity() {
  +      return relatedEntity;
  +   }
  +   
  +   /**
  +    * The related entity.
  +    */
  +   public JDBCEntityBridge getRelatedJDBCEntity() {
         return relatedEntity;
      }
      
  @@ -823,8 +832,8 @@
         }
         
         // check the preload cache
  -      if(log.isDebugEnabled()) {
  -         log.debug("Read ahead cahce load:"+
  +      if(log.isTraceEnabled()) {
  +         log.trace("Read ahead cahce load:"+
                  " cmrField="+getFieldName()+
                  " pk="+myCtx.getId());
         }
  @@ -887,8 +896,8 @@
         // mark the field loaded
         fieldState.setLoaded(true);
         
  -      if(log.isDebugEnabled()) {
  -         log.debug("Preloaded value: "+
  +      if(log.isTraceEnabled()) {
  +         log.trace("Preloaded value: "+
                  " cmrField="+getFieldName()+
                  " pk="+myCtx.getId()+
                  " values="+values);
  
  
  
  1.21      +8 -4      
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCEntityBridge.java
  
  Index: JDBCEntityBridge.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCEntityBridge.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JDBCEntityBridge.java     16 Jan 2002 21:10:15 -0000      1.20
  +++ JDBCEntityBridge.java     26 Feb 2002 23:28:56 -0000      1.21
  @@ -53,7 +53,7 @@
    *      One per cmp entity bean type.       
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - * @version $Revision: 1.20 $
  + * @version $Revision: 1.21 $
    */                            
   public class JDBCEntityBridge implements EntityBridge {
      private JDBCEntityMetaData metadata;
  @@ -298,6 +298,10 @@
         return metadata.getName();
      }
   
  +   public String getAbstractSchemaName() {
  +      return metadata.getAbstractSchemaName();
  +   }
  +
      public JDBCEntityMetaData getMetaData() {
         return metadata;
      }
  @@ -362,14 +366,14 @@
         return fields;
      }
   
  -   public JDBCFieldBridge getFieldByName(String name) {
  -      return (JDBCFieldBridge)fieldsByName.get(name);
  +   public FieldBridge getFieldByName(String name) {
  +      return (FieldBridge)fieldsByName.get(name);
      }
   
      private JDBCFieldBridge getExistingFieldByName(String name)
            throws DeploymentException {
   
  -      JDBCFieldBridge field = getFieldByName(name);
  +      JDBCFieldBridge field = (JDBCFieldBridge)getFieldByName(name);
         if(field == null) {
            throw new DeploymentException("field not found: " + name);
         }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to