incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r325963 [3/3] - in /incubator/graffito/trunk/jcr-mapping/src: java/org/apache/portals/graffito/jcr/exception/ java/org/apache/portals/graffito/jcr/mapper/ java/org/apache/portals/graffito/jcr/mapper/impl/ java/org/apache/portals/graffito/jc...
Date Mon, 17 Oct 2005 19:08:06 GMT
Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/FilterImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/FilterImpl.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/FilterImpl.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/FilterImpl.java
Mon Oct 17 12:07:21 2005
@@ -23,8 +23,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.portals.graffito.jcr.exception.IncorrectAtomicTypeException;
-import org.apache.portals.graffito.jcr.exception.JcrMappingException;
 import org.apache.portals.graffito.jcr.mapper.model.ClassDescriptor;
 import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter;
 import org.apache.portals.graffito.jcr.query.Filter;
@@ -50,7 +48,14 @@
 		
 	private final static Log log = LogFactory.getLog(FilterImpl.class);
 	
-	public FilterImpl(ClassDescriptor classDescriptor, Map atomicTypeConverters, Class clazz)
throws JcrMappingException
+	/**
+	 * Construtor
+	 * 
+	 * @param classDescriptor
+	 * @param atomicTypeConverters
+	 * @param clazz
+	 */
+	public FilterImpl(ClassDescriptor classDescriptor, Map atomicTypeConverters, Class clazz)

 	{		
 		this.claszz = clazz;
 		this.atomicTypeConverters = atomicTypeConverters;
@@ -58,7 +63,10 @@
 	}
 	
 	
-	
+	/**
+	 * 
+	 * @see org.apache.portals.graffito.jcr.query.Filter#getFilterClass()
+	 */
 	public Class getFilterClass()
 	{		
 		return claszz;
@@ -86,7 +94,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addContains(java.lang.String)
 	 */
-	public void addContains(String scope, String fullTextSearch)  throws IncorrectAtomicTypeException
+	public void addContains(String scope, String fullTextSearch) 
 	{
 		String jcrExpression = null;
 		if (scope.equals("."))
@@ -104,7 +112,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addBetween(java.lang.String, java.lang.Object,
java.lang.Object)
 	 */
-	public void addBetween(String fieldAttributeName, Object value1, Object value2)  throws
IncorrectAtomicTypeException
+	public void addBetween(String fieldAttributeName, Object value1, Object value2) 
 	{
 		String jcrExpression =  "( @" + this.getJcrFieldName(fieldAttributeName) + " >= " +
this.getStringValue(value1) + 
 		                        " and @" + this.getJcrFieldName(fieldAttributeName) + " <= "
+ this.getStringValue(value2) +  ")";
@@ -115,7 +123,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addEqualTo(java.lang.String, java.lang.Object)
 	 */
-	public void addEqualTo(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addEqualTo(String fieldAttributeName, Object value)
 	{
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName) + " = " + this.getStringValue(value);
 		jcrExpressions.add(jcrExpression);		
@@ -124,7 +132,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addGreaterOrEqualThan(java.lang.String,
java.lang.Object)
 	 */
-	public void addGreaterOrEqualThan(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addGreaterOrEqualThan(String fieldAttributeName, Object value) 
 	{
 	
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName) + " >= " + this.getStringValue(value);
@@ -135,7 +143,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addGreaterThan(java.lang.String, java.lang.Object)
 	 */
-	public void addGreaterThan(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addGreaterThan(String fieldAttributeName, Object value)
 	{
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName) + " > " + this.getStringValue(value);
 		jcrExpressions.add(jcrExpression);	
@@ -146,7 +154,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addLessOrEqualThan(java.lang.String,
java.lang.Object)
 	 */
-	public void addLessOrEqualThan(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addLessOrEqualThan(String fieldAttributeName, Object value)
 	{
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName) + " <= " + this.getStringValue(value);
 		jcrExpressions.add(jcrExpression);	
@@ -156,7 +164,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addLessOrEqualThan(java.lang.String,
java.lang.Object)
 	 */
-	public void addLessThan(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addLessThan(String fieldAttributeName, Object value)
 	{
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName) + " < " + this.getStringValue(value);
 		jcrExpressions.add(jcrExpression);	
@@ -166,7 +174,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addLike(java.lang.Object, java.lang.Object)
 	 */
-	public void addLike(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addLike(String fieldAttributeName, Object value)
 	{
 		String jcrExpression = "jcr:like(" + "@" + this.getJcrFieldName(fieldAttributeName) + ",
'" + value + "')";
 		jcrExpressions.add(jcrExpression);
@@ -176,7 +184,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addNotEqualTo(java.lang.String, java.lang.Object)
 	 */
-	public void addNotEqualTo(String fieldAttributeName, Object value)  throws IncorrectAtomicTypeException
+	public void addNotEqualTo(String fieldAttributeName, Object value) 
 	{
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName) + " != " + this.getStringValue(value);
 		jcrExpressions.add(jcrExpression);			
@@ -186,7 +194,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addNotNull(java.lang.String)
 	 */
-	public void addNotNull(String fieldAttributeName)  throws IncorrectAtomicTypeException
+	public void addNotNull(String fieldAttributeName) 
 	{
 		String jcrExpression =  "@" + this.getJcrFieldName(fieldAttributeName);
 		jcrExpressions.add(jcrExpression);			
@@ -196,7 +204,7 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addIsNull(java.lang.String)
 	 */
-	public void addIsNull(String fieldAttributeName)  throws IncorrectAtomicTypeException
+	public void addIsNull(String fieldAttributeName)
 	{
 		String jcrExpression =  "not(@" + this.getJcrFieldName(fieldAttributeName)+")";
 		jcrExpressions.add(jcrExpression);			
@@ -206,20 +214,20 @@
 	/**
 	 * @see org.apache.portals.graffito.jcr.query.Filter#addOrFilter(org.apache.portals.graffito.jcr.query.Filter)
 	 */
-	public void addOrFilter(Filter filter)  throws IncorrectAtomicTypeException
+	public void addOrFilter(Filter filter)
 	{
 		
 		orJcrExpression  = ((FilterImpl)filter).getJcrExpression();
 	
 	}
 
-	public void addJCRExpression(String jcrExpression)  throws IncorrectAtomicTypeException
+	public void addJCRExpression(String jcrExpression)
 	{
 		jcrExpressions.add(jcrExpression);
 	}
 	
 	
-	private String getJcrFieldName(String fieldAttribute)  throws IncorrectAtomicTypeException
+	private String getJcrFieldName(String fieldAttribute) 
 	{
 		String jcrFieldName =  classDescriptor.getJcrName(fieldAttribute);
 		if (jcrFieldName == null)
@@ -230,13 +238,13 @@
 	    	
 	}
 	
-	private String getStringValue (Object value) throws IncorrectAtomicTypeException
+	private String getStringValue (Object value) 
 	{
 		AtomicTypeConverter atomicTypeConverter = (AtomicTypeConverter) atomicTypeConverters.get(value.getClass());
 		return atomicTypeConverter.getStringValue(value);
 	}
 	
-	public String  getJcrExpression()  throws IncorrectAtomicTypeException
+	public String  getJcrExpression() 
 	{
 		if (orJcrExpression == null || orJcrExpression.equals(""))
 		{
@@ -249,7 +257,7 @@
 		
 	}
 	
-	private String buildJcrExpression()  throws IncorrectAtomicTypeException
+	private String buildJcrExpression() 
 	{
 		   int count = 1;
 		   String jcrExp = "";

Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryImpl.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryImpl.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryImpl.java
Mon Oct 17 12:07:21 2005
@@ -18,10 +18,8 @@
 package org.apache.portals.graffito.jcr.query.impl;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Iterator;
 
-import org.apache.portals.graffito.jcr.exception.JcrMappingException;
 import org.apache.portals.graffito.jcr.mapper.Mapper;
 import org.apache.portals.graffito.jcr.mapper.model.ClassDescriptor;
 import org.apache.portals.graffito.jcr.query.Filter;
@@ -38,17 +36,19 @@
 		
 	private Filter filter;
 	
-    private Mapper mapper;	
-    
     ClassDescriptor classDescriptor;
     
     private ArrayList orderByExpressions = new ArrayList();
 
-	
-	public QueryImpl(Filter filter, Mapper mapper) throws JcrMappingException
+	/**
+	 * Constructor 
+	 * 
+	 * @param filter
+	 * @param mapper
+	 */
+	public QueryImpl(Filter filter, Mapper mapper) 
 	{				
 		this.filter = filter;
-		this.mapper = mapper;
 		classDescriptor = mapper.getClassDescriptor(filter.getFilterClass());
 	}
 
@@ -73,6 +73,10 @@
 		orderByExpressions.add("@" + this.getJcrFieldName(fieldNameAttribute) + " descending");
 	}
 
+	/**
+	 * 
+	 * @see org.apache.portals.graffito.jcr.query.Query#addOrderByAscending(java.lang.String)
+	 */
 	public void addOrderByAscending(String fieldNameAttribute)
 	{
 		orderByExpressions.add("@" + this.getJcrFieldName(fieldNameAttribute) + " ascending");

Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryManagerImpl.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryManagerImpl.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/query/impl/QueryManagerImpl.java
Mon Oct 17 12:07:21 2005
@@ -1,8 +1,23 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.portals.graffito.jcr.query.impl;
 
 import java.util.Map;
 
-import org.apache.portals.graffito.jcr.exception.JcrMappingException;
 import org.apache.portals.graffito.jcr.mapper.Mapper;
 import org.apache.portals.graffito.jcr.mapper.model.ClassDescriptor;
 import org.apache.portals.graffito.jcr.query.Filter;
@@ -20,19 +35,19 @@
 		this.atomicTypeConverters = atomicTypeConverters;
 	}
 	
-	public Filter createFilter(Class classQuery) throws JcrMappingException
+	public Filter createFilter(Class classQuery) 
 	{
 
 		return new FilterImpl(mapper.getClassDescriptor(classQuery), atomicTypeConverters, classQuery);
 	}
 
-	public Query createQuery(Filter filter)  throws JcrMappingException
+	public Query createQuery(Filter filter)
 	{
 
 		return new QueryImpl(filter, mapper);
 	}
 
-	public String buildJCRExpression(Query query)  throws JcrMappingException 
+	public String buildJCRExpression(Query query)
 	{
 
 		Filter filter = query.getFilter();
@@ -66,7 +81,7 @@
 		 
 	}
 	
-	private String getNodeType(Filter filter) throws JcrMappingException 
+	private String getNodeType(Filter filter)
 	{
 		ClassDescriptor classDescriptor = mapper.getClassDescriptor(filter.getFilterClass());
 		return classDescriptor.getJcrNodeType();

Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java
Mon Oct 17 12:07:21 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2004 The Apache Software Foundation.
+ * Copyright 2000-2005 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.
@@ -15,26 +15,19 @@
  */
 package org.apache.portals.graffito.jcr.repository;
 
-import java.sql.Timestamp;
-import java.util.Calendar;
-import java.util.Date;
 import java.util.Hashtable;
 
-import javax.jcr.PropertyType;
 import javax.jcr.Repository;
 import javax.jcr.Session;
 import javax.jcr.SimpleCredentials;
-import javax.jcr.Value;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.core.jndi.RegistryHelper;
-import org.apache.jackrabbit.value.DateValue;
-import org.apache.jackrabbit.value.StringValue;
-import org.apache.portals.graffito.jcr.exception.JcrMappingException;
-import org.apache.portals.graffito.jcr.persistence.impl.PersistenceManagerImpl;
+import org.apache.portals.graffito.jcr.exception.PersistenceException;
+import org.apache.portals.graffito.jcr.exception.RepositoryException;
 
 /**
 * Utility class for managing JCR repositories.
@@ -63,9 +56,9 @@
      * @param configFile The JCR config file
      * @param homeDir The directory containing the complete repository settings (workspace,
node types, ...)
      * 
-     * @throws JcrMappingException when it is not possible to register the repository
+     * @throws RepositoryException when it is not possible to register the repository
      */
-    public static void registerRepository(String repositoryName, String configFile, String
homeDir) throws JcrMappingException
+    public static void registerRepository(String repositoryName, String configFile, String
homeDir) throws RepositoryException
     {
         try
         {
@@ -78,9 +71,8 @@
 
         }
         catch (Exception e)
-        {
-        	e.printStackTrace();
-            throw new JcrMappingException("Impossible to register the respository : " + 
+        {        
+            throw new RepositoryException("Impossible to register the respository : " + 
                                            repositoryName + " - config file : " + configFile,
e);
         }        
         
@@ -92,9 +84,9 @@
      * 
      * @param repositoryName The repository unique name
      * 
-     * @throws JcrMappingException when it is not possible to unregister the repository
+     * @throws RepositoryException when it is not possible to unregister the repository
      */
-    public static void unRegisterRepository(String repositoryName) throws JcrMappingException
+    public static void unRegisterRepository(String repositoryName) throws RepositoryException
     {
         try
         {
@@ -110,7 +102,7 @@
         }
         catch (Exception e)
         {
-            throw new JcrMappingException("Impossible to unregister the respository : " +

+            throw new RepositoryException("Impossible to unregister the respository : " +

                                            repositoryName , e);
         }        
         
@@ -122,10 +114,10 @@
      * @param repositoryName The repository name
      * @return a JCR repository reference
      * 
-     * @throws JcrMappingException when it is not possible to get the repository. 
+     * @throws RepositoryException when it is not possible to get the repository. 
      *         Before calling this method, the repository has to be registered (@see RepositoryUtil#registerRepository(String,
String, String)
      */
-    public static Repository getRepository(String repositoryName) throws JcrMappingException
+    public static Repository getRepository(String repositoryName) throws RepositoryException
     {
         try
         {
@@ -139,7 +131,7 @@
         }
         catch (Exception e)
         {
-            throw new JcrMappingException("Impossible to get the repository : " + repositoryName,
e);
+            throw new RepositoryException("Impossible to get the repository : " + repositoryName,
e);
         }        
     }
     
@@ -151,9 +143,9 @@
      * @param password The password
      * @return a valid JCR session 
      * 
-     * @throws JcrMappingException when it is not possible to connect to the JCR repository

+     * @throws RepositoryException when it is not possible to connect to the JCR repository

      */
-    public static Session login(Repository repository, String user, String password) throws
JcrMappingException
+    public static Session login(Repository repository, String user, String password) throws
RepositoryException
     {
         try
         {
@@ -165,7 +157,7 @@
         }
         catch (Exception e)
         {
-            throw new JcrMappingException("Impossible to login ", e);
+            throw new RepositoryException("Impossible to login ", e);
         }
     }
     
@@ -193,15 +185,15 @@
      * @param path The path from wich the parent path has to be returned
      * @return The parent path
      * 
-     * @throws JcrMappingException when the path is invalid
+     * @throws PersistenceException when the path is invalid
      */
-    public static String getParentPath(String path) throws JcrMappingException
+    public static String getParentPath(String path) throws PersistenceException
     {
         String parentPath = "";
         
         if (!isValidPath(path))
         {
-            throw new JcrMappingException("Invalid path : " + path);
+            throw new PersistenceException("Invalid path : " + path);
         }
         
         String[] pathElements = path.split(PATH_SEPARATOR);         
@@ -229,16 +221,16 @@
      * @param path  The path from which the node name has to be retrieved
      * @return The node name
      * 
-     * @throws JcrMappingException when the path is invalid
+     * @throws PersistenceException when the path is invalid
      */
-    public static String getNodeName(String path)  throws JcrMappingException
+    public static String getNodeName(String path)  throws PersistenceException
     {
         
         String[] pathElements = path.split(PATH_SEPARATOR);
         
         if (! isValidPath(path))
         {
-            throw new JcrMappingException("Invalid path : " + path);
+            throw new PersistenceException("Invalid path : " + path);
         }        
         return pathElements[pathElements.length-1];
     }
@@ -248,7 +240,7 @@
      * Until now, we check only if the Graffito namespace prefix exist in the repository
      * 
      */
-    private static void setupSession(Session session) throws JcrMappingException
+    private static void setupSession(Session session) throws RepositoryException
     {
          try
          {
@@ -279,7 +271,7 @@
         catch (Exception e)
         {
             log.error("Error while setting up the jcr repository.", e);
-            throw new JcrMappingException(e.getMessage());
+            throw new RepositoryException(e.getMessage());
         }
     }
     

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/AtomicTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/AtomicTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/AtomicTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/AtomicTest.java
Mon Oct 17 12:07:21 2005
@@ -67,7 +67,7 @@
      */
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/NullAtomicTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/NullAtomicTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/NullAtomicTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomicconverter/NullAtomicTest.java
Mon Oct 17 12:07:21 2005
@@ -76,7 +76,7 @@
      */
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/DefaultCollectionConverterImplTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/DefaultCollectionConverterImplTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/DefaultCollectionConverterImplTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/DefaultCollectionConverterImplTest.java
Mon Oct 17 12:07:21 2005
@@ -67,7 +67,7 @@
      */
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/HashMapTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/HashMapTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/HashMapTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/HashMapTest.java
Mon Oct 17 12:07:21 2005
@@ -69,7 +69,7 @@
      */
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/MultiValueCollectionConverterImplTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/MultiValueCollectionConverterImplTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/MultiValueCollectionConverterImplTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/MultiValueCollectionConverterImplTest.java
Mon Oct 17 12:07:21 2005
@@ -70,7 +70,7 @@
      */
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/NTCollectionConverterImplTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/NTCollectionConverterImplTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/NTCollectionConverterImplTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/collectionconverter/impl/NTCollectionConverterImplTest.java
Mon Oct 17 12:07:21 2005
@@ -69,7 +69,7 @@
      */
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerAtomicQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerAtomicQueryTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerAtomicQueryTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerAtomicQueryTest.java
Mon Oct 17 12:07:21 2005
@@ -75,7 +75,7 @@
 
 		for (int i = 1; i <= 100; i++)
 		{
-			if (getPersistenceManager().itemExists("/test" + i))
+			if (getPersistenceManager().objectExists("/test" + i))
 			{
 				getPersistenceManager().remove("/test" + i);
 			}
@@ -205,7 +205,7 @@
 
 			PersistenceManager persistenceManager = getPersistenceManager();
 			
-			if (persistenceManager.itemExists("/test"))
+			if (persistenceManager.objectExists("/test"))
 			{
 				persistenceManager.remove("/test");
 			}

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerIteratorQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerIteratorQueryTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerIteratorQueryTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerIteratorQueryTest.java
Mon Oct 17 12:07:21 2005
@@ -75,7 +75,7 @@
     
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();
@@ -130,7 +130,7 @@
 		{
     		PersistenceManager persistenceManager = getPersistenceManager();
     		
-        	if (persistenceManager.itemExists("/test"))
+        	if (persistenceManager.objectExists("/test"))
             {
                 persistenceManager.remove("/test");
             }

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerMultiValueQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerMultiValueQueryTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerMultiValueQueryTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerMultiValueQueryTest.java
Mon Oct 17 12:07:21 2005
@@ -70,7 +70,7 @@
     
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
Mon Oct 17 12:07:21 2005
@@ -75,7 +75,7 @@
 
 		for (int i = 1; i <= 10; i++)
 		{
-			if (getPersistenceManager().itemExists("/test" + i))
+			if (getPersistenceManager().objectExists("/test" + i))
 			{
 				getPersistenceManager().remove("/test" + i);
 			}
@@ -95,7 +95,7 @@
 			persistenceManager.remove("/test5");
 			persistenceManager.save();
 
-			assertFalse("Test5 has not been removed", persistenceManager.itemExists("/test5"));
+			assertFalse("Test5 has not been removed", persistenceManager.objectExists("/test5"));
 
 			QueryManager queryManager = this.getQueryManager();
 			Filter filter = queryManager.createFilter(Atomic.class);

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerScopeQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerScopeQueryTest.java?rev=325963&r1=325962&r2=325963&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerScopeQueryTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerScopeQueryTest.java
Mon Oct 17 12:07:21 2005
@@ -74,7 +74,7 @@
     
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().itemExists("/test"))
+        if (getPersistenceManager().objectExists("/test"))
         {
             getPersistenceManager().remove("/test");
             getPersistenceManager().save();



Mime
View raw message