You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2006/12/26 19:18:24 UTC

svn commit: r490345 - in /portals/wsrp4j/trunk/persistence-db/src: java/org/apache/wsrp4j/persistence/db/driver/ resources/org/apache/wsrp4j/commons/consumer/ resources/org/apache/wsrp4j/commons/consumer/driver/ resources/org/apache/wsrp4j/commons/cons...

Author: dlouzan
Date: Tue Dec 26 10:18:23 2006
New Revision: 490345

URL: http://svn.apache.org/viewvc?view=rev&rev=490345
Log:
Added support for consumer persistence on persistence-db

Added:
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPersistentFactoryImpl.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPortletContextList.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PageList.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PortletList.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerList.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProxyPersistentFactoryImpl.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/UserList.java
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/page/
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/page/PageImpl.hbm.xml
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/ConsumerPortletContext.hbm.xml
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/WSRPPortletImpl.hbm.xml
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/producer/
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.hbm.xml
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/user/
    portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/user/UserImpl.hbm.xml
Modified:
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PersistentHandlerImpl.java
    portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerPersistentFactoryImpl.java

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPersistentFactoryImpl.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPersistentFactoryImpl.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPersistentFactoryImpl.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPersistentFactoryImpl.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,239 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.wsrp4j.commons.exception.ErrorCodes;
+import org.apache.wsrp4j.commons.exception.WSRPException;
+import org.apache.wsrp4j.commons.exception.WSRPXHelper;
+
+import org.apache.wsrp4j.commons.persistence.ConsumerPersistentFactory;
+import org.apache.wsrp4j.commons.persistence.PersistentDataObject;
+import org.apache.wsrp4j.commons.persistence.PersistentHandler;
+import org.apache.wsrp4j.commons.persistence.PersistentInformationProvider;
+
+import org.apache.wsrp4j.commons.util.Utility;
+
+
+/**
+ * Consumer factory implementation for persistence support.
+ * 
+ * @version $Id$
+ */
+public class ConsumerPersistentFactoryImpl implements ConsumerPersistentFactory {
+    
+    /* The log instance */
+    private static final Log log = 
+            LogFactory.getLog(ProducerPersistentFactoryImpl.class);
+    
+    /**
+     * Returns the PersistentHandler for this factory
+     *
+     * @return PersistentHandler The persistent handler for this consumer factory
+     */
+    public PersistentHandler getPersistentHandler() {
+        return PersistentHandlerImpl.getInstance();
+    }
+    
+    /**
+     * Returns the PersistentInformationProvider for this factory
+     *
+     * @return PersistentInformationProvider The provider for this consumer factory
+     */
+    public PersistentInformationProvider getPersistentInformationProvider() {
+        return PersistentInformationProviderImpl.getInstance();
+    }
+    
+    /**
+     * Returns a PersistentDataObject for a list of Portlet objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of portlet objects
+     * @throws WSRPException
+     */
+    public PersistentDataObject getPortletList() throws WSRPException {
+        
+        String MN = "getPortletList";
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strEnter(MN));
+        }
+        
+        PortletList pdo = null;
+        
+        try {
+            
+            pdo = new PortletList();
+            pdo.setPersistentInformation(new PersistentInformationImpl());
+            
+        } catch (Exception e) {
+            /* Error while accesing DB */
+            WSRPXHelper.throwX(log, ErrorCodes.DB_ERROR, e);
+        }
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strExit(MN));
+        }
+        
+        return pdo;
+        
+    }
+    
+    /**
+     * Returns a PersistentDataObject for a list of ConsumerPortletContext
+     * objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of consumer portlet context objects
+     * @throws WSRPException
+     */
+    public PersistentDataObject getConsumerPortletContextList() 
+    throws WSRPException {
+        
+        String MN = "getConsumerPortletContextList";
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strEnter(MN));
+        }
+        
+        ConsumerPortletContextList pdo = null;
+        
+        try {
+            
+            pdo = new ConsumerPortletContextList();
+            pdo.setPersistentInformation(new PersistentInformationImpl());
+            
+        } catch (Exception e) {
+            /* Error while accesing DB */
+            WSRPXHelper.throwX(log, ErrorCodes.DB_ERROR, e);
+        }
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strExit(MN));
+        }
+        
+        return pdo;
+        
+    }
+
+    /**
+     * Returns a PersistentDataObject for a list of Producer objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of producer objects
+     * @throws WSRPException
+     */
+    public PersistentDataObject getProducerList() throws WSRPException {
+        
+        String MN = "getProducerList";
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strEnter(MN));
+        }
+        
+        ProducerList pdo = null;
+        
+        try {
+            
+            pdo = new ProducerList();
+            pdo.setPersistentInformation(new PersistentInformationImpl());
+            
+        } catch (Exception e) {
+            /* Error while accesing DB */
+            WSRPXHelper.throwX(log, ErrorCodes.DB_ERROR, e);
+        }
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strExit(MN));
+        }
+        
+        return pdo;
+        
+    }
+
+    /**
+     * Returns a PersistentDataObject for a list of Page objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of page objects
+     * @throws WSRPException
+     */
+    public PersistentDataObject getPageList() throws WSRPException {
+        
+        String MN = "getPageList";
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strEnter(MN));
+        }
+        
+        PageList pdo = null;
+        
+        try {
+            
+            pdo = new PageList();
+            pdo.setPersistentInformation(new PersistentInformationImpl());
+            
+        } catch (Exception e) {
+            /* Error while accesing DB */
+            WSRPXHelper.throwX(log, ErrorCodes.DB_ERROR, e);
+        }
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strExit(MN));
+        }
+        
+        return pdo;
+        
+    }
+
+    /**
+     * Returns a PersistentDataObject for a list of User objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of user objects
+     * @throws WSRPException
+     */
+    public PersistentDataObject getUserList() throws WSRPException {
+        
+        String MN = "getUserList";
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strEnter(MN));
+        }
+        
+        UserList pdo = null;
+        
+        try {
+            
+            pdo = new UserList();
+            pdo.setPersistentInformation(new PersistentInformationImpl());
+            
+        } catch (Exception e) {
+            /* Error while accesing DB */
+            WSRPXHelper.throwX(log, ErrorCodes.DB_ERROR, e);
+        }
+        
+        if (log.isDebugEnabled()) {
+            log.debug(Utility.strExit(MN));
+        }
+        
+        return pdo;
+        
+    }
+    
+}

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPortletContextList.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPortletContextList.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPortletContextList.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ConsumerPortletContextList.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,132 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+
+import org.apache.wsrp4j.commons.exception.WSRPException;
+import org.apache.wsrp4j.commons.persistence.PersistentDataObject;
+
+import org.apache.wsrp4j.commons.consumer.driver.portlet.ConsumerPortletContext;
+import org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletKey;
+
+
+/**
+ * This class collects
+ * org.apache.wsrp4j.commons.consumer.driver.portlet.ConsumerPortletContext 
+ * objects and uses Hibernate for persistence support.
+ *
+ * @version $Id$
+ */
+public class ConsumerPortletContextList extends PersistentDataObjectImpl {
+    
+    /**
+     * Loads a concrete ConsumerPortletContext object from the db
+     *
+     * @param pdo PersistentDataObject containing the object referencing
+     *        the object to load
+     * @param session Hibernate Session
+     *
+     * @throws WSRPException
+     */
+    public void load(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo last element to the expected type  and get the key */
+        ConsumerPortletContext portletContext = 
+                (ConsumerPortletContext) pdo.getLastElement();
+        PortletKey key = portletContext.getPortletKey();
+        
+        /* Load the object */
+        ConsumerPortletContext loadedPortletContext =
+                (ConsumerPortletContext) session.load(ConsumerPortletContext.class, key);
+        
+        /* Store the object on the pdo */
+        pdo.clear();
+        pdo.addObject(loadedPortletContext);
+        
+    }
+    
+    /**
+     * Loads all ConsumerPortletContext objects from the db
+     *
+     * @param pdo PersistentDataObject used as a container for all the
+     *        objects to load
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void loadAll(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Load all objects from db */
+        List result = session.createQuery("from ConsumerPortletContext").list();
+        
+        /* Clear the pdo, iterate over results and add them to the pdo */
+        pdo.clear();
+        for (Iterator iter=result.iterator(); iter.hasNext(); ) {
+            ConsumerPortletContext portletContext = 
+                    (ConsumerPortletContext) iter.next();
+            pdo.addObject(portletContext);
+        }
+        
+    }
+    
+    /**
+     * Stores a concrete ConsumerPortletContext object to the db
+     *
+     * @param pdo PersistentDataObject containing the object to save
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void save(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        ConsumerPortletContext portletContext = 
+                (ConsumerPortletContext) pdo.getLastElement();
+        
+        /* Save the object to the db */
+        session.save(portletContext);
+        
+    }
+    
+    /**
+     * Deletes a concrete ConsumerPortletContext object from the db
+     *
+     * @param pdo PersistentDataObject containing an object referencing
+     *        to the object to delete
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void delete(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        ConsumerPortletContext portletContext = 
+                (ConsumerPortletContext) pdo.getLastElement();
+        
+        /* Delete the object from the db */
+        session.delete(portletContext);
+        
+    }
+    
+}

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PageList.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PageList.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PageList.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PageList.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,127 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+
+import org.apache.wsrp4j.commons.exception.WSRPException;
+import org.apache.wsrp4j.commons.persistence.PersistentDataObject;
+
+import org.apache.wsrp4j.commons.consumer.driver.page.PageImpl;
+
+
+/**
+ * This class collects
+ * org.apache.wsrp4j.commons.consumer.driver.page.PageImpl
+ * objects and uses Hibernate for persistence support.
+ *
+ * @version $Id$
+ */
+public class PageList extends PersistentDataObjectImpl {
+    
+    /**
+     * Loads a concrete PageImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing the object referencing
+     *        the object to load
+     * @param session Hibernate Session
+     *
+     * @throws WSRPException
+     */
+    public void load(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo last element to the expected type  and get the key */
+        PageImpl page = (PageImpl) pdo.getLastElement();
+        String key = page.getPageID();
+        
+        /* Load the object */
+        PageImpl loadedPage =
+                (PageImpl) session.load(PageImpl.class, key);
+        
+        /* Store the object on the pdo */
+        pdo.clear();
+        pdo.addObject(loadedPage);
+        
+    }
+    
+    /**
+     * Loads all PageImpl objects from the db
+     *
+     * @param pdo PersistentDataObject used as a container for all the
+     *        objects to load
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void loadAll(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Load all objects from db */
+        List result = session.createQuery("from PageImpl").list();
+        
+        /* Clear the pdo, iterate over results and add them to the pdo */
+        pdo.clear();
+        for (Iterator iter=result.iterator(); iter.hasNext(); ) {
+            PageImpl page = (PageImpl) iter.next();
+            pdo.addObject(page);
+        }
+        
+    }
+    
+    /**
+     * Stores a concrete PageImpl object to the db
+     *
+     * @param pdo PersistentDataObject containing the object to save
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void save(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        PageImpl page = (PageImpl) pdo.getLastElement();
+        
+        /* Save the object to the db */
+        session.save(page);
+        
+    }
+    
+    /**
+     * Deletes a concrete PageImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing an object referencing
+     *        to the object to delete
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void delete(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        PageImpl page = (PageImpl) pdo.getLastElement();
+        
+        /* Delete the object from the db */
+        session.delete(page);
+        
+    }
+    
+}

Modified: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PersistentHandlerImpl.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PersistentHandlerImpl.java?view=diff&rev=490345&r1=490344&r2=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PersistentHandlerImpl.java (original)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PersistentHandlerImpl.java Tue Dec 26 10:18:23 2006
@@ -175,7 +175,7 @@
             
         } catch (Exception e) {
             /* Throw the exception */
-            WSRPXHelper.throwX(log, ErrorCodes.RESTORE_OBJECT_ERROR, e);
+            WSRPXHelper.throwX(log, ErrorCodes.STORE_OBJECT_ERROR, e);
         }
         
         if (log.isDebugEnabled()) {
@@ -213,7 +213,7 @@
             
         } catch (Exception e) {
             /* Throw the exception */
-            WSRPXHelper.throwX(log, ErrorCodes.RESTORE_OBJECT_ERROR, e);
+            WSRPXHelper.throwX(log, ErrorCodes.DELETE_OBJECT_ERROR, e);
         }
         
         if (log.isDebugEnabled()) {

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PortletList.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PortletList.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PortletList.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/PortletList.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,128 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+
+import org.apache.wsrp4j.commons.exception.WSRPException;
+import org.apache.wsrp4j.commons.persistence.PersistentDataObject;
+
+import org.apache.wsrp4j.commons.consumer.driver.portlet.WSRPPortletImpl;
+import org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletKey;
+
+
+/**
+ * This class collects
+ * org.apache.wsrp4j.commons.consumer.driver.portlet.WSRPPortletImpl 
+ * objects and uses Hibernate for persistence support.
+ *
+ * @version $Id$
+ */
+public class PortletList extends PersistentDataObjectImpl {
+    
+    /**
+     * Loads a concrete WSRPPortletImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing the object referencing
+     *        the object to load
+     * @param session Hibernate Session
+     *
+     * @throws WSRPException
+     */
+    public void load(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo last element to the expected type  and get the key */
+        WSRPPortletImpl portlet = (WSRPPortletImpl) pdo.getLastElement();
+        PortletKey key = portlet.getPortletKey();
+        
+        /* Load the object */
+        WSRPPortletImpl loadedPortlet =
+                (WSRPPortletImpl) session.load(WSRPPortletImpl.class, key);
+        
+        /* Store the object on the pdo */
+        pdo.clear();
+        pdo.addObject(loadedPortlet);
+        
+    }
+    
+    /**
+     * Loads all WSRPPortletImpl objects from the db
+     *
+     * @param pdo PersistentDataObject used as a container for all the
+     *        objects to load
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void loadAll(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Load all objects from db */
+        List result = session.createQuery("from WSRPPortletImpl").list();
+        
+        /* Clear the pdo, iterate over results and add them to the pdo */
+        pdo.clear();
+        for (Iterator iter=result.iterator(); iter.hasNext(); ) {
+            WSRPPortletImpl portlet = (WSRPPortletImpl) iter.next();
+            pdo.addObject(portlet);
+        }
+        
+    }
+    
+    /**
+     * Stores a concrete WSRPPortletImpl object to the db
+     *
+     * @param pdo PersistentDataObject containing the object to save
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void save(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        WSRPPortletImpl portlet = (WSRPPortletImpl) pdo.getLastElement();
+        
+        /* Save the object to the db */
+        session.save(portlet);
+        
+    }
+    
+    /**
+     * Deletes a concrete WSRPPortletImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing an object referencing
+     *        to the object to delete
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void delete(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        WSRPPortletImpl portlet = (WSRPPortletImpl) pdo.getLastElement();
+        
+        /* Delete the object from the db */
+        session.delete(portlet);
+        
+    }
+    
+}

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerList.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerList.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerList.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerList.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,127 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+
+import org.apache.wsrp4j.commons.exception.WSRPException;
+import org.apache.wsrp4j.commons.persistence.PersistentDataObject;
+
+import org.apache.wsrp4j.commons.consumer.driver.producer.ProducerImpl;
+
+
+/**
+ * This class collects
+ * org.apache.wsrp4j.commons.consumer.driver.producer.ProducerImpl 
+ * objects and uses Hibernate for persistence support.
+ *
+ * @version $Id$
+ */
+public class ProducerList extends PersistentDataObjectImpl {
+    
+    /**
+     * Loads a concrete ProducerImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing the object referencing
+     *        the object to load
+     * @param session Hibernate Session
+     *
+     * @throws WSRPException
+     */
+    public void load(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo last element to the expected type  and get the key */
+        ProducerImpl producer = (ProducerImpl) pdo.getLastElement();
+        String key = producer.getID();
+        
+        /* Load the object */
+        ProducerImpl loadedProducer =
+                (ProducerImpl) session.load(ProducerImpl.class, key);
+        
+        /* Store the object on the pdo */
+        pdo.clear();
+        pdo.addObject(loadedProducer);
+        
+    }
+    
+    /**
+     * Loads all ProducerImpl objects from the db
+     *
+     * @param pdo PersistentDataObject used as a container for all the
+     *        objects to load
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void loadAll(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Load all objects from db */
+        List result = session.createQuery("from ProducerImpl").list();
+        
+        /* Clear the pdo, iterate over results and add them to the pdo */
+        pdo.clear();
+        for (Iterator iter=result.iterator(); iter.hasNext(); ) {
+            ProducerImpl producer = (ProducerImpl) iter.next();
+            pdo.addObject(producer);
+        }
+        
+    }
+    
+    /**
+     * Stores a concrete ProducerImpl object to the db
+     *
+     * @param pdo PersistentDataObject containing the object to save
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void save(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        ProducerImpl producer = (ProducerImpl) pdo.getLastElement();
+        
+        /* Save the object to the db */
+        session.save(producer);
+        
+    }
+    
+    /**
+     * Deletes a concrete ProducerImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing an object referencing
+     *        to the object to delete
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void delete(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        ProducerImpl producer = (ProducerImpl) pdo.getLastElement();
+        
+        /* Delete the object from the db */
+        session.delete(producer);
+        
+    }
+    
+}

Modified: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerPersistentFactoryImpl.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerPersistentFactoryImpl.java?view=diff&rev=490345&r1=490344&r2=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerPersistentFactoryImpl.java (original)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProducerPersistentFactoryImpl.java Tue Dec 26 10:18:23 2006
@@ -61,6 +61,10 @@
     
     /**
      * Returns a PersistentDataObject for a list of Registration objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of registration objects
+     * @throws WSRPException
      */
     public PersistentDataObject getRegistrationList() throws WSRPException {
     
@@ -91,8 +95,13 @@
     
     /**
      * Returns a PersistentDataObject for a list of ConsumerConfiguredPortlet objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of consumer configured portlets
+     * @throws WSRPException
      */
-    public PersistentDataObject getConsumerConfiguredPortletList() throws WSRPException {
+    public PersistentDataObject getConsumerConfiguredPortletList() 
+    throws WSRPException {
     
         String MN = "getConsumerConfiguredPortletList";
         
@@ -121,8 +130,13 @@
     
     /**
      * Returns a PersistentDataObject for a list of ServiceDescription objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of service descriptions
+     * @throws WSRPException
      */
-    public PersistentDataObject getServiceDescriptionList() throws WSRPException {
+    public PersistentDataObject getServiceDescriptionList() 
+    throws WSRPException {
     
         String MN = "getServiceDescriptionList";
         
@@ -151,8 +165,13 @@
     
     /**
      * Returns a PersistentDataObject for a list of ConsumerPortletRegistration objects
+     *
+     * @return PersistentDataObject The persistent data object representing
+     *         a list of consumer portlet registrations
+     * @throws WSRPException
      */
-    public PersistentDataObject getConsumerPortletRegistrationList() throws WSRPException {
+    public PersistentDataObject getConsumerPortletRegistrationList() 
+    throws WSRPException {
     
         String MN = "getConsumerPortletRegistrationList";
         

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProxyPersistentFactoryImpl.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProxyPersistentFactoryImpl.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProxyPersistentFactoryImpl.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/ProxyPersistentFactoryImpl.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import org.apache.wsrp4j.commons.persistence.ProxyPersistentFactory;
+
+
+/**
+ * Proxy Consumer factory implementation for persistence support.
+ * 
+ * @version $Id$
+ */
+public class ProxyPersistentFactoryImpl 
+        extends ConsumerPersistentFactoryImpl 
+        implements ProxyPersistentFactory {
+    
+    /* The path for persistence store. Not used in persistence-db module */
+    private String path;
+    
+    /**
+     * Sets the path for searching for persistent store. Not used in
+     * persistence-db module.
+     */
+    public void setPath(String path) {
+        this.path = path;
+    }
+    
+}

Added: portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/UserList.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/UserList.java?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/UserList.java (added)
+++ portals/wsrp4j/trunk/persistence-db/src/java/org/apache/wsrp4j/persistence/db/driver/UserList.java Tue Dec 26 10:18:23 2006
@@ -0,0 +1,127 @@
+/**
+ * Copyright 2003-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsrp4j.persistence.db.driver;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+
+import org.apache.wsrp4j.commons.exception.WSRPException;
+import org.apache.wsrp4j.commons.persistence.PersistentDataObject;
+
+import org.apache.wsrp4j.commons.consumer.driver.user.UserImpl;
+
+
+/**
+ * This class collects
+ * org.apache.wsrp4j.commons.consumer.driver.user.UserImpl
+ * objects and uses Hibernate for persistence support.
+ *
+ * @version $Id$
+ */
+public class UserList extends PersistentDataObjectImpl {
+    
+    /**
+     * Loads a concrete UserImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing the object referencing
+     *        the object to load
+     * @param session Hibernate Session
+     *
+     * @throws WSRPException
+     */
+    public void load(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo last element to the expected type  and get the key */
+        UserImpl user = (UserImpl) pdo.getLastElement();
+        String key = user.getUserID();
+        
+        /* Load the object */
+        UserImpl loadedUser =
+                (UserImpl) session.load(UserImpl.class, key);
+        
+        /* Store the object on the pdo */
+        pdo.clear();
+        pdo.addObject(loadedUser);
+        
+    }
+    
+    /**
+     * Loads all UserImpl objects from the db
+     *
+     * @param pdo PersistentDataObject used as a container for all the
+     *        objects to load
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void loadAll(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Load all objects from db */
+        List result = session.createQuery("from UserImpl").list();
+        
+        /* Clear the pdo, iterate over results and add them to the pdo */
+        pdo.clear();
+        for (Iterator iter=result.iterator(); iter.hasNext(); ) {
+            UserImpl user = (UserImpl) iter.next();
+            pdo.addObject(user);
+        }
+        
+    }
+    
+    /**
+     * Stores a concrete UserImpl object to the db
+     *
+     * @param pdo PersistentDataObject containing the object to save
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void save(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        UserImpl user = (UserImpl) pdo.getLastElement();
+        
+        /* Save the object to the db */
+        session.save(user);
+        
+    }
+    
+    /**
+     * Deletes a concrete UserImpl object from the db
+     *
+     * @param pdo PersistentDataObject containing an object referencing
+     *        to the object to delete
+     * @param session Hibernate Session used for db access
+     *
+     * @throws WSRPException
+     */
+    public void delete(PersistentDataObject pdo, Session session)
+    throws WSRPException {
+        
+        /* Cast the pdo to the expected type */
+        UserImpl user = (UserImpl) pdo.getLastElement();
+        
+        /* Delete the object from the db */
+        session.delete(user);
+        
+    }
+    
+}

Added: portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/page/PageImpl.hbm.xml
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/page/PageImpl.hbm.xml?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/page/PageImpl.hbm.xml (added)
+++ portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/page/PageImpl.hbm.xml Tue Dec 26 10:18:23 2006
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2003-2006 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+    
+    <class name="org.apache.wsrp4j.commons.consumer.driver.page.PageImpl"
+           table="PAGE">
+        
+        <id name="pageID" type="string" column="ID"/>
+        <property name="title" type="string" column="TITLE"/>
+        <property name="maximizedPortletInstanceKey" type="string" 
+                  column="MAX_PORTLET_INST_KEY"/>
+        <map name="portlets" table="PAGE_PORTLETS">
+            <key column="ID"/>
+            <map-key column="IDX" type="string"/>
+            <composite-element class="org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletKey"/>
+        </map>
+        
+    </class>
+
+</hibernate-mapping>
\ No newline at end of file

Added: portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/ConsumerPortletContext.hbm.xml
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/ConsumerPortletContext.hbm.xml?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/ConsumerPortletContext.hbm.xml (added)
+++ portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/ConsumerPortletContext.hbm.xml Tue Dec 26 10:18:23 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2003-2006 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+    
+    <class name="org.apache.wsrp4j.commons.consumer.driver.portlet.ConsumerPortletContext"
+           table="CONSUMER_PORTLET_CTXT">
+        
+        <id name="portletKey"
+            type="org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletKey"
+            column="PORTLET_KEY"/>
+        <property name="portletContext"
+                  type="oasis.names.tc.wsrp.v1.types.PortletContext"
+                  column="PORTLET_CTXT"/>
+        
+    </class>
+
+</hibernate-mapping>

Added: portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/WSRPPortletImpl.hbm.xml
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/WSRPPortletImpl.hbm.xml?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/WSRPPortletImpl.hbm.xml (added)
+++ portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/portlet/WSRPPortletImpl.hbm.xml Tue Dec 26 10:18:23 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2003-2006 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+    
+    <class name="org.apache.wsrp4j.commons.consumer.driver.portlet.WSRPPortletImpl"
+           table="PORTLET">
+    
+        <id name="portletKey"
+            type="org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletKey"
+            column="PORTLET_KEY"/>
+        <property name="parent" type="string" column="PARENT_ID"/>
+    
+    </class>
+
+</hibernate-mapping>

Added: portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.hbm.xml
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.hbm.xml?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.hbm.xml (added)
+++ portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.hbm.xml Tue Dec 26 10:18:23 2006
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2003-2006 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+    
+    <class name="org.apache.wsrp4j.commons.consumer.driver.producer.ProducerImpl"
+           table="PRODUCER">
+    
+        <id name="ID" type="string" column="ID"/>
+        <property name="registrationRequired" type="boolean" column="REG_RQR"/>
+        <property name="registrationData"
+                  type="oasis.names.tc.wsrp.v1.types.RegistrationData"
+                  column="REG_DATA"/>
+        <property name="markupInterfaceEndpoint" type="string"
+                  column="MARKUP_INTERFACE"/>
+        <property name="serviceDescriptionInterfaceEndpoint" type="string"
+                  column="SERVICE_DESC_INTERFACE"/>
+        <property name="registrationInterfaceEndpoint" type="string"
+                  column="REGISTRATION_INTERFACE"/>
+        <property name="portletManagementInterfaceEndpoint" type="string"
+                  column="PORTLET_MGM_INTERFACE"/>
+        <property name="name" type="string" column="NAME"/>
+        <property name="description" type="string" column="DESC"/>
+        <property name="registrationContext"
+                  type="oasis.names.tc.wsrp.v1.types.RegistrationContext"
+                  column="REG_CTXT"/>
+    
+    </class>
+
+</hibernate-mapping>
\ No newline at end of file

Added: portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/user/UserImpl.hbm.xml
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/user/UserImpl.hbm.xml?view=auto&rev=490345
==============================================================================
--- portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/user/UserImpl.hbm.xml (added)
+++ portals/wsrp4j/trunk/persistence-db/src/resources/org/apache/wsrp4j/commons/consumer/driver/user/UserImpl.hbm.xml Tue Dec 26 10:18:23 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2003-2006 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+    
+    <class name="org.apache.wsrp4j.commons.consumer.driver.user.UserImpl"
+           table="USER">
+    
+        <id name="userID" type="string" column="ID"/>
+        <property name="userContext"
+                  type="oasis.names.tc.wsrp.v1.types.UserContext"
+                  column="USER_CTXT"/>
+    
+    </class>
+
+</hibernate-mapping>
\ No newline at end of file