db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker PBKey.java
Date Mon, 09 Aug 2004 07:51:27 GMT
arminw      2004/08/09 00:51:27

  Modified:    src/java/org/apache/ojb/broker/accesslayer Tag:
                        OJB_1_0_RELEASE RowReaderDefaultImpl.java
                        RsIterator.java
               src/java/org/apache/ojb/broker/cache Tag: OJB_1_0_RELEASE
                        CacheFilterClassImpl.java
                        CacheFilterPackageImpl.java
                        CacheFilterRegistry.java
               src/java/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        PBKey.java
  Log:
  merge with head
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.30.2.1  +6 -3      db-ojb/src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java
  
  Index: RowReaderDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java,v
  retrieving revision 1.30
  retrieving revision 1.30.2.1
  diff -u -r1.30 -r1.30.2.1
  --- RowReaderDefaultImpl.java	6 May 2004 18:54:44 -0000	1.30
  +++ RowReaderDefaultImpl.java	9 Aug 2004 07:51:26 -0000	1.30.2.1
  @@ -196,8 +196,11 @@
               for (int j = 0; j < size; j++)
               {
                   fld = fields[j];
  -                val = fld.getJdbcType().getObjectFromColumn(rs, fld.getColumnName());
  -                row.put(fld.getColumnName(), fld.getFieldConversion().sqlToJava(val));
  +                if(!row.containsKey(fld.getColumnName()))
  +                {
  +                    val = fld.getJdbcType().getObjectFromColumn(rs, fld.getColumnName());
  +                    row.put(fld.getColumnName(), fld.getFieldConversion().sqlToJava(val));
  +                }
               }
           }
           catch (SQLException t)
  
  
  
  1.63.2.2  +2 -1      db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java
  
  Index: RsIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java,v
  retrieving revision 1.63.2.1
  retrieving revision 1.63.2.2
  diff -u -r1.63.2.1 -r1.63.2.2
  --- RsIterator.java	27 Jul 2004 00:33:10 -0000	1.63.2.1
  +++ RsIterator.java	9 Aug 2004 07:51:26 -0000	1.63.2.2
  @@ -405,6 +405,7 @@
        */
       protected Object getObjectFromResultSet() throws PersistenceBrokerException
       {
  +        getRow().clear();
           /**
            * MBAIRD if a proxy is to be used, return a proxy instance and dont
            * perfom a full materialization. NOTE: Potential problem here with
  
  
  
  No                   revision
  No                   revision
  1.6.2.1   +20 -0     db-ojb/src/java/org/apache/ojb/broker/cache/CacheFilterClassImpl.java
  
  Index: CacheFilterClassImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/CacheFilterClassImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- CacheFilterClassImpl.java	4 Apr 2004 23:53:33 -0000	1.6
  +++ CacheFilterClassImpl.java	9 Aug 2004 07:51:26 -0000	1.6.2.1
  @@ -17,6 +17,26 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  +
  +/**
  + * A {@link CacheFilter} implementation for filtering objects
  + * before cached, using custom attribute <code>cacheable</code>
  + * in <code>class-descriptor</code> in repository file.
  + *
  + * <br/>
  + * <b>Example:</b>
  + * <br/>
  + * Add this custom attribute to your <code>class-descriptor</code> to avoid
  + * caching of the class.
  + * <pre>
  + * &lt;attribute
  + *    attribute-name="cacheable"
  + *    attribute-value="false"/&gt;
  + * </pre>
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
  + */
   public class CacheFilterClassImpl implements CacheFilter
   {
       public static final String CACHEABLE = "cacheable";
  
  
  
  1.8.2.1   +26 -0     db-ojb/src/java/org/apache/ojb/broker/cache/CacheFilterPackageImpl.java
  
  Index: CacheFilterPackageImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/CacheFilterPackageImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- CacheFilterPackageImpl.java	4 Apr 2004 23:53:33 -0000	1.8
  +++ CacheFilterPackageImpl.java	9 Aug 2004 07:51:26 -0000	1.8.2.1
  @@ -19,6 +19,32 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  +
  +
  +/**
  + * A {@link CacheFilter} implementation for filtering objects
  + * before cached when the given objects package name match a
  + * given package, defined as custom attribute within the
  + * <code>descriptor-repository</code> element or
  + * <code>jdbc-connection-descriptor</code> in the repository file.
  + * <br/>
  + * <b>Example:</b>
  + * <br/>
  + * Add this custom attribute to a <code>jdbc-connection-descriptor</code>
  + * to avoid caching of package trees for the described connection.
  + *
  + * <pre>
  + * &lt;attribute
  + *    attribute-name="exclude-packages"
  + *    attribute-value="org.my.test,org.my.admin"/&gt;
  + * </pre>
  + *
  + * To enable a global exclude of caching, add the custom attribute
  + * entry under the <code>descriptor-repository</code> element.
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
  + */
   public class CacheFilterPackageImpl implements CacheFilter
   {
       public static final String EXCLUDE_PACKAGES = "exclude-packages";
  
  
  
  1.3.2.1   +15 -0     db-ojb/src/java/org/apache/ojb/broker/cache/CacheFilterRegistry.java
  
  Index: CacheFilterRegistry.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/CacheFilterRegistry.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- CacheFilterRegistry.java	4 Apr 2004 23:53:33 -0000	1.3
  +++ CacheFilterRegistry.java	9 Aug 2004 07:51:26 -0000	1.3.2.1
  @@ -20,6 +20,21 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  +
  +
  +/**
  + * This {@link ObjectCache Meta-ObjectCache} implementation enabled
  + * the {@link CacheFilter} feature support.
  + * <br/>
  + * With the {@link #addCacheFilter} method {@link CacheFilter}
  + * could be add.
  + * <br/><br/>
  + * <b>Note:</b> Using this meta cache will affect the
  + * cache performance, thus do not add too many {@link CacheFilter}.
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
  + */
   public class CacheFilterRegistry extends AbstractMetaCache
   {
       private ArrayList filterList = new ArrayList();
  
  
  
  No                   revision
  No                   revision
  1.11.2.1  +12 -1     db-ojb/src/java/org/apache/ojb/broker/PBKey.java
  
  Index: PBKey.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/PBKey.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- PBKey.java	11 Jun 2004 19:01:47 -0000	1.11
  +++ PBKey.java	9 Aug 2004 07:51:26 -0000	1.11.2.1
  @@ -16,9 +16,20 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  +
  +/**
  + * A immutable key to identify PB instances in pools, ...
  + * <br>
  + * The used <i>jcdAlias</i> name represents an alias for a connection
  + * defined in the repository file.
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
  + */
   public class PBKey implements Cloneable, Serializable
   {
  -	static final long serialVersionUID = -8858811398162391578L;    private final String jcdAlias;
  +	static final long serialVersionUID = -8858811398162391578L;
  +    private final String jcdAlias;
       private final String user;
       private final String password;
       private int hashCode;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message