You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/08/27 20:11:59 UTC
svn commit: r808559 [2/2] - in /incubator/cassandra/trunk: interface/
interface/gen-java/org/apache/cassandra/service/ lib/ lib/licenses/
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Column.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Column.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Column.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Column.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class Column implements TBase, java.io.Serializable, Cloneable {
+public class Column implements TBase, java.io.Serializable, Cloneable, Comparable<Column> {
private static final TStruct STRUCT_DESC = new TStruct("Column");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)2);
@@ -52,10 +54,9 @@
public long timestamp;
public static final int TIMESTAMP = 3;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- public boolean timestamp = false;
- }
+ // isset id assignments
+ private static final int __TIMESTAMP_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
@@ -82,13 +83,15 @@
this.name = name;
this.value = value;
this.timestamp = timestamp;
- this.__isset.timestamp = true;
+ setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public Column(Column other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetName()) {
this.name = new byte[other.name.length];
System.arraycopy(other.name, 0, name, 0, other.name.length);
@@ -97,7 +100,6 @@
this.value = new byte[other.value.length];
System.arraycopy(other.value, 0, value, 0, other.value.length);
}
- __isset.timestamp = other.__isset.timestamp;
this.timestamp = other.timestamp;
}
@@ -160,21 +162,21 @@
public Column setTimestamp(long timestamp) {
this.timestamp = timestamp;
- this.__isset.timestamp = true;
+ setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
- this.__isset.timestamp = false;
+ __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
// Returns true if field timestamp is set (has been asigned a value) and false otherwise
public boolean isSetTimestamp() {
- return this.__isset.timestamp;
+ return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- this.__isset.timestamp = value;
+ __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(int fieldID, Object value) {
@@ -286,6 +288,41 @@
return 0;
}
+ public int compareTo(Column other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Column typedOther = (Column)other;
+
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(name, typedOther.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(value, typedOther.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -314,7 +351,7 @@
case TIMESTAMP:
if (field.type == TType.I64) {
this.timestamp = iprot.readI64();
- this.__isset.timestamp = true;
+ setTimestampIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -329,6 +366,9 @@
// check for required fields of primitive type, which can't be checked in the validate method
+ if (!isSetTimestamp()) {
+ throw new TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString());
+ }
validate();
}
@@ -393,6 +433,13 @@
public void validate() throws TException {
// check for required fields
+ if (name == null) {
+ throw new TProtocolException("Required field 'name' was not present! Struct: " + toString());
+ }
+ if (value == null) {
+ throw new TProtocolException("Required field 'value' was not present! Struct: " + toString());
+ }
+ // 'timestamp' is only checked in read() because it's a primitive and you chose the non-beans generator.
// check that fields of type enum have valid values
}
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnOrSuperColumn.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnOrSuperColumn.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnOrSuperColumn.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnOrSuperColumn.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class ColumnOrSuperColumn implements TBase, java.io.Serializable, Cloneable {
+public class ColumnOrSuperColumn implements TBase, java.io.Serializable, Cloneable, Comparable<ColumnOrSuperColumn> {
private static final TStruct STRUCT_DESC = new TStruct("ColumnOrSuperColumn");
private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRUCT, (short)1);
private static final TField SUPER_COLUMN_FIELD_DESC = new TField("super_column", TType.STRUCT, (short)2);
@@ -49,9 +51,7 @@
public SuperColumn super_column;
public static final int SUPER_COLUMN = 2;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ // isset id assignments
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL,
@@ -228,6 +228,33 @@
return 0;
}
+ public int compareTo(ColumnOrSuperColumn other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ ColumnOrSuperColumn typedOther = (ColumnOrSuperColumn)other;
+
+ lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column, typedOther.column);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetSuper_column()).compareTo(isSetSuper_column());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnParent.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnParent.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnParent.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnParent.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class ColumnParent implements TBase, java.io.Serializable, Cloneable {
+public class ColumnParent implements TBase, java.io.Serializable, Cloneable, Comparable<ColumnParent> {
private static final TStruct STRUCT_DESC = new TStruct("ColumnParent");
private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("column_family", TType.STRING, (short)3);
private static final TField SUPER_COLUMN_FIELD_DESC = new TField("super_column", TType.STRING, (short)4);
@@ -49,9 +51,7 @@
public byte[] super_column;
public static final int SUPER_COLUMN = 4;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ // isset id assignments
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(COLUMN_FAMILY, new FieldMetaData("column_family", TFieldRequirementType.DEFAULT,
@@ -229,6 +229,33 @@
return 0;
}
+ public int compareTo(ColumnParent other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ ColumnParent typedOther = (ColumnParent)other;
+
+ lastComparison = Boolean.valueOf(isSetColumn_family()).compareTo(isSetColumn_family());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column_family, typedOther.column_family);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetSuper_column()).compareTo(isSetSuper_column());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -320,6 +347,9 @@
public void validate() throws TException {
// check for required fields
+ if (column_family == null) {
+ throw new TProtocolException("Required field 'column_family' was not present! Struct: " + toString());
+ }
// check that fields of type enum have valid values
}
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnPath.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnPath.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnPath.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ColumnPath.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class ColumnPath implements TBase, java.io.Serializable, Cloneable {
+public class ColumnPath implements TBase, java.io.Serializable, Cloneable, Comparable<ColumnPath> {
private static final TStruct STRUCT_DESC = new TStruct("ColumnPath");
private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("column_family", TType.STRING, (short)3);
private static final TField SUPER_COLUMN_FIELD_DESC = new TField("super_column", TType.STRING, (short)4);
@@ -52,9 +54,7 @@
public byte[] column;
public static final int COLUMN = 5;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ // isset id assignments
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(COLUMN_FAMILY, new FieldMetaData("column_family", TFieldRequirementType.DEFAULT,
@@ -286,6 +286,41 @@
return 0;
}
+ public int compareTo(ColumnPath other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ ColumnPath typedOther = (ColumnPath)other;
+
+ lastComparison = Boolean.valueOf(isSetColumn_family()).compareTo(isSetColumn_family());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column_family, typedOther.column_family);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetSuper_column()).compareTo(isSetSuper_column());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column, typedOther.column);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -406,6 +441,9 @@
public void validate() throws TException {
// check for required fields
+ if (column_family == null) {
+ throw new TProtocolException("Required field 'column_family' was not present! Struct: " + toString());
+ }
// check that fields of type enum have valid values
}
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java Thu Aug 27 18:11:58 2009
@@ -33,22 +33,22 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class InvalidRequestException extends Exception implements TBase, java.io.Serializable, Cloneable {
+public class InvalidRequestException extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable<InvalidRequestException> {
private static final TStruct STRUCT_DESC = new TStruct("InvalidRequestException");
private static final TField WHY_FIELD_DESC = new TField("why", TType.STRING, (short)1);
public String why;
public static final int WHY = 1;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ // isset id assignments
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(WHY, new FieldMetaData("why", TFieldRequirementType.DEFAULT,
@@ -172,6 +172,25 @@
return 0;
}
+ public int compareTo(InvalidRequestException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ InvalidRequestException typedOther = (InvalidRequestException)other;
+
+ lastComparison = Boolean.valueOf(isSetWhy()).compareTo(isSetWhy());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(why, typedOther.why);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -234,6 +253,9 @@
public void validate() throws TException {
// check for required fields
+ if (why == null) {
+ throw new TProtocolException("Required field 'why' was not present! Struct: " + toString());
+ }
// check that fields of type enum have valid values
}
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class NotFoundException extends Exception implements TBase, java.io.Serializable, Cloneable {
+public class NotFoundException extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable<NotFoundException> {
private static final TStruct STRUCT_DESC = new TStruct("NotFoundException");
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
@@ -106,6 +108,17 @@
return 0;
}
+ public int compareTo(NotFoundException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ NotFoundException typedOther = (NotFoundException)other;
+
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SlicePredicate.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SlicePredicate.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SlicePredicate.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SlicePredicate.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class SlicePredicate implements TBase, java.io.Serializable, Cloneable {
+public class SlicePredicate implements TBase, java.io.Serializable, Cloneable, Comparable<SlicePredicate> {
private static final TStruct STRUCT_DESC = new TStruct("SlicePredicate");
private static final TField COLUMN_NAMES_FIELD_DESC = new TField("column_names", TType.LIST, (short)1);
private static final TField SLICE_RANGE_FIELD_DESC = new TField("slice_range", TType.STRUCT, (short)2);
@@ -49,9 +51,7 @@
public SliceRange slice_range;
public static final int SLICE_RANGE = 2;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ // isset id assignments
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(COLUMN_NAMES, new FieldMetaData("column_names", TFieldRequirementType.OPTIONAL,
@@ -235,6 +235,33 @@
return 0;
}
+ public int compareTo(SlicePredicate other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ SlicePredicate typedOther = (SlicePredicate)other;
+
+ lastComparison = Boolean.valueOf(isSetColumn_names()).compareTo(isSetColumn_names());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column_names, typedOther.column_names);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetSlice_range()).compareTo(isSetSlice_range());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(slice_range, typedOther.slice_range);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SliceRange.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SliceRange.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SliceRange.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SliceRange.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class SliceRange implements TBase, java.io.Serializable, Cloneable {
+public class SliceRange implements TBase, java.io.Serializable, Cloneable, Comparable<SliceRange> {
private static final TStruct STRUCT_DESC = new TStruct("SliceRange");
private static final TField START_FIELD_DESC = new TField("start", TType.STRING, (short)1);
private static final TField FINISH_FIELD_DESC = new TField("finish", TType.STRING, (short)2);
@@ -55,11 +57,10 @@
public int count;
public static final int COUNT = 4;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- public boolean reversed = false;
- public boolean count = false;
- }
+ // isset id assignments
+ private static final int __REVERSED_ISSET_ID = 0;
+ private static final int __COUNT_ISSET_ID = 1;
+ private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(START, new FieldMetaData("start", TFieldRequirementType.DEFAULT,
@@ -93,15 +94,17 @@
this.start = start;
this.finish = finish;
this.reversed = reversed;
- this.__isset.reversed = true;
+ setReversedIsSet(true);
this.count = count;
- this.__isset.count = true;
+ setCountIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public SliceRange(SliceRange other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetStart()) {
this.start = new byte[other.start.length];
System.arraycopy(other.start, 0, start, 0, other.start.length);
@@ -110,9 +113,7 @@
this.finish = new byte[other.finish.length];
System.arraycopy(other.finish, 0, finish, 0, other.finish.length);
}
- __isset.reversed = other.__isset.reversed;
this.reversed = other.reversed;
- __isset.count = other.__isset.count;
this.count = other.count;
}
@@ -175,21 +176,21 @@
public SliceRange setReversed(boolean reversed) {
this.reversed = reversed;
- this.__isset.reversed = true;
+ setReversedIsSet(true);
return this;
}
public void unsetReversed() {
- this.__isset.reversed = false;
+ __isset_bit_vector.clear(__REVERSED_ISSET_ID);
}
// Returns true if field reversed is set (has been asigned a value) and false otherwise
public boolean isSetReversed() {
- return this.__isset.reversed;
+ return __isset_bit_vector.get(__REVERSED_ISSET_ID);
}
public void setReversedIsSet(boolean value) {
- this.__isset.reversed = value;
+ __isset_bit_vector.set(__REVERSED_ISSET_ID, value);
}
public int getCount() {
@@ -198,21 +199,21 @@
public SliceRange setCount(int count) {
this.count = count;
- this.__isset.count = true;
+ setCountIsSet(true);
return this;
}
public void unsetCount() {
- this.__isset.count = false;
+ __isset_bit_vector.clear(__COUNT_ISSET_ID);
}
// Returns true if field count is set (has been asigned a value) and false otherwise
public boolean isSetCount() {
- return this.__isset.count;
+ return __isset_bit_vector.get(__COUNT_ISSET_ID);
}
public void setCountIsSet(boolean value) {
- this.__isset.count = value;
+ __isset_bit_vector.set(__COUNT_ISSET_ID, value);
}
public void setFieldValue(int fieldID, Object value) {
@@ -346,6 +347,49 @@
return 0;
}
+ public int compareTo(SliceRange other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ SliceRange typedOther = (SliceRange)other;
+
+ lastComparison = Boolean.valueOf(isSetStart()).compareTo(isSetStart());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(start, typedOther.start);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetFinish()).compareTo(isSetFinish());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(finish, typedOther.finish);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetReversed()).compareTo(isSetReversed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(reversed, typedOther.reversed);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCount()).compareTo(isSetCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(count, typedOther.count);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -374,7 +418,7 @@
case REVERSED:
if (field.type == TType.BOOL) {
this.reversed = iprot.readBool();
- this.__isset.reversed = true;
+ setReversedIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -382,7 +426,7 @@
case COUNT:
if (field.type == TType.I32) {
this.count = iprot.readI32();
- this.__isset.count = true;
+ setCountIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -397,6 +441,12 @@
// check for required fields of primitive type, which can't be checked in the validate method
+ if (!isSetReversed()) {
+ throw new TProtocolException("Required field 'reversed' was not found in serialized data! Struct: " + toString());
+ }
+ if (!isSetCount()) {
+ throw new TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+ }
validate();
}
@@ -468,6 +518,14 @@
public void validate() throws TException {
// check for required fields
+ if (start == null) {
+ throw new TProtocolException("Required field 'start' was not present! Struct: " + toString());
+ }
+ if (finish == null) {
+ throw new TProtocolException("Required field 'finish' was not present! Struct: " + toString());
+ }
+ // 'reversed' is only checked in read() because it's a primitive and you chose the non-beans generator.
+ // 'count' is only checked in read() because it's a primitive and you chose the non-beans generator.
// check that fields of type enum have valid values
}
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SuperColumn.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SuperColumn.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SuperColumn.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SuperColumn.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class SuperColumn implements TBase, java.io.Serializable, Cloneable {
+public class SuperColumn implements TBase, java.io.Serializable, Cloneable, Comparable<SuperColumn> {
private static final TStruct STRUCT_DESC = new TStruct("SuperColumn");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)2);
@@ -49,9 +51,7 @@
public List<Column> columns;
public static final int COLUMNS = 2;
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ // isset id assignments
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
@@ -234,6 +234,33 @@
return 0;
}
+ public int compareTo(SuperColumn other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ SuperColumn typedOther = (SuperColumn)other;
+
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(name, typedOther.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(columns, typedOther.columns);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
@@ -338,6 +365,12 @@
public void validate() throws TException {
// check for required fields
+ if (name == null) {
+ throw new TProtocolException("Required field 'name' was not present! Struct: " + toString());
+ }
+ if (columns == null) {
+ throw new TProtocolException("Required field 'columns' was not present! Struct: " + toString());
+ }
// check that fields of type enum have valid values
}
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/UnavailableException.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/UnavailableException.java?rev=808559&r1=808558&r2=808559&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/UnavailableException.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/UnavailableException.java Thu Aug 27 18:11:58 2009
@@ -33,13 +33,15 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
-import org.apache.log4j.Logger;
+import java.util.BitSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
-public class UnavailableException extends Exception implements TBase, java.io.Serializable, Cloneable {
+public class UnavailableException extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable<UnavailableException> {
private static final TStruct STRUCT_DESC = new TStruct("UnavailableException");
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
@@ -106,6 +108,17 @@
return 0;
}
+ public int compareTo(UnavailableException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ UnavailableException typedOther = (UnavailableException)other;
+
+ return 0;
+ }
+
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
Added: incubator/cassandra/trunk/lib/libthrift-r806014.jar
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/lib/libthrift-r806014.jar?rev=808559&view=auto
==============================================================================
Files incubator/cassandra/trunk/lib/libthrift-r806014.jar (added) and incubator/cassandra/trunk/lib/libthrift-r806014.jar Thu Aug 27 18:11:58 2009 differ
Added: incubator/cassandra/trunk/lib/licenses/slf4j-api-1.5.8.jar.LICENSE
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/lib/licenses/slf4j-api-1.5.8.jar.LICENSE?rev=808559&view=auto
==============================================================================
--- incubator/cassandra/trunk/lib/licenses/slf4j-api-1.5.8.jar.LICENSE (added)
+++ incubator/cassandra/trunk/lib/licenses/slf4j-api-1.5.8.jar.LICENSE Thu Aug 27 18:11:58 2009
@@ -0,0 +1,24 @@
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
Added: incubator/cassandra/trunk/lib/licenses/slf4j-log4j12-1.5.8.jar.LICENSE
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/lib/licenses/slf4j-log4j12-1.5.8.jar.LICENSE?rev=808559&view=auto
==============================================================================
--- incubator/cassandra/trunk/lib/licenses/slf4j-log4j12-1.5.8.jar.LICENSE (added)
+++ incubator/cassandra/trunk/lib/licenses/slf4j-log4j12-1.5.8.jar.LICENSE Thu Aug 27 18:11:58 2009
@@ -0,0 +1,24 @@
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
Added: incubator/cassandra/trunk/lib/slf4j-api-1.5.8.jar
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/lib/slf4j-api-1.5.8.jar?rev=808559&view=auto
==============================================================================
Files incubator/cassandra/trunk/lib/slf4j-api-1.5.8.jar (added) and incubator/cassandra/trunk/lib/slf4j-api-1.5.8.jar Thu Aug 27 18:11:58 2009 differ
Added: incubator/cassandra/trunk/lib/slf4j-log4j12-1.5.8.jar
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/lib/slf4j-log4j12-1.5.8.jar?rev=808559&view=auto
==============================================================================
Files incubator/cassandra/trunk/lib/slf4j-log4j12-1.5.8.jar (added) and incubator/cassandra/trunk/lib/slf4j-log4j12-1.5.8.jar Thu Aug 27 18:11:58 2009 differ