roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r505072 [1/2] - in /incubator/roller/branches/roller_4.0: ./ apps/planet/ apps/planet/src/java/org/apache/roller/planet/business/datamapper/ apps/planet/src/java/org/apache/roller/planet/pojos/ components/core/src/java/org/apache/roller/bus...
Date Thu, 08 Feb 2007 22:40:37 GMT
Author: snoopdave
Date: Thu Feb  8 14:40:35 2007
New Revision: 505072

URL: http://svn.apache.org/viewvc?view=rev&rev=505072
Log:
Planet tests passing 100% and Roller tests at 92% with JPA

Added:
    incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetConfigData.orm.xml
    incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetEntryData.orm.xml
    incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetGroupData.orm.xml
    incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetSubscriptionData.orm.xml
    incubator/roller/branches/roller_4.0/metadata/database/HibernateToJPA.xsl
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/AutoPingData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/BookmarkData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/CommentData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/EntryAttributeData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/FolderData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/HitCountData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/ObjectAuditData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PermissionsData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingQueueEntryData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingTargetData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RefererData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RoleData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerConfigData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerPropertyData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/TaskLockData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/UserData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/WeblogCategoryData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/WeblogEntryData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/WeblogEntryTagAggregateData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/WeblogEntryTagData.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/WeblogTemplate.orm.xml
    incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/WebsiteData.orm.xml
    incubator/roller/branches/roller_4.0/web/WEB-INF/classes/META-INF/
    incubator/roller/branches/roller_4.0/web/WEB-INF/classes/META-INF/persistence.xml
Removed:
    incubator/roller/branches/roller_4.0/testdata/JDOPMF.properties
    incubator/roller/branches/roller_4.0/web/WEB-INF/classes/persistence.xml
Modified:
    incubator/roller/branches/roller_4.0/apps/planet/build.xml
    incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/business/datamapper/DatamapperPlanetManagerImpl.java
    incubator/roller/branches/roller_4.0/build.xml
    incubator/roller/branches/roller_4.0/components/core/src/java/org/apache/roller/business/jpa/JPAPersistenceStrategy.java
    incubator/roller/branches/roller_4.0/properties.xmlf
    incubator/roller/branches/roller_4.0/tools/roller-core/roller-core.jar
    incubator/roller/branches/roller_4.0/tools/roller-planet/roller-planet-business.jar
    incubator/roller/branches/roller_4.0/web/WEB-INF/classes/JPAEMF.properties
    incubator/roller/branches/roller_4.0/web/WEB-INF/classes/roller.properties

Modified: incubator/roller/branches/roller_4.0/apps/planet/build.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/apps/planet/build.xml?view=diff&rev=505072&r1=505071&r2=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/apps/planet/build.xml (original)
+++ incubator/roller/branches/roller_4.0/apps/planet/build.xml Thu Feb  8 14:40:35 2007
@@ -143,16 +143,6 @@
             
         </hibernatedoclet>
         
-        <xslt basedir="${build.compile.business}/org/apache/roller/planet/pojos/" includes="*.hbm.xml" 
-            destdir="${build.compile.business}/org/apache/roller/planet/pojos" 
-            style="${src}/../../../../metadata/database/HibernateToJPA.xsl">
-            <xmlcatalog>
-                <dtd publicId="-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-                    location="sandbox/jdobackend/hibernate-mapping-3.0.dtd"/>
-            </xmlcatalog>
-            <mapper type="glob" from="*.hbm.xml" to="*.orm.xml"/>
-	    </xslt>
-    
     </target>
 
     

Modified: incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/business/datamapper/DatamapperPlanetManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/business/datamapper/DatamapperPlanetManagerImpl.java?view=diff&rev=505072&r1=505071&r2=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/business/datamapper/DatamapperPlanetManagerImpl.java (original)
+++ incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/business/datamapper/DatamapperPlanetManagerImpl.java Thu Feb  8 14:40:35 2007
@@ -116,7 +116,7 @@
 
     public PlanetConfigData getConfiguration() throws RollerException {
         List results = (List) strategy.newQuery(PlanetConfigData.class, 
-                "PlanetConfigData.getAll"); 
+                "PlanetConfigData.getAll").execute(); 
         PlanetConfigData config = results.size()!=0 ? 
             (PlanetConfigData)results.get(0) : null;
             
@@ -132,7 +132,7 @@
     public PlanetSubscriptionData getSubscription(String feedUrl)
             throws RollerException {
         List results = (List) strategy.newQuery(PlanetSubscriptionData.class, 
-                "PlanetSubscriptionData.getByFeedURL"); 
+                "PlanetSubscriptionData.getByFeedURL").execute(feedUrl); 
         return results.size()!=0 ? 
             (PlanetSubscriptionData)results.get(0) : null;
     }
@@ -155,7 +155,7 @@
 
     public int getSubscriptionCount() throws RollerException {
         return ((List)strategy.newQuery(PlanetSubscriptionData.class, 
-                "PlanetSubscriptionData.getAll")).size(); 
+                "PlanetSubscriptionData.getAll").execute()).size(); 
     }
 
     public List getTopSubscriptions(int offset, int length) 

Added: incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetConfigData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetConfigData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetConfigData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetConfigData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name=""
+            class="org.apache.roller.planet.pojos.PlanetConfigData">
+        <table name="rag_config"/>
+        <table-generator name="ROLLER-TABLE-GENERATOR" table="ROLLER_ID_TABLE" pk-column-name="pk" value-column-name="value" pk-column-value="1"/>
+        <named-query name="PlanetConfigData.getAll">
+            <query>SELECT p FROM PlanetConfigData p</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="groupPage">
+                <column name="group_page" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="mainPage">
+                <column name="main_page" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="proxyHost">
+                <column name="proxy_host" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="proxyPort">
+                <column name="proxy_port" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="siteURL">
+                <column name="site_url" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="adminEmail">
+                <column name="admin_email" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="adminName">
+                <column name="admin_name" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="outputDir">
+                <column name="output_dir" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="templateDir">
+                <column name="template_dir" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="description">
+                <column name="description" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="title">
+                <column name="title" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="cacheDir">
+                <column name="cache_dir" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="defaultGroup"
+                         target-entity="org.apache.roller.planet.pojos.PlanetGroupData">
+                <join-column name="default_group_id" insertable="true" updatable="true"
+                             nullable="true"/>
+                <cascade>
+                    <cascade-all/>
+                </cascade>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetEntryData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetEntryData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetEntryData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetEntryData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="" class="org.apache.roller.planet.pojos.PlanetEntryData">
+        <table name="rag_entry"/>
+        <table-generator name="ROLLER-TABLE-GENERATOR" table="ROLLER_ID_TABLE" pk-column-name="pk" value-column-name="value" pk-column-value="1"/>
+        <named-query name="PlanetEntryData.getByFeedURL">
+            <query>SELECT p FROM PlanetEntryData p WHERE p.subscription.feedURL = ?1</query>
+        </named-query>
+        <named-query name="PlanetEntryData.getByGroup&amp;EndDateOrderByPubTimeDesc">
+            <query>SELECT p FROM PlanetEntryData p JOIN p.subscription s JOIN s.groups g
+                WHERE g =?1 AND p.pubTime &lt; ?2
+                ORDER BY p.pubTime DESC
+            </query>
+        </named-query>
+        <named-query name="PlanetEntryData.getByGroup&amp;EndDate&amp;StartDateOrderByPubTimeDesc">
+            <query>SELECT p FROM PlanetEntryData p JOIN p.subscription s JOIN s.groups g
+                WHERE g=?1 AND p.pubTime &lt; ?2 AND p.pubTime &gt; ?3
+                ORDER BY p.pubTime DESC
+            </query>
+        </named-query>
+        <named-query
+                name="PlanetEntryData.getByExternalOrInternalGroup&amp;EndDate&amp;StartDateOrderByPubTimeDesc">
+            <query>SELECT p FROM PlanetEntryData p JOIN p.subscription s JOIN s.groups g
+                WHERE (g.handle = 'external' OR g.handle = 'all')
+                AND p.pubTime &lt; ?2 AND p.pubTime &gt; ?3
+                ORDER BY p.pubTime DESC
+            </query>
+        </named-query>
+        <named-query
+                name="PlanetEntryData.getByExternalOrInternalGroup&amp;EndDateOrderByPubTimeDesc">
+            <query>SELECT p FROM PlanetEntryData p JOIN p.subscription s JOIN s.groups g
+                WHERE (g.handle = "external" OR g.handle = "all")
+                AND p.pubTime &lt; ?2
+                ORDER BY p.pubTime DESC
+            </query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="categoriesString">
+                <column name="categories" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="author">
+                <column name="author" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="text">
+                <column name="content" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="guid">
+                <column name="guid" insertable="true" updatable="true" unique="true"/>
+            </basic>
+            <basic name="handle">
+                <column name="handle" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="pubTime">
+                <column name="published" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="permalink">
+                <column name="permalink" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="title">
+                <column name="title" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="updateTime">
+                <column name="updated" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="subscription"
+                         target-entity="org.apache.roller.planet.pojos.PlanetSubscriptionData">
+                <join-column name="subscription_id" insertable="true" updatable="true"
+                             nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetGroupData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetGroupData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetGroupData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetGroupData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="PlanetGroupData" class="org.apache.roller.planet.pojos.PlanetGroupData">
+        <table name="rag_group"/>
+        <table-generator name="ROLLER-TABLE-GENERATOR" table="ROLLER_ID_TABLE" pk-column-name="pk" value-column-name="value" pk-column-value="1"/>
+        <named-query name="PlanetGroupData.getByHandle">
+            <query>SELECT p FROM PlanetGroupData p WHERE p.handle = ?1</query>
+        </named-query>
+        <named-query name="PlanetGroupData.getAll">
+            <query>SELECT p FROM PlanetGroupData p</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="categoryRestriction">
+                <column name="cat_restriction" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="description">
+                <column name="description" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="handle">
+                <column name="handle" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="maxFeedEntries">
+                <column name="max_feed_entries" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="maxPageEntries">
+                <column name="max_page_entries" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="title">
+                <column name="title" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-many name="subscriptions"
+                          target-entity="org.apache.roller.planet.pojos.PlanetSubscriptionData"
+                          mapped-by="groups"/>
+            <transient name="categoryRestrictionAsArray"/>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetSubscriptionData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetSubscriptionData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetSubscriptionData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/apps/planet/src/java/org/apache/roller/planet/pojos/PlanetSubscriptionData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="PlanetSubscriptionData"
+            class="org.apache.roller.planet.pojos.PlanetSubscriptionData">
+        <table name="rag_subscription"/>
+        <table-generator name="ROLLER-TABLE-GENERATOR" table="ROLLER_ID_TABLE" pk-column-name="pk" value-column-name="value" pk-column-value="1"/>
+        <named-query name="PlanetSubscriptionData.getAll">
+            <query>SELECT p FROM PlanetSubscriptionData p</query>
+        </named-query>
+        <named-query name="PlanetSubscriptionData.getAllOrderByInboundBlogsDesc">
+            <query>SELECT p FROM PlanetSubscriptionData p ORDER BY p.inboundblogs DESC</query>
+        </named-query>
+        <named-query name="PlanetSubscriptionData.getByGroupHandleOrderByInboundBlogsDesc">
+            <query>SELECT p FROM PlanetSubscriptionData p JOIN p.groups g WHERE g.handle = ?1 ORDER
+                BY p.inboundblogs DESC
+            </query>
+        </named-query>
+        <named-query name="PlanetSubscriptionData.getByFeedURL">
+            <query>SELECT p FROM PlanetSubscriptionData p WHERE p.feedURL = ?1</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="feedURL">
+                <column name="feed_url" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="lastUpdated">
+                <column name="last_updated" insertable="true" updatable="true" unique="false"/>
+                <temporal>TIMESTAMP</temporal>
+            </basic>
+            <basic name="siteURL">
+                <column name="site_url" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="title">
+                <column name="title" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="author">
+                <column name="author" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="inboundlinks">
+                <column name="inbound_links" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="inboundblogs">
+                <column name="inbound_blogs" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-many name="groups"
+                          target-entity="org.apache.roller.planet.pojos.PlanetGroupData">
+                <join-table name="rag_group_subscription">
+                    <join-column name="subscription_id"/>
+                    <inverse-join-column name="group_id"/>
+                </join-table>
+            </many-to-many>
+            <transient name="name"/>
+            <transient name="entries"/>
+            <transient name="url"/>
+        </attributes>
+    </entity>
+</entity-mappings>

Modified: incubator/roller/branches/roller_4.0/build.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/build.xml?view=diff&rev=505072&r1=505071&r2=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/build.xml (original)
+++ incubator/roller/branches/roller_4.0/build.xml Thu Feb  8 14:40:35 2007
@@ -1147,32 +1147,6 @@
     </javac>
 </target>
 
-
-<!-- ********************************************************************* -->
-<!-- Gen JPA mappings  -->
-<!-- ********************************************************************* -->
-
-<target name="gen-jpa-mapping" description="Generate JPA mapping files from hiberatem mappings">
-	<xslt basedir="${build.compile.business}/org/apache/roller/pojos" includes="*.hbm.xml" 
-		destdir="${build.compile.business}/org/apache/roller/pojos/jpa" style="sandbox/jdobackend/HibernateToJPA.xsl">
-  		<xmlcatalog>
-			<dtd publicId="-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-			    location="sandbox/jdobackend/hibernate-mapping-3.0.dtd"/>
-		</xmlcatalog>
-		<mapper type="glob" from="*.hbm.xml" to="*.orm.xml"/>
-	</xslt>
-	
-	<xslt basedir="${build.compile.business}/org/apache/roller/planet/pojos/" includes="*.hbm.xml" 
-		destdir="${build.compile.business}/org/apache/roller/planet/pojos/jpa" style="sandbox/jdobackend/HibernateToJPA.xsl">
-  		<xmlcatalog>
-			<dtd publicId="-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-			    location="sandbox/jdobackend/hibernate-mapping-3.0.dtd"/>
-		</xmlcatalog>
-		<mapper type="glob" from="*.hbm.xml" to="*.orm.xml"/>
-	</xslt>
-	
-</target>
-
 	    
 <!-- ********************************************************************* -->
 <!-- Derby start, init and stop targets -->
@@ -1232,6 +1206,33 @@
     </sql>  
     -->
 </target>
+
+<!-- ********************************************************************* -->
+<!-- One shot JPA mapping generation: resulting files must be tweaked  -->
+<!-- ********************************************************************* -->
+
+<!--
+<target name="gen-jpa-mapping" description="Generate JPA mapping files from hiberatem mappings">
+	<xslt basedir="${build.compile.business}/org/apache/roller/pojos" includes="*.hbm.xml" 
+		destdir="${build.compile.business}/org/apache/roller/pojos/jpa" style="sandbox/jdobackend/HibernateToJPA.xsl">
+  		<xmlcatalog>
+			<dtd publicId="-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+			    location="sandbox/jdobackend/hibernate-mapping-3.0.dtd"/>
+		</xmlcatalog>
+		<mapper type="glob" from="*.hbm.xml" to="*.orm.xml"/>
+	</xslt>
+	
+	<xslt basedir="${build.compile.business}/org/apache/roller/planet/pojos/" includes="*.hbm.xml" 
+		destdir="${build.compile.business}/org/apache/roller/planet/pojos/jpa" style="sandbox/jdobackend/HibernateToJPA.xsl">
+  		<xmlcatalog>
+			<dtd publicId="-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+			    location="sandbox/jdobackend/hibernate-mapping-3.0.dtd"/>
+		</xmlcatalog>
+		<mapper type="glob" from="*.hbm.xml" to="*.orm.xml"/>
+	</xslt>
+	
+</target>
+-->
 
 <!-- ********************************************************************* -->
 <!-- Experimental Admin API SDK -->

Modified: incubator/roller/branches/roller_4.0/components/core/src/java/org/apache/roller/business/jpa/JPAPersistenceStrategy.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/components/core/src/java/org/apache/roller/business/jpa/JPAPersistenceStrategy.java?view=diff&rev=505072&r1=505071&r2=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/components/core/src/java/org/apache/roller/business/jpa/JPAPersistenceStrategy.java (original)
+++ incubator/roller/branches/roller_4.0/components/core/src/java/org/apache/roller/business/jpa/JPAPersistenceStrategy.java Thu Feb  8 14:40:35 2007
@@ -73,6 +73,7 @@
             this.emf =
                 Persistence.createEntityManagerFactory(puName, emfProps);
         } catch (PersistenceException pe) {
+            logger.debug("ERROR: creating entity manager", pe);
             throw new RollerException(pe);
         }
     }

Added: incubator/roller/branches/roller_4.0/metadata/database/HibernateToJPA.xsl
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/metadata/database/HibernateToJPA.xsl?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/metadata/database/HibernateToJPA.xsl (added)
+++ incubator/roller/branches/roller_4.0/metadata/database/HibernateToJPA.xsl Thu Feb  8 14:40:35 2007
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:output method="xml" indent="yes"/>
+    <xsl:variable name="packageNamePrefix" select="'org.apache.roller.pojos.'"/>
+    <xsl:template match="/">
+        <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd orm_1_0.xsd" version="1.0">
+            <description>Persistence Metadata for Roller</description>
+            <persistence-unit-metadata>
+                <!--xml-mapping-metadata-complete/-->
+                <persistence-unit-defaults>
+                    <access>PROPERTY</access>
+                    <!--cascade-persist/-->
+                </persistence-unit-defaults>
+            </persistence-unit-metadata>
+            <package>org.apache.roller.pojos</package>			
+            <xsl:apply-templates select="hibernate-mapping/class"/>
+        </entity-mappings>
+    </xsl:template>
+    <xsl:template match="hibernate-mapping/class">
+        <entity  metadata-complete="true">
+            <xsl:attribute name="name">
+                <xsl:value-of select="substring-after(@name,$packageNamePrefix)"/>
+            </xsl:attribute>
+            <xsl:attribute name="class">
+                <xsl:value-of select="@name"/>
+            </xsl:attribute>
+            <table>
+                <xsl:attribute name="name">
+                    <xsl:value-of select="@table"/>
+                </xsl:attribute>
+            </table>
+            <attributes>
+                <xsl:apply-templates select="id"/>
+                <xsl:for-each select="property">
+                    <xsl:call-template name="process-property"/>
+                </xsl:for-each>
+                <xsl:for-each select="many-to-one">
+                    <xsl:call-template name="process-many-to-one"/>    
+                </xsl:for-each>
+            </attributes>
+        </entity>
+    </xsl:template>       
+    
+    <xsl:template name="process-property">
+        <basic>
+            <xsl:attribute name="name">
+                <xsl:value-of select="@name"/>
+            </xsl:attribute>
+            <column>
+		<xsl:attribute name="name">
+		    <xsl:value-of select="@column"/>
+		</xsl:attribute>
+                <xsl:attribute name="insertable">
+                    <xsl:value-of select="@insert"/>
+                </xsl:attribute>
+                <xsl:attribute name="updatable">
+                    <xsl:value-of select="@update"/>
+                </xsl:attribute>
+                <xsl:attribute name="unique">
+                    <xsl:value-of select="@unique"/>
+                </xsl:attribute>
+            </column>
+        </basic>
+    </xsl:template>
+    <xsl:template name="process-many-to-one">
+        <many-to-one>
+            <xsl:attribute name="name">
+                <xsl:value-of select="@name"/>
+            </xsl:attribute>
+            <xsl:attribute name="target-entity">
+                <xsl:value-of select="@class"/>
+            </xsl:attribute>
+            <join-column>
+                <xsl:attribute name="name">
+                    <xsl:value-of select="@column"/>
+                </xsl:attribute>
+                <xsl:attribute name="insertable">
+                    <xsl:value-of select="@insert"/>
+                </xsl:attribute>
+                <xsl:attribute name="updatable">
+                    <xsl:value-of select="@update"/>
+                </xsl:attribute>
+                <xsl:if  test= "boolean(@not-null)">
+                    <xsl:attribute name="nullable">
+                        <xsl:choose>
+                            <xsl:when test="@not-null = 'true' ">
+                                <xsl:text>false</xsl:text>
+                            </xsl:when>
+                            <xsl:when test="@not-null = 'false' ">
+                                <xsl:text>true</xsl:text>
+                            </xsl:when>
+                        </xsl:choose>
+                    </xsl:attribute>
+                </xsl:if>
+            </join-column>
+            <xsl:if test="@cascade = 'all'">
+                <cascade>
+                    <cascade-all/>
+                </cascade>
+            </xsl:if>
+        </many-to-one>
+    </xsl:template>
+    <xsl:template match="id">
+        <id>
+            <xsl:attribute name="name">
+                <xsl:value-of select="@name"/>
+            </xsl:attribute>
+            <column>
+            <xsl:attribute name="name">
+                <xsl:value-of select="@column"/>
+            </xsl:attribute>
+            </column>
+        </id>
+    </xsl:template>
+    
+</xsl:stylesheet>
+

Modified: incubator/roller/branches/roller_4.0/properties.xmlf
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/properties.xmlf?view=diff&rev=505072&r1=505071&r2=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/properties.xmlf (original)
+++ incubator/roller/branches/roller_4.0/properties.xmlf Thu Feb  8 14:40:35 2007
@@ -133,11 +133,11 @@
     <include name="hibernate3.jar"/>
 </fileset>
 
-<fileset id="jpa.jars" dir="${tools.jpa}/lib">
+<fileset id="hibernate.jars" dir="${tools.hibernate}/lib">
     <include name="*.jar"/>
 </fileset>
 
-<fileset id="hibernate.jars" dir="${tools.hibernate}/lib">
+<fileset id="jpa.jars" dir="${ro.tools}/jpa">
     <include name="*.jar"/>
 </fileset>
 
@@ -170,6 +170,7 @@
     <path refid="base.path"/>
     <fileset refid="hibernate.jar" />
     <fileset refid="hibernate.jars" />
+    <fileset refid="jpa.jars" />
 </path>
 
 <path id="presentation.path">

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/AutoPingData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/AutoPingData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/AutoPingData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/AutoPingData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="AutoPingData"
+            class="org.apache.roller.pojos.AutoPingData">
+        <table name="autoping"/>
+        <table-generator name="ROLLER-TABLE-GENERATOR" table="ROLLER_ID_TABLE" pk-column-name="pk" value-column-name="value" pk-column-value="1"/>
+        <named-query name="AutoPingData.getByPingTarget">
+            <query>SELECT a FROM AutoPingData a WHERE a.pingTarget = ?1</query>
+        </named-query>
+        <named-query name="AutoPingData.getByWebsite">
+            <query>SELECT a FROM AutoPingData a WHERE a.website = ?1</query>
+        </named-query>
+        <named-query name="AutoPingData.removeByPingTarget">
+            <query>DELETE FROM AutoPingData a WHERE a.pingTarget = ?1</query>
+        </named-query>
+        <named-query name="AutoPingData.removeByPingTarget&amp;Website">
+            <query>DELETE FROM AutoPingData a WHERE a.pingTarget = ?1 AND a.website = ?2</query>
+        </named-query>
+        <named-query name="AutoPingData.removeAll">
+            <query>DELETE FROM AutoPingData a</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <many-to-one name="website" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="websiteid" insertable="true" updatable="true" nullable="true"/>
+            </many-to-one>
+            <many-to-one name="pingTarget" target-entity="org.apache.roller.pojos.PingTargetData">
+                <join-column name="pingtargetid" insertable="true" updatable="true"
+                             nullable="true"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/BookmarkData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/BookmarkData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/BookmarkData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/BookmarkData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="BookmarkData"
+            class="org.apache.roller.pojos.BookmarkData">
+        <table name="bookmark"/>
+        <named-query name="BoomarkData.getByFolder">
+            <query>SELECT b FROM BookmarkData b WHERE b.folder = ?1</query>
+        </named-query>
+        <named-query name="BoomarkData.getByFolder.pathLike&amp;Folder.website">
+            <query>SELECT b FROM BookmarkData b WHERE b.folder.path LIKE ?1 AND b.folder.website = ?2</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="name">
+                <column name="name" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="description">
+                <column name="description" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="url">
+                <column name="url" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="weight">
+                <column name="weight" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="priority">
+                <column name="priority" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="image">
+                <column name="image" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="feedUrl">
+                <column name="feedurl" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="folder" target-entity="org.apache.roller.pojos.FolderData">
+                <join-column name="folderid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/CommentData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/CommentData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/CommentData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/CommentData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="CommentData" class="org.apache.roller.pojos.CommentData">
+        <table name="roller_comment"/>
+        <named-query name="CommentData.getCountAllDistinctByStatus">
+            <!-- DISTINCT is not required for this query as comments would never be duplicated in retrieved result-->
+            <query>SELECT COUNT(c) FROM CommentData c where c.status = ?1</query>
+        </named-query>
+        <named-query name="CommentData.getCountDistinctByWebsite&amp;Status">
+            <!-- DISTINCT is not required for this query as comments would never be duplicated in retrieved result-->
+            <query>SELECT COUNT(c) FROM CommentData c WHERE c.weblogEntry.website = ?1 AND c.status = ?2</query>
+        </named-query>
+        <named-query name="CommentData.getMostCommentedWebsiteByEndDate">
+            <!--
+            DISTINCT is not required for this query - comments would never be duplicated in retrieved result 
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(c), c.weblogEntry.website.id, c.weblogEntry.website.handle, c.weblogEntry.website.name
+                   FROM CommentData c WHERE c.weblogEntry.pubTime &lt; ?1
+                   GROUP BY c.weblogEntry.website.id, c.weblogEntry.website.handle, c.weblogEntry.website.name
+            </query>
+        </named-query>
+        <named-query name="CommentData.getMostCommentedWebsiteByEndDate&amp;StartDate">
+            <!--
+            DISTINCT is not required for this query - comments would never be duplicated in retrieved result
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(c), c.weblogEntry.website.id, c.weblogEntry.website.handle, c.weblogEntry.website.name
+                   FROM CommentData c WHERE c.weblogEntry.pubTime &lt; ?1 AND c.weblogEntry.pubTime &gt; ?2
+                GROUP BY c.weblogEntry.website.id, c.weblogEntry.website.handle, c.weblogEntry.website.name
+            </query>
+        </named-query>
+        <named-query name="CommentData.getMostCommentedWeblogEntryByEndDate">
+            <!--
+            DISTINCT is not required for this query - comments would never be duplicated in retrieved result
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(c), c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+                   FROM CommentData c WHERE c.weblogEntry.pubTime &lt; ?1
+                   GROUP BY c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+            </query>
+        </named-query>
+        <named-query name="CommentData.getMostCommentedWeblogEntryByEndDate&amp;StartDate">
+            <!--
+            DISTINCT is not required for this query - comments would never be duplicated in retrieved result
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(c), c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+                   FROM CommentData c WHERE c.weblogEntry.pubTime &lt; ?1 AND c.weblogEntry.pubTime &gt; ?2
+                   GROUP BY c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+            </query>
+        </named-query>
+        <named-query name="CommentData.getMostCommentedWeblogEntryByWebsite&amp;EndDate">
+            <!--
+            DISTINCT is not required for this query - comments would never be duplicated in retrieved result
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(c), c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+                   FROM CommentData c WHERE c.weblogEntry.website = ?1 AND c.weblogEntry.pubTime &lt; ?2
+                  GROUP BY c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+            </query>
+        </named-query>
+        <named-query name="CommentData.getMostCommentedWeblogEntryByWebsite&amp;EndDate&amp;StartDate">
+            <!--
+            DISTINCT is not required for this query - comments would never be duplicated in retrieved result
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(c), c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+                   FROM CommentData c WHERE c.weblogEntry.website = ?1
+                                        AND c.weblogEntry.pubTime &lt; ?2 AND c.weblogEntry.pubTime &gt; ?3
+                  GROUP BY c.weblogEntry.website.handle, c.weblogEntry.anchor, c.weblogEntry.title
+            </query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="name">
+                <column name="name" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="email">
+                <column name="email" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="url">
+                <column name="url" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="content">
+                <column name="content" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="postTime">
+                <column name="posttime" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="status">
+                <column name="status" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="notify">
+                <column name="notify" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="remoteHost">
+                <column name="remotehost" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="referrer">
+                <column name="referrer" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="userAgent">
+                <column name="useragent" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="weblogEntry" target-entity="org.apache.roller.pojos.WeblogEntryData">
+                <join-column name="entryid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+            <transient name="timestamp"/>
+            <transient name="spam"/>
+            <transient name="pending"/>
+            <transient name="approved"/>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/EntryAttributeData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/EntryAttributeData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/EntryAttributeData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/EntryAttributeData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="EntryAttributeData"
+            class="org.apache.roller.pojos.EntryAttributeData">
+        <table name="entryattribute"/>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="name">
+                <column name="name" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="value">
+                <column name="value" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="entry" target-entity="org.apache.roller.pojos.WeblogEntryData">
+                <join-column name="entryid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/FolderData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/FolderData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/FolderData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/FolderData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="FolderData" class="org.apache.roller.pojos.FolderData">
+        <table name="folder"/>
+        <named-query name="FolderData.getByWebsite">
+            <query>SELECT f FROM FolderData f WHERE f.website = ?1</query>
+        </named-query>
+        <named-query name="FolderData.getByWebsite&amp;Path">
+            <query>SELECT f FROM FolderData f WHERE f.website = ?1 AND f.path = ?2</query>
+        </named-query>
+        <named-query name="FolderData.getByWebsite&amp;ParentNull">
+            <query>SELECT f FROM FolderData f WHERE f.website = ?1 AND f.parent IS NULL</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="name">
+                <column name="name" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="path">
+                <column name="path" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="description">
+                <column name="description" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="website" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="websiteid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+            <many-to-one name="parent" target-entity="org.apache.roller.pojos.FolderData">
+                <join-column name="parentid" insertable="true" updatable="true" nullable="true"/>
+            </many-to-one>
+            <one-to-many name="folders" mapped-by="parent" target-entity="org.apache.roller.pojos.FolderData"  fetch="LAZY">
+                <cascade>
+                    <cascade-remove/>
+                </cascade>
+            </one-to-many>
+            <one-to-many name="bookmarks" mapped-by="folder" target-entity="org.apache.roller.pojos.BookmarkData" fetch="LAZY">
+                <order-by>name</order-by>
+                <cascade>
+                    <cascade-all/>
+                </cascade>
+            </one-to-many>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/HitCountData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/HitCountData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/HitCountData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/HitCountData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="HitCountData" class="org.apache.roller.pojos.HitCountData">
+        <table name="roller_hitcounts"/>
+        <named-query name="HitCountData.getByWeblog">
+            <query>SELECT h FROM HitCountData h WHERE h.weblog = ?1</query>
+        </named-query>
+        <named-query name="HitCountData.getByWeblogEnabledTrueAndActiveTrue&amp;DailyHitsGreaterThenZero&amp;WeblogLastModifiedGreaterOrderByDailyHitsDesc">
+            <query>SELECT h FROM HitCountData h WHERE h.weblog.enabled = true AND h.weblog.active = true
+                                                  AND h.weblog.lastModified > ?1 AND h.dailyHits > 0
+                                                ORDER BY h.dailyHits DESC
+            </query>
+        </named-query>
+        <named-query name="HitCountData.updateDailyHitCountZero">
+            <query>UPDATE HitCountData h SET h.dailyHits = 0</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="dailyHits">
+                <column name="dailyhits" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="weblog" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="websiteid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/ObjectAuditData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/ObjectAuditData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/ObjectAuditData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/ObjectAuditData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="ObjectAuditData"
+            class="org.apache.roller.pojos.ObjectAuditData">
+        <table name="roller_audit_log"/>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="changeTime">
+                <column name="change_time" insertable="true" updatable="true" unique="false"/>
+                <temporal>TIMESTAMP</temporal>
+            </basic>
+            <basic name="comment">
+                <column name="comment_text" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="objectClass">
+                <column name="object_class" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="objectId">
+                <column name="object_id" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="userId">
+                <column name="user_id" insertable="true" updatable="true" unique="false"/>
+            </basic>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PermissionsData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PermissionsData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PermissionsData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PermissionsData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="PermissionsData"
+            class="org.apache.roller.pojos.PermissionsData">
+        <table name="roller_user_permissions"/>
+        <named-query name="PermissionsData.getByWebsiteAndUser">
+            <query>SELECT p FROM PermissionsData p WHERE p.website = ?1 AND p.user = ?2</query>
+        </named-query>
+        <named-query name="PermissionsData.getByUserAndPending">
+            <query>SELECT p FROM PermissionsData p WHERE p.user = ?1 AND p.pending = ?2</query>
+        </named-query>
+        <named-query name="PermissionsData.getByWebsiteAndPending">
+            <query>SELECT p FROM PermissionsData p WHERE p.website = ?1 AND p.pending = ?2</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="permissionMask">
+                <column name="permission_mask" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="pending">
+                <column name="pending" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="website" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="website_id" insertable="true" updatable="true" nullable="true"/>
+            </many-to-one>
+            <many-to-one name="user" target-entity="org.apache.roller.pojos.UserData">
+                <join-column name="user_id" insertable="true" updatable="true" nullable="true"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="PingCategoryRestrictionData"
+            class="org.apache.roller.pojos.PingCategoryRestrictionData">
+        <table name="pingcategory"/>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <many-to-one name="autoping" target-entity="org.apache.roller.pojos.AutoPingData">
+                <join-column name="autopingid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+            <many-to-one name="weblogCategory"
+                         target-entity="org.apache.roller.pojos.WeblogCategoryData">
+                <join-column name="weblogcategoryid" insertable="true" updatable="true"
+                             nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingQueueEntryData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingQueueEntryData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingQueueEntryData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingQueueEntryData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="PingQueueEntryData"
+            class="org.apache.roller.pojos.PingQueueEntryData">
+        <table name="pingqueueentry"/>
+        <named-query name="PingQueueEntryData.getAllOrderByEntryTime">
+            <query>SELECT p FROM PingQueueEntryData p ORDER BY p.entryTime</query>
+        </named-query>
+        <named-query name="PingQueueEntryData.getByPingTarget&amp;Website">
+            <query>SELECT p FROM PingQueueEntryData p WHERE p.pingTarget = ?1 AND p.website = ?2
+            </query>
+        </named-query>
+        <named-query name="PingQueueEntryData.getByWebsite">
+            <query>SELECT p FROM PingQueueEntryData p WHERE p.website = ?1</query>
+        </named-query>
+        <named-query name="PingQueueEntryData.removeByPingTarget">
+            <query>DELETE FROM PingQueueEntryData p WHERE p.pingTarget = ?1</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="entryTime">
+                <column name="entrytime" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="attempts">
+                <column name="attempts" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="pingTarget" target-entity="org.apache.roller.pojos.PingTargetData">
+                <join-column name="pingtargetid" insertable="true" updatable="true"
+                             nullable="false"/>
+            </many-to-one>
+            <many-to-one name="website" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="websiteid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingTargetData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingTargetData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingTargetData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/PingTargetData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="PingTargetData"
+            class="org.apache.roller.pojos.PingTargetData">
+        <table name="pingtarget"/>
+        <named-query name="PingTargetData.getByWebsiteNullOrderByName">
+            <query>SELECT p FROM PingTargetData p WHERE p.website IS NULL ORDER BY p.name</query>
+        </named-query>
+        <named-query name="PingTargetData.getByWebsiteOrderByName">
+            <query>SELECT p FROM PingTargetData p WHERE p.website = ?1 ORDER BY p.name</query>
+        </named-query>
+        <named-query name="PingTargetData.removeByPingTarget">
+            <query>DELETE FROM PingTargetData p WHERE p.website IS NOT NULL</query>
+        </named-query>
+        <named-query name="PingTargetData.removeByWebsiteNotNull">
+            <query>DELETE FROM PingTargetData p WHERE p.website IS NOT NULL</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="name">
+                <column name="name" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="pingUrl">
+                <column name="pingurl" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="conditionCode">
+                <column name="conditioncode" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="lastSuccess">
+                <column name="lastsuccess" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="autoEnabled">
+                <column name="autoenabled" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="website" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="websiteid" insertable="true" updatable="true" nullable="true"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RefererData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RefererData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RefererData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RefererData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="RefererData" class="org.apache.roller.pojos.RefererData">
+        <table name="referer"/>
+        <named-query name="RefererData.getByWeblogEntry&amp;TitleNotNull&amp;ExcerptNotNullOrderByTotalHitsDesc">
+            <query>SELECT r FROM RefererData r WHERE r.weblogEntry = ?1 AND r.title IS NOT NULL AND r.excerpt IS NOT NULL
+                                               ORDER BY r.totalHits DESC</query>
+        </named-query>
+        <named-query name="RefererData.getByWeblogEntry">
+                <query>SELECT r FROM RefererData r WHERE r.weblogEntry = ?1</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsiteOrderByTotalHitsDesc">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 ORDER BY r.totalHits DESC</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite&amp;DateString&amp;DuplicateOrderByTotalHitsDesc">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 AND r.dateString = ?2 AND r.duplicate = ?3
+                                               ORDER BY r.totalHits DESC</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite&amp;DayHitsGreaterZeroOrderByDayHitsDesc">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 AND r.dayHits > 0 ORDER BY r.dayHits DESC</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite&amp;DateString&amp;RefererPermalink">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 AND r.dateString = ?2 AND r.refererPermalink = ?3</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite&amp;RefererUrl">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 AND r.refererUrl = ?2</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite&amp;RequestUrl&amp;RefererUrl">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 AND r.requestUrl = ?2 AND r.refererUrl = ?3</query>
+        </named-query>
+        <named-query name="RefererData.getByWebsite&amp;RequestURL&amp;TitleOrExcerpt">
+            <query>SELECT r FROM RefererData r WHERE r.website = ?1 AND r.requestUrl = ?2
+                                                AND (r.title = ?3 OR r.excerpt = ?4)</query>
+        </named-query>
+        <named-query name="RefererData.getHotWeblogsByWebsite.enabled&amp;Website.active&amp;Website.lastModifiedGreater">
+            <!--
+            DISTINCT is not required for this query - RefererData would never be duplicated in retrieved result
+            because all the navigations from c are for ManyToOne relationship.
+            -->
+            <query>SELECT COUNT(r), r.website.id, r.website.name, r.website.handle
+                FROM RefererData r WHERE r.website.enabled = ?1 AND r.website.active = ?2 AND r.website.lastModified &gt; ?3
+                GROUP BY r.website.id, r.website.name, r.website.handle
+            </query>
+        </named-query>
+        <named-query name="RefererData.getDaysPopularWebsitesByWebsite.enabled&amp;Website.active">
+            <query>SELECT SUM(DISTINCT r.dayHits), r.website.id, r.website.name, r.website.handle
+                FROM RefererData r WHERE r.website.enabled = ?1 AND r.website.active = ?2
+                GROUP BY r.website.id, r.website.name, r.website.handle
+            </query>
+        </named-query>
+        <named-query name="RefererData.getHitsByWebsite.enabled&amp;Website.id">
+            <query>SELECT SUM(r.dayHits), SUM(r.totalHits)
+                FROM RefererData r WHERE r.website.enabled = ?1 AND r.website.id = ?2
+            </query>
+        </named-query>
+        <named-query name="RefererData.clearDayHits">
+            <query>UPDATE RefererData r SET r.dayHits=0</query>
+        </named-query>
+        <named-query name="RefererData.clearDayHitsByWebsite">
+            <query>UPDATE RefererData r SET r.dayHits=0 where r.website = ?1</query>
+        </named-query>
+        <named-query name="RefererData.removeByNullOrEmptyExcerpt">
+            <query>DELETE FROM RefererData r WHERE r.excerpt IS NULL OR r.excerpt LIKE ''</query>
+        </named-query>
+        <named-query name="RefererData.removeByNullOrEmptyExcerpt&amp;Website">
+            <query>DELETE FROM RefererData r WHERE r.website = ?1 AND (r.excerpt IS NULL OR r.excerpt LIKE '')</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="dateString">
+                <column name="datestr" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="refererUrl">
+                <column name="refurl" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="refererPermalink">
+                <column name="refpermalink" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="requestUrl">
+                <column name="requrl" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="title">
+                <column name="title" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="excerpt">
+                <column name="excerpt" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="visible">
+                <column name="visible" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="duplicate">
+                <column name="duplicate" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="dayHits">
+                <column name="dayhits" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="totalHits">
+                <column name="totalhits" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="website" target-entity="org.apache.roller.pojos.WebsiteData">
+                <join-column name="websiteid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+            <many-to-one name="weblogEntry" target-entity="org.apache.roller.pojos.WeblogEntryData">
+                <join-column name="entryid" insertable="true" updatable="true"/>
+            </many-to-one>
+            <transient name="displayUrl"/>
+            <transient name="url"/>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RoleData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RoleData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RoleData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RoleData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="RoleData" class="org.apache.roller.pojos.RoleData">
+        <table name="userrole"/>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="userName">
+                <column name="username" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="role">
+                <column name="rolename" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <many-to-one name="user" target-entity="org.apache.roller.pojos.UserData">
+                <join-column name="userid" insertable="true" updatable="true" nullable="false"/>
+            </many-to-one>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerConfigData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerConfigData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerConfigData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerConfigData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="RollerConfigData"
+            class="org.apache.roller.pojos.RollerConfigData">
+        <table name="rollerconfig"/>
+        <attributes>
+            <id name="id">
+                <column name="id"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="absoluteURL">
+                <column name="absoluteurl" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="rssUseCache">
+                <column name="rssusecache" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="rssCacheTime">
+                <column name="rsscachetime" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="newUserAllowed">
+                <column name="newuserallowed" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="userThemes">
+                <column name="userthemes" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="editorPages">
+                <column name="editorpages" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="enableAggregator">
+                <column name="enableaggregator" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadEnabled">
+                <column name="uploadenabled" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadMaxDirMB">
+                <column name="uploadmaxdirmb" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadMaxFileMB">
+                <column name="uploadmaxfilemb" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadAllow">
+                <column name="uploadallow" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadForbid">
+                <column name="uploadforbid" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadDir">
+                <column name="uploaddir" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="uploadPath">
+                <column name="uploadpath" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="memDebug">
+                <column name="memdebug" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="autoformatComments">
+                <column name="autoformatcomments" insertable="true" updatable="true"
+                        unique="false"/>
+            </basic>
+            <basic name="escapeCommentHtml">
+                <column name="escapecommenthtml" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="emailComments">
+                <column name="emailcomments" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="enableLinkback">
+                <column name="enablelinkback" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="siteDescription">
+                <column name="sitedescription" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="siteName">
+                <column name="sitename" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="emailAddress">
+                <column name="emailaddress" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="indexDir">
+                <column name="indexdir" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="encryptPasswords">
+                <column name="encryptpasswords" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="algorithm">
+                <column name="algorithm" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="databaseVersion">
+                <column name="dbversion" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="refererSpamWords">
+                <column name="refspamwords" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <transient name="adminUsers"/>
+        </attributes>
+    </entity>
+</entity-mappings>

Added: incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerPropertyData.orm.xml
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerPropertyData.orm.xml?view=auto&rev=505072
==============================================================================
--- incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerPropertyData.orm.xml (added)
+++ incubator/roller/branches/roller_4.0/src/org/apache/roller/pojos/RollerPropertyData.orm.xml Thu Feb  8 14:40:35 2007
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ orm_1_0.xsd">
+    <description>Persistence Metadata for Roller</description>
+    <persistence-unit-metadata>
+        <persistence-unit-defaults>
+            <access>PROPERTY</access>
+        </persistence-unit-defaults>
+    </persistence-unit-metadata>
+    <package>org.apache.roller.pojos</package>
+    <entity metadata-complete="true" name="RollerPropertyData"
+            class="org.apache.roller.pojos.RollerPropertyData">
+        <table name="roller_properties"/>
+        <named-query name="RollerPropertyData.getAll">
+            <query>SELECT r FROM RollerPropertyData r</query>
+        </named-query>
+        <attributes>
+            <id name="name">
+                <column name="name"/>
+                <generated-value strategy="TABLE" generator="ROLLER-TABLE-GENERATOR"/>
+            </id>
+            <basic name="value">
+                <column name="value" insertable="true" updatable="true" unique="false"/>
+            </basic>
+        </attributes>
+    </entity>
+</entity-mappings>



Mime
View raw message