tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdan...@apache.org
Subject svn commit: r451012 - /incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java
Date Thu, 28 Sep 2006 20:18:20 GMT
Author: bdaniel
Date: Thu Sep 28 13:18:19 2006
New Revision: 451012

URL: http://svn.apache.org/viewvc?view=rev&rev=451012
Log:
Add support for BigDecimal as a managed-OCC column

Modified:
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java?view=diff&rev=451012&r1=451011&r2=451012
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java
(original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java
Thu Sep 28 13:18:19 2006
@@ -18,6 +18,8 @@
  */
 package org.apache.tuscany.das.rdb.impl;
 
+import java.math.BigDecimal;
+
 public class ManagedParameterImpl extends ParameterImpl {
 	
 	public void setValue(Object oldValue) {
@@ -27,7 +29,9 @@
 	private Object updateValue(Object oldValue) {
 		if ( oldValue instanceof Integer) 
 			return new Integer( ((Integer)oldValue).intValue() + 1);
-		else 
+		else if ( oldValue instanceof BigDecimal ) 
+			return ((BigDecimal)oldValue).add(new BigDecimal(1));
+		else
 			throw new RuntimeException("Unsupported type for managed column: " + oldValue.getClass().getName());
	
 	}
 	



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message