db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r589712 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
Date Mon, 29 Oct 2007 16:13:37 GMT
Author: djd
Date: Mon Oct 29 09:13:37 2007
New Revision: 589712

URL: http://svn.apache.org/viewvc?rev=589712&view=rev
Log:
DERBY-3147 Add some comments to ParseId.java to clarify behaviour

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java?rev=589712&r1=589711&r2=589712&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java Mon Oct 29 09:13:37
2007
@@ -197,7 +197,7 @@
 
 	  @exception StandardException Ooops.
 	  */
-	public static String parseId(StringReader r, boolean normalize, boolean normalizeToUpper)
+	private static String parseId(StringReader r, boolean normalize, boolean normalizeToUpper)
 		 throws StandardException
 	{
 		try {
@@ -217,6 +217,19 @@
 		}
 	}
 
+    /**
+     * Parse a regular identifier (unquoted) returning returning either
+     * the value of the identifier or a delimited identifier. Ensures
+     * that all characters in the identifer are valid for a regular identifier.
+     * 
+     * @param r Regular identifier to parse.
+     * @param normalize If true return the identifer converted to a single case, otherwise
return the identifier as entered.
+     * @param normalizeToUpper
+     * @return the value of the identifer or a delimited identifier
+     * @throws IOException Error accessing value
+     * @throws StandardException Error parsing identifier.
+ 
+     */
 	private static String parseUnQId(StringReader r, boolean normalize, boolean normalizeToUpper)
 		 throws IOException,StandardException
 	{
@@ -252,6 +265,16 @@
 			return true;
 		return false;
 	}
+    
+    /**
+     * Parse a delimited (quoted) identifier returning either
+     * the value of the identifier or a delimited identifier.
+     * @param r Quoted identifier to parse.
+     * @param normalize If true return a delimited identifer, otherwise return the identifier's
value.
+     * @return the value of the identifer or a delimited identifier
+     * @throws IOException Error accessing value
+     * @throws StandardException Error parsing identifier.
+     */
 	private static String parseQId(StringReader r,boolean normalize)
 		 throws IOException,StandardException
 	{
@@ -608,7 +631,7 @@
 
 	/**
 	  Delete an id from a list of ids.
-	  @param id an id in normal form (quotes removed, upshifted)
+	  @param id an id in normal form (quotes removed, upshifted if regular)
 	  @param list a comma separated list of ids in external
 	         form (possibly delmited or not upshifted).
 	  @return the list with the id deleted or null if the



Mime
View raw message