chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1130477 - in /chemistry/opencmis/trunk/chemistry-opencmis-client: chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/
Date Thu, 02 Jun 2011 10:36:34 GMT
Author: fmui
Date: Thu Jun  2 10:36:33 2011
New Revision: 1130477

URL: http://svn.apache.org/viewvc?rev=1130477&view=rev
Log:
made query statements cloneable

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryStatementImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java?rev=1130477&r1=1130476&r2=1130477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryStatement.java
Thu Jun  2 10:36:33 2011
@@ -55,7 +55,7 @@ import org.apache.chemistry.opencmis.com
  * </blockquote>
  * </p>
  */
-public interface QueryStatement {
+public interface QueryStatement extends Cloneable {
 
     /**
      * Sets the designated parameter to the query name of the given type id.

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryStatementImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryStatementImpl.java?rev=1130477&r1=1130476&r2=1130477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryStatementImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryStatementImpl.java
Thu Jun  2 10:36:33 2011
@@ -327,6 +327,19 @@ public class QueryStatementImpl implemen
         return session.query(toQueryString(), searchAllVersions, context);
     }
 
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        QueryStatementImpl qs = new QueryStatementImpl(session, statement);
+        qs.parametersMap.putAll(parametersMap);
+
+        return qs;
+    }
+
+    @Override
+    public String toString() {
+        return toQueryString();
+    }
+
     // --- internal ---
 
     private static String escape(String str) {



Mime
View raw message