Scott and George,
I have some changes to the PersistentBroker.java and ClassMap.java. Here
are the
diffs. I added an isAttribute method to class map. I did this to support
Scott's older revision of the RetrieveCriteria. I implemented the
retrieveClassMaps() method in PersistenceBroker. Please look over my changes 
hopefully commit them. Thanks all...


here are the diffs
----------------------------------------------------------------------------
----
? turbine/conf/opal.properties
Index: turbine/src/java/org/apache/turbine/opl/database/PersistenceBroker.java
===================================================================
RCS file:
/products/cvs/turbine/turbine/src/java/org/apache/turbine/opl/database/Persi
stenceBroker.java,v
retrieving revision 1.7
diff -r1.7 PersistenceBroker.java
260c260,277
<     public int retrieveClassMaps()
---
>     /**
>      * The purpose of this method is to retrieve the class maps from the
given
>      * configuration repository.
>      * @param configs The configuration information from which to extract
the
>      *        class map information.
>      * @return An integer that reveils whether or not the class maps were
>      *         successfully retrieved.
>      * @exception java.lang.Exception There are a number of things that
could
>      * go wrong. Here is a list of a few things<br>
>      * 1. An object class or object map class might not be found 
>      * (ClassNotFoundException) <br>
>      * 2. A constructor with an empty argument list might not be present in
>      * the object map class. (NoSuchMethodException) <br>
>      * 3. The constructor with an empty argument list might not be declared
>      * as public. (IllegalAccessException)
>      */
>     public int retrieveClassMaps(ConfigurationsRepository configs)
>            throws Exception 
261a279,297
>         classMaps = new Hashtable();
>         String nextKey = null;
>         for(Enumeration enum = configs.keys(); enum.hasMoreElements();)
>         {
>             nextKey = (String) enum.nextElement();
>             if(nextKey.length() >= OBJECT_MAP_PAIR_PREFIX.length())
>             {
>                 if(nextKey.substring(0,
OBJECT_MAP_PAIR_PREFIX.length()).equals(
>                        OBJECT_MAP_PAIR_PREFIX))
>                 {
>                     ClassMap nextMap = (ClassMap) (
>                            Class.forName((String) configs.get((Object)
nextKey))
>                            ).getDeclaredConstructor(null).newInstance(null);
>                     classMaps.put((Object) Class.forName(nextKey.substring(
>                            OBJECT_MAP_PAIR_PREFIX.length())), 
>                            (Object) nextMap); 
>                 }
>             }
>         }
Index: turbine/src/java/org/apache/turbine/opl/mapping/ClassMap.java
===================================================================
RCS file:
/products/cvs/turbine/turbine/src/java/org/apache/turbine/opl/mapping/ClassM
ap.java,v
retrieving revision 1.3
diff -r1.3 ClassMap.java
136a137
>         @return An array of column names.  
167a169,170
>        @param persistentObj The object to get the Insert SQL statement for.
>        @return The sql statement as a string.
185a189,191
>        @param persistentObj The persistent object to get the sql delete
>               statement.
>        @return The SQL delete statement as a string.
201a208,209
>        @param persistentObj The persistent object to get the select sql for.
>        @return The select statement for this object as a string.
217a226,228
>        @param persistentObj The persistent object for which we want to
get the
>               sql statement for.
>        @return The update sql statement for that persistent object
228a240,256
>     /**
>      * The purpose of this method is to test if an attribute with a given
name
>      * exists in the class map.
>      * @param attributeName The name of the attribute to search for.
>      * @return A boolean value indicating whether the attribute exists. True
>      *         if it exists, False otherwise
>      */
>     public boolean isAttribute(String attributeName) {
>         Enumeration enum = attributeMapList.elements();
>         boolean attributeFound = false;
>         for(;((enum.hasMoreElements()) && (!(attributeFound)));){
>             attributeFound = (attributeName.equals(((AttributeMap) 
>                    enum.nextElement()).getName()));
>         }
>         return attributeFound;
>     }
> 
276d303
< 
Jeff Prickett

Whoever loves money never has money enough;| Jeff Prickett
whoever loves wealth is never              | J2 Solutions
satsified with his income.                 | [EMAIL PROTECTED]
This too is meaningless.                   | PH:  302-945-5520
Ecclesiastes 5:10                          | Fax: 302-945-5216


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to