cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [1/4] cayenne git commit: cleanup, filling API omissions
Date Sun, 25 Jan 2015 10:53:05 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master be29a6d68 -> 88361d20d


cleanup, filling API omissions


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/ce731659
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/ce731659
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/ce731659

Branch: refs/heads/master
Commit: ce73165992bb45f275015a07d5621d0a248d20a4
Parents: be29a6d
Author: aadamchik <aadamchik@apache.org>
Authored: Sat Jan 24 09:41:34 2015 +0100
Committer: aadamchik <aadamchik@apache.org>
Committed: Sat Jan 24 09:58:21 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/cayenne/query/SQLSelect.java   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/ce731659/cayenne-server/src/main/java/org/apache/cayenne/query/SQLSelect.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/SQLSelect.java b/cayenne-server/src/main/java/org/apache/cayenne/query/SQLSelect.java
index aa157ba..62b4547 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/SQLSelect.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/SQLSelect.java
@@ -204,8 +204,6 @@ public class SQLSelect<T> extends IndirectQuery implements Select<T>
{
 	 * <p>
 	 * Note that calling this method will reset any previously set *named*
 	 * parameters.
-	 * 
-	 * @since 4.0
 	 */
 	public SQLSelect<T> paramsArray(Object... params) {
 		return paramsList(params != null ? Arrays.asList(params) : null);
@@ -221,8 +219,6 @@ public class SQLSelect<T> extends IndirectQuery implements Select<T>
{
 	 * <p>
 	 * Note that calling this method will reset any previously set *named*
 	 * parameters.
-	 * 
-	 * @since 4.0
 	 */
 	public SQLSelect<T> paramsList(List<Object> params) {
 		// since named parameters are specified, resetting positional
@@ -234,14 +230,21 @@ public class SQLSelect<T> extends IndirectQuery implements Select<T>
{
 	}
 
 	/**
-	 * Returns an immmutable map of parameters that will be bound to SQL. A
-	 * caller is free to add/remove parameters from the returned map as needed.
-	 * Alternatively one may use chained {@link #params(String, Object)}
+	 * Returns a potentially immmutable map of named parameters that will be
+	 * bound to SQL.
 	 */
 	public Map<String, Object> getParams() {
 		return params != null ? params : Collections.<String, Object> emptyMap();
 	}
 
+	/**
+	 * Returns a potentially immmutable list of positional parameters that will
+	 * be bound to SQL.
+	 */
+	public List<Object> getPositionalParams() {
+		return positionalParams != null ? positionalParams : Collections.emptyList();
+	}
+
 	@Override
 	protected Query createReplacementQuery(EntityResolver resolver) {
 


Mime
View raw message