cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cassandra-jdbc.apache-extras....@codespot.com
Subject [cassandra-jdbc] push by wfs...@gmail.com - Merge branch 'master' into trunk on 2012-10-18 15:48 GMT
Date Thu, 18 Oct 2012 15:48:21 GMT
Revision: 9981ad17d2f0
Author:   Rick Shaw <wfshaw@gmail.com>
Date:     Thu Oct 18 08:43:37 2012
Log:      Merge branch 'master' into trunk
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=9981ad17d2f0

Modified:
  /src/main/java/org/apache/cassandra/cql/jdbc/TypedColumn.java

=======================================
--- /src/main/java/org/apache/cassandra/cql/jdbc/TypedColumn.java	Tue Sep  
18 15:39:25 2012
+++ /src/main/java/org/apache/cassandra/cql/jdbc/TypedColumn.java	Thu Oct  
18 08:43:37 2012
@@ -27,18 +27,18 @@
  import org.apache.cassandra.utils.ByteBufferUtil;


-public class TypedColumn
+public class TypedColumn<T>
  {
      private final Column rawColumn;

      // we cache the frequently-accessed forms: java object for value,  
String for name.
      // Note that {N|V}.toString() isn't always the same as Type.getString
      // (a good example is byte buffers).
-    private final Object value;
+    private final T value;
      private final String nameString;
-    private final AbstractJdbcType<?> nameType, valueType;
+    private final AbstractJdbcType<T> nameType, valueType;

-    public TypedColumn(Column column, AbstractJdbcType<?> comparator,  
AbstractJdbcType<?> validator)
+    public TypedColumn(Column column, AbstractJdbcType<T> comparator,  
AbstractJdbcType<T> validator)
      {
          rawColumn = column;
          this.value = (column.value == null | 
| !column.value.hasRemaining()) ? null : validator.compose(column.value);
@@ -52,7 +52,7 @@
          return rawColumn;
      }

-    public Object getValue()
+    public T getValue()
      {
          return value;
      }
@@ -67,12 +67,12 @@
          return valueType.getString(rawColumn.value);
      }

-    public AbstractJdbcType getNameType()
+    public AbstractJdbcType<T> getNameType()
      {
          return nameType;
      }

-    public AbstractJdbcType getValueType()
+    public AbstractJdbcType<T> getValueType()
      {
          return valueType;
      }

Mime
View raw message