cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r576745 - in /cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map: JpaEntity.java JpaNamedQuery.java
Date Tue, 18 Sep 2007 07:30:41 GMT
Author: aadamchik
Date: Tue Sep 18 00:30:41 2007
New Revision: 576745

URL: http://svn.apache.org/viewvc?rev=576745&view=rev
Log:
adding XML encoding method to the JPA mapping classes. 
still incomplete, until finished will mostly be used for debugging JPA runtime

Modified:
    cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaEntity.java
    cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaNamedQuery.java

Modified: cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaEntity.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaEntity.java?rev=576745&r1=576744&r2=576745&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaEntity.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaEntity.java
Tue Sep 18 00:30:41 2007
@@ -178,7 +178,7 @@
         }
 
         encoder.indent(-1);
-        encoder.print("</entity>");
+        encoder.println("</entity>");
     }
 
     public String getName() {

Modified: cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaNamedQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaNamedQuery.java?rev=576745&r1=576744&r2=576745&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaNamedQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/map/JpaNamedQuery.java
Tue Sep 18 00:30:41 2007
@@ -26,8 +26,10 @@
 import javax.persistence.NamedQuery;
 
 import org.apache.cayenne.util.TreeNodeChild;
+import org.apache.cayenne.util.XMLEncoder;
+import org.apache.cayenne.util.XMLSerializable;
 
-public class JpaNamedQuery {
+public class JpaNamedQuery implements XMLSerializable {
 
     protected String name;
     protected String query;
@@ -45,6 +47,9 @@
         for (int i = 0; i < annotation.hints().length; i++) {
             hints.add(new JpaQueryHint(annotation.hints()[i]));
         }
+    }
+    
+    public void encodeAsXML(XMLEncoder encoder) {
     }
 
     public String getName() {



Mime
View raw message