[cvs] expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc JoinedDataObjectMetaData.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Mon Sep 20 13:02:17 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc
In directory jcorp2.servlets.net:/tmp/cvs-serv4239

Modified Files:
	JoinedDataObjectMetaData.java 
Log Message:
<Aucun commentaire entré>


Index: JoinedDataObjectMetaData.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JoinedDataObjectMetaData.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** JoinedDataObjectMetaData.java	20 Sep 2004 19:22:29 -0000	1.19
--- JoinedDataObjectMetaData.java	20 Sep 2004 20:02:15 -0000	1.20
***************
*** 90,93 ****
--- 90,96 ----
   * @author Michael Rimov
   * @version $Revision$ on  $Date$
+  *
+  * Modify by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
+  * @since $DatabaseSchema  $Date$
   */
  public class JoinedDataObjectMetaData implements DataObjectMetaData {
***************
*** 949,952 ****
--- 952,993 ----
      }
  
+         /**
+          * Return the Schema Name of the current database object.
+          *
+          * @return String: Schema name of the target table of this database object
+          * @throws DataException upon error
+          *
+          * author Yves Henri AMAIZO <amy_amaizo at compuserve.com>
+          */
+         public String getTargetDbSchema() {
+                 return this.getPrimaryDataObject().getMetaData().getTargetDbSchema();
+         } /* getTargetDbSchema() */
+ 
+         /**
+          * Return the Schema Name of the current database object.
+          *
+          * @return String: Schema name of the target table of this database object
+          * @throws DataException upon error
+          *
+          * author Yves Henri AMAIZO <amy_amaizo at compuserve.com>
+          */
+         public String getTargetDbCatalog() {
+                 return this.getPrimaryDataObject().getMetaData().getTargetDbCatalog();
+         } /* getTargetDbSchema() */
+ 
+         /**
+          * Set the target table for this DBObject. Note that an object
+          * can span tables by the use of virtual fields, but that this table
+          * is the default table for the object.
+          *
+          * @param    theTable Table for this object
+          * @throws DBException
+          *
+          * author Yves Henri AMAIZO <amy_amaizo at compuserve.com>
+          */
+         public String getTargetSQLTable(String dataContext) throws DataException {
+                 return this.getPrimaryDataObject().getMetaData().getTargetSQLTable(this.getPrimaryDataObject().getDataContext());
+         }
+ 
      /**
       * <p>This convenience method iterates through all the
***************
*** 1039,1042 ****
--- 1080,1086 ----
       * @param joinType the type of Join
       * @throws DBException upon error
+      *
+      * Modify by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
+      * @since $DatabaseSchema  $Date$
       */
      public void setForeignKey(String shortName, String foreignKey,
***************
*** 1069,1075 ****
  
          if (joinType == JoinedDataObject.UNSPECIFIED_JOIN) {
!             sqlRelationList.add(foreignDBObj.getJDBCMetaData().getTargetTable() + "." + foreignKey +
!                                 " = " + primaryDBObj.getJDBCMetaData().getTargetTable() + "." +
!                                 primaryKey);
          }
  
--- 1113,1119 ----
  
          if (joinType == JoinedDataObject.UNSPECIFIED_JOIN) {
!                         sqlRelationList.add(foreignDBObj.getJDBCMetaData().getTargetSQLTable(foreignDBObj.getDataContext()) + "." + foreignKey +
!                                                                 " = " + primaryDBObj.getJDBCMetaData().getTargetSQLTable(foreignDBObj.getDataContext()) + "." +
!                                                                 primaryKey);
          }
  



More information about the cvs mailing list