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 22:07:13 UTC
svn commit: r808589 [2/3] - in /incubator/cassandra/trunk: interface/
interface/gen-java/org/apache/cassandra/service/
src/java/org/apache/cassandra/net/ src/java/org/apache/cassandra/service/
test/system/
Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java?rev=808589&r1=808588&r2=808589&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java (original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java Thu Aug 27 20:07:12 2009
@@ -47,10 +47,16 @@
public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, NotFoundException, TException;
+ public Map<String,List<ColumnOrSuperColumn>> multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, TException;
+
public ColumnOrSuperColumn get(String keyspace, String key, ColumnPath column_path, int consistency_level) throws InvalidRequestException, NotFoundException, TException;
+ public Map<String,ColumnOrSuperColumn> multiget(String keyspace, List<String> keys, ColumnPath column_path, int consistency_level) throws InvalidRequestException, TException;
+
public int get_count(String keyspace, String key, ColumnParent column_parent, int consistency_level) throws InvalidRequestException, TException;
+ public Map<String,Integer> multiget_count(String keyspace, List<String> keys, ColumnParent column_parent, int consistency_level) throws InvalidRequestException, TException;
+
public void insert(String keyspace, String key, ColumnPath column_path, byte[] value, long timestamp, int consistency_level) throws InvalidRequestException, UnavailableException, TException;
public void batch_insert(String keyspace, BatchMutation batch_mutation, int consistency_level) throws InvalidRequestException, UnavailableException, TException;
@@ -137,6 +143,46 @@
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice failed: unknown result");
}
+ public Map<String,List<ColumnOrSuperColumn>> multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, TException
+ {
+ send_multiget_slice(keyspace, keys, column_parent, predicate, consistency_level);
+ return recv_multiget_slice();
+ }
+
+ public void send_multiget_slice(String keyspace, List<String> keys, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("multiget_slice", TMessageType.CALL, seqid_));
+ multiget_slice_args args = new multiget_slice_args();
+ args.keyspace = keyspace;
+ args.keys = keys;
+ args.column_parent = column_parent;
+ args.predicate = predicate;
+ args.consistency_level = consistency_level;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public Map<String,List<ColumnOrSuperColumn>> recv_multiget_slice() throws InvalidRequestException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ multiget_slice_result result = new multiget_slice_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "multiget_slice failed: unknown result");
+ }
+
public ColumnOrSuperColumn get(String keyspace, String key, ColumnPath column_path, int consistency_level) throws InvalidRequestException, NotFoundException, TException
{
send_get(keyspace, key, column_path, consistency_level);
@@ -179,6 +225,45 @@
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result");
}
+ public Map<String,ColumnOrSuperColumn> multiget(String keyspace, List<String> keys, ColumnPath column_path, int consistency_level) throws InvalidRequestException, TException
+ {
+ send_multiget(keyspace, keys, column_path, consistency_level);
+ return recv_multiget();
+ }
+
+ public void send_multiget(String keyspace, List<String> keys, ColumnPath column_path, int consistency_level) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("multiget", TMessageType.CALL, seqid_));
+ multiget_args args = new multiget_args();
+ args.keyspace = keyspace;
+ args.keys = keys;
+ args.column_path = column_path;
+ args.consistency_level = consistency_level;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public Map<String,ColumnOrSuperColumn> recv_multiget() throws InvalidRequestException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ multiget_result result = new multiget_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "multiget failed: unknown result");
+ }
+
public int get_count(String keyspace, String key, ColumnParent column_parent, int consistency_level) throws InvalidRequestException, TException
{
send_get_count(keyspace, key, column_parent, consistency_level);
@@ -218,6 +303,45 @@
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_count failed: unknown result");
}
+ public Map<String,Integer> multiget_count(String keyspace, List<String> keys, ColumnParent column_parent, int consistency_level) throws InvalidRequestException, TException
+ {
+ send_multiget_count(keyspace, keys, column_parent, consistency_level);
+ return recv_multiget_count();
+ }
+
+ public void send_multiget_count(String keyspace, List<String> keys, ColumnParent column_parent, int consistency_level) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("multiget_count", TMessageType.CALL, seqid_));
+ multiget_count_args args = new multiget_count_args();
+ args.keyspace = keyspace;
+ args.keys = keys;
+ args.column_parent = column_parent;
+ args.consistency_level = consistency_level;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public Map<String,Integer> recv_multiget_count() throws InvalidRequestException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ multiget_count_result result = new multiget_count_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "multiget_count failed: unknown result");
+ }
+
public void insert(String keyspace, String key, ColumnPath column_path, byte[] value, long timestamp, int consistency_level) throws InvalidRequestException, UnavailableException, TException
{
send_insert(keyspace, key, column_path, value, timestamp, consistency_level);
@@ -486,8 +610,11 @@
{
iface_ = iface;
processMap_.put("get_slice", new get_slice());
+ processMap_.put("multiget_slice", new multiget_slice());
processMap_.put("get", new get());
+ processMap_.put("multiget", new multiget());
processMap_.put("get_count", new get_count());
+ processMap_.put("multiget_count", new multiget_count());
processMap_.put("insert", new insert());
processMap_.put("batch_insert", new batch_insert());
processMap_.put("remove", new remove());
@@ -552,6 +679,34 @@
}
+ private class multiget_slice implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ multiget_slice_args args = new multiget_slice_args();
+ args.read(iprot);
+ iprot.readMessageEnd();
+ multiget_slice_result result = new multiget_slice_result();
+ try {
+ result.success = iface_.multiget_slice(args.keyspace, args.keys, args.column_parent, args.predicate, args.consistency_level);
+ } catch (InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing multiget_slice", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing multiget_slice");
+ oprot.writeMessageBegin(new TMessage("multiget_slice", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("multiget_slice", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
private class get implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
@@ -582,6 +737,34 @@
}
+ private class multiget implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ multiget_args args = new multiget_args();
+ args.read(iprot);
+ iprot.readMessageEnd();
+ multiget_result result = new multiget_result();
+ try {
+ result.success = iface_.multiget(args.keyspace, args.keys, args.column_path, args.consistency_level);
+ } catch (InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing multiget", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing multiget");
+ oprot.writeMessageBegin(new TMessage("multiget", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("multiget", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
private class get_count implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
@@ -611,6 +794,34 @@
}
+ private class multiget_count implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ multiget_count_args args = new multiget_count_args();
+ args.read(iprot);
+ iprot.readMessageEnd();
+ multiget_count_result result = new multiget_count_result();
+ try {
+ result.success = iface_.multiget_count(args.keyspace, args.keys, args.column_parent, args.consistency_level);
+ } catch (InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing multiget_count", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing multiget_count");
+ oprot.writeMessageBegin(new TMessage("multiget_count", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("multiget_count", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
private class insert implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
@@ -1799,25 +2010,28 @@
}
- public static class get_args implements TBase, java.io.Serializable, Cloneable, Comparable<get_args> {
- private static final TStruct STRUCT_DESC = new TStruct("get_args");
+ public static class multiget_slice_args implements TBase, java.io.Serializable, Cloneable, Comparable<multiget_slice_args> {
+ private static final TStruct STRUCT_DESC = new TStruct("multiget_slice_args");
private static final TField KEYSPACE_FIELD_DESC = new TField("keyspace", TType.STRING, (short)1);
- private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2);
- private static final TField COLUMN_PATH_FIELD_DESC = new TField("column_path", TType.STRUCT, (short)3);
- private static final TField CONSISTENCY_LEVEL_FIELD_DESC = new TField("consistency_level", TType.I32, (short)4);
+ private static final TField KEYS_FIELD_DESC = new TField("keys", TType.LIST, (short)2);
+ private static final TField COLUMN_PARENT_FIELD_DESC = new TField("column_parent", TType.STRUCT, (short)3);
+ private static final TField PREDICATE_FIELD_DESC = new TField("predicate", TType.STRUCT, (short)4);
+ private static final TField CONSISTENCY_LEVEL_FIELD_DESC = new TField("consistency_level", TType.I32, (short)5);
public String keyspace;
public static final int KEYSPACE = 1;
- public String key;
- public static final int KEY = 2;
- public ColumnPath column_path;
- public static final int COLUMN_PATH = 3;
+ public List<String> keys;
+ public static final int KEYS = 2;
+ public ColumnParent column_parent;
+ public static final int COLUMN_PARENT = 3;
+ public SlicePredicate predicate;
+ public static final int PREDICATE = 4;
/**
*
* @see ConsistencyLevel
*/
public int consistency_level;
- public static final int CONSISTENCY_LEVEL = 4;
+ public static final int CONSISTENCY_LEVEL = 5;
// isset id assignments
private static final int __CONSISTENCY_LEVEL_ISSET_ID = 0;
@@ -1826,33 +2040,38 @@
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(KEYSPACE, new FieldMetaData("keyspace", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
- put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- put(COLUMN_PATH, new FieldMetaData("column_path", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, ColumnPath.class)));
+ put(KEYS, new FieldMetaData("keys", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
+ put(COLUMN_PARENT, new FieldMetaData("column_parent", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, ColumnParent.class)));
+ put(PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, SlicePredicate.class)));
put(CONSISTENCY_LEVEL, new FieldMetaData("consistency_level", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(multiget_slice_args.class, metaDataMap);
}
- public get_args() {
+ public multiget_slice_args() {
this.consistency_level = 1;
}
- public get_args(
+ public multiget_slice_args(
String keyspace,
- String key,
- ColumnPath column_path,
+ List<String> keys,
+ ColumnParent column_parent,
+ SlicePredicate predicate,
int consistency_level)
{
this();
this.keyspace = keyspace;
- this.key = key;
- this.column_path = column_path;
+ this.keys = keys;
+ this.column_parent = column_parent;
+ this.predicate = predicate;
this.consistency_level = consistency_level;
setConsistency_levelIsSet(true);
}
@@ -1860,31 +2079,38 @@
/**
* Performs a deep copy on <i>other</i>.
*/
- public get_args(get_args other) {
+ public multiget_slice_args(multiget_slice_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetKeyspace()) {
this.keyspace = other.keyspace;
}
- if (other.isSetKey()) {
- this.key = other.key;
+ if (other.isSetKeys()) {
+ List<String> __this__keys = new ArrayList<String>();
+ for (String other_element : other.keys) {
+ __this__keys.add(other_element);
+ }
+ this.keys = __this__keys;
}
- if (other.isSetColumn_path()) {
- this.column_path = new ColumnPath(other.column_path);
+ if (other.isSetColumn_parent()) {
+ this.column_parent = new ColumnParent(other.column_parent);
+ }
+ if (other.isSetPredicate()) {
+ this.predicate = new SlicePredicate(other.predicate);
}
this.consistency_level = other.consistency_level;
}
@Override
- public get_args clone() {
- return new get_args(this);
+ public multiget_slice_args clone() {
+ return new multiget_slice_args(this);
}
public String getKeyspace() {
return this.keyspace;
}
- public get_args setKeyspace(String keyspace) {
+ public multiget_slice_args setKeyspace(String keyspace) {
this.keyspace = keyspace;
return this;
}
@@ -1904,74 +2130,2744 @@
}
}
- public String getKey() {
- return this.key;
+ public List<String> getKeys() {
+ return this.keys;
}
- public get_args setKey(String key) {
- this.key = key;
+ public multiget_slice_args setKeys(List<String> keys) {
+ this.keys = keys;
return this;
}
- public void unsetKey() {
- this.key = null;
+ public void unsetKeys() {
+ this.keys = null;
}
- // Returns true if field key is set (has been asigned a value) and false otherwise
- public boolean isSetKey() {
- return this.key != null;
+ // Returns true if field keys is set (has been asigned a value) and false otherwise
+ public boolean isSetKeys() {
+ return this.keys != null;
}
- public void setKeyIsSet(boolean value) {
+ public void setKeysIsSet(boolean value) {
if (!value) {
- this.key = null;
+ this.keys = null;
}
}
- public ColumnPath getColumn_path() {
- return this.column_path;
+ public ColumnParent getColumn_parent() {
+ return this.column_parent;
}
- public get_args setColumn_path(ColumnPath column_path) {
- this.column_path = column_path;
+ public multiget_slice_args setColumn_parent(ColumnParent column_parent) {
+ this.column_parent = column_parent;
return this;
}
- public void unsetColumn_path() {
- this.column_path = null;
+ public void unsetColumn_parent() {
+ this.column_parent = null;
}
- // Returns true if field column_path is set (has been asigned a value) and false otherwise
- public boolean isSetColumn_path() {
- return this.column_path != null;
+ // Returns true if field column_parent is set (has been asigned a value) and false otherwise
+ public boolean isSetColumn_parent() {
+ return this.column_parent != null;
}
- public void setColumn_pathIsSet(boolean value) {
+ public void setColumn_parentIsSet(boolean value) {
if (!value) {
- this.column_path = null;
+ this.column_parent = null;
}
}
- /**
- *
- * @see ConsistencyLevel
- */
- public int getConsistency_level() {
- return this.consistency_level;
+ public SlicePredicate getPredicate() {
+ return this.predicate;
}
- /**
- *
- * @see ConsistencyLevel
- */
- public get_args setConsistency_level(int consistency_level) {
- this.consistency_level = consistency_level;
- setConsistency_levelIsSet(true);
+ public multiget_slice_args setPredicate(SlicePredicate predicate) {
+ this.predicate = predicate;
return this;
}
- public void unsetConsistency_level() {
- __isset_bit_vector.clear(__CONSISTENCY_LEVEL_ISSET_ID);
+ public void unsetPredicate() {
+ this.predicate = null;
+ }
+
+ // Returns true if field predicate is set (has been asigned a value) and false otherwise
+ public boolean isSetPredicate() {
+ return this.predicate != null;
+ }
+
+ public void setPredicateIsSet(boolean value) {
+ if (!value) {
+ this.predicate = null;
+ }
+ }
+
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public int getConsistency_level() {
+ return this.consistency_level;
+ }
+
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public multiget_slice_args setConsistency_level(int consistency_level) {
+ this.consistency_level = consistency_level;
+ setConsistency_levelIsSet(true);
+ return this;
+ }
+
+ public void unsetConsistency_level() {
+ __isset_bit_vector.clear(__CONSISTENCY_LEVEL_ISSET_ID);
+ }
+
+ // Returns true if field consistency_level is set (has been asigned a value) and false otherwise
+ public boolean isSetConsistency_level() {
+ return __isset_bit_vector.get(__CONSISTENCY_LEVEL_ISSET_ID);
+ }
+
+ public void setConsistency_levelIsSet(boolean value) {
+ __isset_bit_vector.set(__CONSISTENCY_LEVEL_ISSET_ID, value);
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case KEYSPACE:
+ if (value == null) {
+ unsetKeyspace();
+ } else {
+ setKeyspace((String)value);
+ }
+ break;
+
+ case KEYS:
+ if (value == null) {
+ unsetKeys();
+ } else {
+ setKeys((List<String>)value);
+ }
+ break;
+
+ case COLUMN_PARENT:
+ if (value == null) {
+ unsetColumn_parent();
+ } else {
+ setColumn_parent((ColumnParent)value);
+ }
+ break;
+
+ case PREDICATE:
+ if (value == null) {
+ unsetPredicate();
+ } else {
+ setPredicate((SlicePredicate)value);
+ }
+ break;
+
+ case CONSISTENCY_LEVEL:
+ if (value == null) {
+ unsetConsistency_level();
+ } else {
+ setConsistency_level((Integer)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case KEYSPACE:
+ return getKeyspace();
+
+ case KEYS:
+ return getKeys();
+
+ case COLUMN_PARENT:
+ return getColumn_parent();
+
+ case PREDICATE:
+ return getPredicate();
+
+ case CONSISTENCY_LEVEL:
+ return getConsistency_level();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case KEYSPACE:
+ return isSetKeyspace();
+ case KEYS:
+ return isSetKeys();
+ case COLUMN_PARENT:
+ return isSetColumn_parent();
+ case PREDICATE:
+ return isSetPredicate();
+ case CONSISTENCY_LEVEL:
+ return isSetConsistency_level();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof multiget_slice_args)
+ return this.equals((multiget_slice_args)that);
+ return false;
+ }
+
+ public boolean equals(multiget_slice_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_keyspace = true && this.isSetKeyspace();
+ boolean that_present_keyspace = true && that.isSetKeyspace();
+ if (this_present_keyspace || that_present_keyspace) {
+ if (!(this_present_keyspace && that_present_keyspace))
+ return false;
+ if (!this.keyspace.equals(that.keyspace))
+ return false;
+ }
+
+ boolean this_present_keys = true && this.isSetKeys();
+ boolean that_present_keys = true && that.isSetKeys();
+ if (this_present_keys || that_present_keys) {
+ if (!(this_present_keys && that_present_keys))
+ return false;
+ if (!this.keys.equals(that.keys))
+ return false;
+ }
+
+ boolean this_present_column_parent = true && this.isSetColumn_parent();
+ boolean that_present_column_parent = true && that.isSetColumn_parent();
+ if (this_present_column_parent || that_present_column_parent) {
+ if (!(this_present_column_parent && that_present_column_parent))
+ return false;
+ if (!this.column_parent.equals(that.column_parent))
+ return false;
+ }
+
+ boolean this_present_predicate = true && this.isSetPredicate();
+ boolean that_present_predicate = true && that.isSetPredicate();
+ if (this_present_predicate || that_present_predicate) {
+ if (!(this_present_predicate && that_present_predicate))
+ return false;
+ if (!this.predicate.equals(that.predicate))
+ return false;
+ }
+
+ boolean this_present_consistency_level = true;
+ boolean that_present_consistency_level = true;
+ if (this_present_consistency_level || that_present_consistency_level) {
+ if (!(this_present_consistency_level && that_present_consistency_level))
+ return false;
+ if (this.consistency_level != that.consistency_level)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(multiget_slice_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ multiget_slice_args typedOther = (multiget_slice_args)other;
+
+ lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(isSetKeyspace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(keyspace, typedOther.keyspace);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetKeys()).compareTo(isSetKeys());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(keys, typedOther.keys);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetColumn_parent()).compareTo(isSetColumn_parent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column_parent, typedOther.column_parent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(isSetPredicate());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(predicate, typedOther.predicate);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(isSetConsistency_level());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(consistency_level, typedOther.consistency_level);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case KEYSPACE:
+ if (field.type == TType.STRING) {
+ this.keyspace = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case KEYS:
+ if (field.type == TType.LIST) {
+ {
+ TList _list21 = iprot.readListBegin();
+ this.keys = new ArrayList<String>(_list21.size);
+ for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ {
+ String _elem23;
+ _elem23 = iprot.readString();
+ this.keys.add(_elem23);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case COLUMN_PARENT:
+ if (field.type == TType.STRUCT) {
+ this.column_parent = new ColumnParent();
+ this.column_parent.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case PREDICATE:
+ if (field.type == TType.STRUCT) {
+ this.predicate = new SlicePredicate();
+ this.predicate.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case CONSISTENCY_LEVEL:
+ if (field.type == TType.I32) {
+ this.consistency_level = iprot.readI32();
+ setConsistency_levelIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!isSetConsistency_level()) {
+ throw new TProtocolException("Required field 'consistency_level' was not found in serialized data! Struct: " + toString());
+ }
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.keyspace != null) {
+ oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
+ oprot.writeString(this.keyspace);
+ oprot.writeFieldEnd();
+ }
+ if (this.keys != null) {
+ oprot.writeFieldBegin(KEYS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.keys.size()));
+ for (String _iter24 : this.keys) {
+ oprot.writeString(_iter24);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.column_parent != null) {
+ oprot.writeFieldBegin(COLUMN_PARENT_FIELD_DESC);
+ this.column_parent.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (this.predicate != null) {
+ oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
+ this.predicate.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC);
+ oprot.writeI32(this.consistency_level);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("multiget_slice_args(");
+ boolean first = true;
+
+ sb.append("keyspace:");
+ if (this.keyspace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.keyspace);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("keys:");
+ if (this.keys == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.keys);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("column_parent:");
+ if (this.column_parent == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.column_parent);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("predicate:");
+ if (this.predicate == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.predicate);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("consistency_level:");
+ String consistency_level_name = ConsistencyLevel.VALUES_TO_NAMES.get(this.consistency_level);
+ if (consistency_level_name != null) {
+ sb.append(consistency_level_name);
+ sb.append(" (");
+ }
+ sb.append(this.consistency_level);
+ if (consistency_level_name != null) {
+ sb.append(")");
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ if (keyspace == null) {
+ throw new TProtocolException("Required field 'keyspace' was not present! Struct: " + toString());
+ }
+ if (keys == null) {
+ throw new TProtocolException("Required field 'keys' was not present! Struct: " + toString());
+ }
+ if (column_parent == null) {
+ throw new TProtocolException("Required field 'column_parent' was not present! Struct: " + toString());
+ }
+ if (predicate == null) {
+ throw new TProtocolException("Required field 'predicate' was not present! Struct: " + toString());
+ }
+ // 'consistency_level' 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
+ if (isSetConsistency_level() && !ConsistencyLevel.VALID_VALUES.contains(consistency_level)){
+ throw new TProtocolException("The field 'consistency_level' has been assigned the invalid value " + consistency_level);
+ }
+ }
+
+ }
+
+ public static class multiget_slice_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("multiget_slice_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
+ private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1);
+
+ public Map<String,List<ColumnOrSuperColumn>> success;
+ public static final int SUCCESS = 0;
+ public InvalidRequestException ire;
+ public static final int IRE = 1;
+
+ // isset id assignments
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new MapMetaData(TType.MAP,
+ new FieldValueMetaData(TType.STRING),
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class)))));
+ put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(multiget_slice_result.class, metaDataMap);
+ }
+
+ public multiget_slice_result() {
+ }
+
+ public multiget_slice_result(
+ Map<String,List<ColumnOrSuperColumn>> success,
+ InvalidRequestException ire)
+ {
+ this();
+ this.success = success;
+ this.ire = ire;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public multiget_slice_result(multiget_slice_result other) {
+ if (other.isSetSuccess()) {
+ Map<String,List<ColumnOrSuperColumn>> __this__success = new HashMap<String,List<ColumnOrSuperColumn>>();
+ for (Map.Entry<String, List<ColumnOrSuperColumn>> other_element : other.success.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ List<ColumnOrSuperColumn> other_element_value = other_element.getValue();
+
+ String __this__success_copy_key = other_element_key;
+
+ List<ColumnOrSuperColumn> __this__success_copy_value = new ArrayList<ColumnOrSuperColumn>();
+ for (ColumnOrSuperColumn other_element_value_element : other_element_value) {
+ __this__success_copy_value.add(new ColumnOrSuperColumn(other_element_value_element));
+ }
+
+ __this__success.put(__this__success_copy_key, __this__success_copy_value);
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetIre()) {
+ this.ire = new InvalidRequestException(other.ire);
+ }
+ }
+
+ @Override
+ public multiget_slice_result clone() {
+ return new multiget_slice_result(this);
+ }
+
+ public Map<String,List<ColumnOrSuperColumn>> getSuccess() {
+ return this.success;
+ }
+
+ public multiget_slice_result setSuccess(Map<String,List<ColumnOrSuperColumn>> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been asigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public multiget_slice_result setIre(InvalidRequestException ire) {
+ this.ire = ire;
+ return this;
+ }
+
+ public void unsetIre() {
+ this.ire = null;
+ }
+
+ // Returns true if field ire is set (has been asigned a value) and false otherwise
+ public boolean isSetIre() {
+ return this.ire != null;
+ }
+
+ public void setIreIsSet(boolean value) {
+ if (!value) {
+ this.ire = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Map<String,List<ColumnOrSuperColumn>>)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((InvalidRequestException)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ case IRE:
+ return getIre();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return isSetSuccess();
+ case IRE:
+ return isSetIre();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof multiget_slice_result)
+ return this.equals((multiget_slice_result)that);
+ return false;
+ }
+
+ public boolean equals(multiget_slice_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_ire = true && this.isSetIre();
+ boolean that_present_ire = true && that.isSetIre();
+ if (this_present_ire || that_present_ire) {
+ if (!(this_present_ire && that_present_ire))
+ return false;
+ if (!this.ire.equals(that.ire))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case SUCCESS:
+ if (field.type == TType.MAP) {
+ {
+ TMap _map25 = iprot.readMapBegin();
+ this.success = new HashMap<String,List<ColumnOrSuperColumn>>(2*_map25.size);
+ for (int _i26 = 0; _i26 < _map25.size; ++_i26)
+ {
+ String _key27;
+ List<ColumnOrSuperColumn> _val28;
+ _key27 = iprot.readString();
+ {
+ TList _list29 = iprot.readListBegin();
+ _val28 = new ArrayList<ColumnOrSuperColumn>(_list29.size);
+ for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+ {
+ ColumnOrSuperColumn _elem31;
+ _elem31 = new ColumnOrSuperColumn();
+ _elem31.read(iprot);
+ _val28.add(_elem31);
+ }
+ iprot.readListEnd();
+ }
+ this.success.put(_key27, _val28);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case IRE:
+ if (field.type == TType.STRUCT) {
+ this.ire = new InvalidRequestException();
+ this.ire.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new TMap(TType.STRING, TType.LIST, this.success.size()));
+ for (Map.Entry<String, List<ColumnOrSuperColumn>> _iter32 : this.success.entrySet()) {
+ oprot.writeString(_iter32.getKey());
+ {
+ oprot.writeListBegin(new TList(TType.STRUCT, _iter32.getValue().size()));
+ for (ColumnOrSuperColumn _iter33 : _iter32.getValue()) {
+ _iter33.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ } else if (this.isSetIre()) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ this.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("multiget_slice_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ire:");
+ if (this.ire == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ire);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ if (success == null) {
+ throw new TProtocolException("Required field 'success' was not present! Struct: " + toString());
+ }
+ if (ire == null) {
+ throw new TProtocolException("Required field 'ire' was not present! Struct: " + toString());
+ }
+ // check that fields of type enum have valid values
+ }
+
+ }
+
+ public static class get_args implements TBase, java.io.Serializable, Cloneable, Comparable<get_args> {
+ private static final TStruct STRUCT_DESC = new TStruct("get_args");
+ private static final TField KEYSPACE_FIELD_DESC = new TField("keyspace", TType.STRING, (short)1);
+ private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2);
+ private static final TField COLUMN_PATH_FIELD_DESC = new TField("column_path", TType.STRUCT, (short)3);
+ private static final TField CONSISTENCY_LEVEL_FIELD_DESC = new TField("consistency_level", TType.I32, (short)4);
+
+ public String keyspace;
+ public static final int KEYSPACE = 1;
+ public String key;
+ public static final int KEY = 2;
+ public ColumnPath column_path;
+ public static final int COLUMN_PATH = 3;
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public int consistency_level;
+ public static final int CONSISTENCY_LEVEL = 4;
+
+ // isset id assignments
+ private static final int __CONSISTENCY_LEVEL_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(KEYSPACE, new FieldMetaData("keyspace", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(COLUMN_PATH, new FieldMetaData("column_path", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, ColumnPath.class)));
+ put(CONSISTENCY_LEVEL, new FieldMetaData("consistency_level", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
+ }
+
+ public get_args() {
+ this.consistency_level = 1;
+
+ }
+
+ public get_args(
+ String keyspace,
+ String key,
+ ColumnPath column_path,
+ int consistency_level)
+ {
+ this();
+ this.keyspace = keyspace;
+ this.key = key;
+ this.column_path = column_path;
+ this.consistency_level = consistency_level;
+ setConsistency_levelIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public get_args(get_args other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetKeyspace()) {
+ this.keyspace = other.keyspace;
+ }
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ if (other.isSetColumn_path()) {
+ this.column_path = new ColumnPath(other.column_path);
+ }
+ this.consistency_level = other.consistency_level;
+ }
+
+ @Override
+ public get_args clone() {
+ return new get_args(this);
+ }
+
+ public String getKeyspace() {
+ return this.keyspace;
+ }
+
+ public get_args setKeyspace(String keyspace) {
+ this.keyspace = keyspace;
+ return this;
+ }
+
+ public void unsetKeyspace() {
+ this.keyspace = null;
+ }
+
+ // Returns true if field keyspace is set (has been asigned a value) and false otherwise
+ public boolean isSetKeyspace() {
+ return this.keyspace != null;
+ }
+
+ public void setKeyspaceIsSet(boolean value) {
+ if (!value) {
+ this.keyspace = null;
+ }
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public get_args setKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ // Returns true if field key is set (has been asigned a value) and false otherwise
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public ColumnPath getColumn_path() {
+ return this.column_path;
+ }
+
+ public get_args setColumn_path(ColumnPath column_path) {
+ this.column_path = column_path;
+ return this;
+ }
+
+ public void unsetColumn_path() {
+ this.column_path = null;
+ }
+
+ // Returns true if field column_path is set (has been asigned a value) and false otherwise
+ public boolean isSetColumn_path() {
+ return this.column_path != null;
+ }
+
+ public void setColumn_pathIsSet(boolean value) {
+ if (!value) {
+ this.column_path = null;
+ }
+ }
+
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public int getConsistency_level() {
+ return this.consistency_level;
+ }
+
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public get_args setConsistency_level(int consistency_level) {
+ this.consistency_level = consistency_level;
+ setConsistency_levelIsSet(true);
+ return this;
+ }
+
+ public void unsetConsistency_level() {
+ __isset_bit_vector.clear(__CONSISTENCY_LEVEL_ISSET_ID);
+ }
+
+ // Returns true if field consistency_level is set (has been asigned a value) and false otherwise
+ public boolean isSetConsistency_level() {
+ return __isset_bit_vector.get(__CONSISTENCY_LEVEL_ISSET_ID);
+ }
+
+ public void setConsistency_levelIsSet(boolean value) {
+ __isset_bit_vector.set(__CONSISTENCY_LEVEL_ISSET_ID, value);
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case KEYSPACE:
+ if (value == null) {
+ unsetKeyspace();
+ } else {
+ setKeyspace((String)value);
+ }
+ break;
+
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ case COLUMN_PATH:
+ if (value == null) {
+ unsetColumn_path();
+ } else {
+ setColumn_path((ColumnPath)value);
+ }
+ break;
+
+ case CONSISTENCY_LEVEL:
+ if (value == null) {
+ unsetConsistency_level();
+ } else {
+ setConsistency_level((Integer)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case KEYSPACE:
+ return getKeyspace();
+
+ case KEY:
+ return getKey();
+
+ case COLUMN_PATH:
+ return getColumn_path();
+
+ case CONSISTENCY_LEVEL:
+ return getConsistency_level();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case KEYSPACE:
+ return isSetKeyspace();
+ case KEY:
+ return isSetKey();
+ case COLUMN_PATH:
+ return isSetColumn_path();
+ case CONSISTENCY_LEVEL:
+ return isSetConsistency_level();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof get_args)
+ return this.equals((get_args)that);
+ return false;
+ }
+
+ public boolean equals(get_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_keyspace = true && this.isSetKeyspace();
+ boolean that_present_keyspace = true && that.isSetKeyspace();
+ if (this_present_keyspace || that_present_keyspace) {
+ if (!(this_present_keyspace && that_present_keyspace))
+ return false;
+ if (!this.keyspace.equals(that.keyspace))
+ return false;
+ }
+
+ boolean this_present_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ boolean this_present_column_path = true && this.isSetColumn_path();
+ boolean that_present_column_path = true && that.isSetColumn_path();
+ if (this_present_column_path || that_present_column_path) {
+ if (!(this_present_column_path && that_present_column_path))
+ return false;
+ if (!this.column_path.equals(that.column_path))
+ return false;
+ }
+
+ boolean this_present_consistency_level = true;
+ boolean that_present_consistency_level = true;
+ if (this_present_consistency_level || that_present_consistency_level) {
+ if (!(this_present_consistency_level && that_present_consistency_level))
+ return false;
+ if (this.consistency_level != that.consistency_level)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(get_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ get_args typedOther = (get_args)other;
+
+ lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(isSetKeyspace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(keyspace, typedOther.keyspace);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetKey()).compareTo(isSetKey());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(key, typedOther.key);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetColumn_path()).compareTo(isSetColumn_path());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column_path, typedOther.column_path);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(isSetConsistency_level());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(consistency_level, typedOther.consistency_level);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case KEYSPACE:
+ if (field.type == TType.STRING) {
+ this.keyspace = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case KEY:
+ if (field.type == TType.STRING) {
+ this.key = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case COLUMN_PATH:
+ if (field.type == TType.STRUCT) {
+ this.column_path = new ColumnPath();
+ this.column_path.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case CONSISTENCY_LEVEL:
+ if (field.type == TType.I32) {
+ this.consistency_level = iprot.readI32();
+ setConsistency_levelIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!isSetConsistency_level()) {
+ throw new TProtocolException("Required field 'consistency_level' was not found in serialized data! Struct: " + toString());
+ }
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.keyspace != null) {
+ oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
+ oprot.writeString(this.keyspace);
+ oprot.writeFieldEnd();
+ }
+ if (this.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(this.key);
+ oprot.writeFieldEnd();
+ }
+ if (this.column_path != null) {
+ oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC);
+ this.column_path.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC);
+ oprot.writeI32(this.consistency_level);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("get_args(");
+ boolean first = true;
+
+ sb.append("keyspace:");
+ if (this.keyspace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.keyspace);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("column_path:");
+ if (this.column_path == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.column_path);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("consistency_level:");
+ String consistency_level_name = ConsistencyLevel.VALUES_TO_NAMES.get(this.consistency_level);
+ if (consistency_level_name != null) {
+ sb.append(consistency_level_name);
+ sb.append(" (");
+ }
+ sb.append(this.consistency_level);
+ if (consistency_level_name != null) {
+ sb.append(")");
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ if (keyspace == null) {
+ throw new TProtocolException("Required field 'keyspace' was not present! Struct: " + toString());
+ }
+ if (key == null) {
+ throw new TProtocolException("Required field 'key' was not present! Struct: " + toString());
+ }
+ if (column_path == null) {
+ throw new TProtocolException("Required field 'column_path' was not present! Struct: " + toString());
+ }
+ // 'consistency_level' 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
+ if (isSetConsistency_level() && !ConsistencyLevel.VALID_VALUES.contains(consistency_level)){
+ throw new TProtocolException("The field 'consistency_level' has been assigned the invalid value " + consistency_level);
+ }
+ }
+
+ }
+
+ public static class get_result implements TBase, java.io.Serializable, Cloneable, Comparable<get_result> {
+ private static final TStruct STRUCT_DESC = new TStruct("get_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
+ private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1);
+ private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2);
+
+ public ColumnOrSuperColumn success;
+ public static final int SUCCESS = 0;
+ public InvalidRequestException ire;
+ public static final int IRE = 1;
+ public NotFoundException nfe;
+ public static final int NFE = 2;
+
+ // isset id assignments
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class)));
+ put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap);
+ }
+
+ public get_result() {
+ }
+
+ public get_result(
+ ColumnOrSuperColumn success,
+ InvalidRequestException ire,
+ NotFoundException nfe)
+ {
+ this();
+ this.success = success;
+ this.ire = ire;
+ this.nfe = nfe;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public get_result(get_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new ColumnOrSuperColumn(other.success);
+ }
+ if (other.isSetIre()) {
+ this.ire = new InvalidRequestException(other.ire);
+ }
+ if (other.isSetNfe()) {
+ this.nfe = new NotFoundException(other.nfe);
+ }
+ }
+
+ @Override
+ public get_result clone() {
+ return new get_result(this);
+ }
+
+ public ColumnOrSuperColumn getSuccess() {
+ return this.success;
+ }
+
+ public get_result setSuccess(ColumnOrSuperColumn success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been asigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public get_result setIre(InvalidRequestException ire) {
+ this.ire = ire;
+ return this;
+ }
+
+ public void unsetIre() {
+ this.ire = null;
+ }
+
+ // Returns true if field ire is set (has been asigned a value) and false otherwise
+ public boolean isSetIre() {
+ return this.ire != null;
+ }
+
+ public void setIreIsSet(boolean value) {
+ if (!value) {
+ this.ire = null;
+ }
+ }
+
+ public NotFoundException getNfe() {
+ return this.nfe;
+ }
+
+ public get_result setNfe(NotFoundException nfe) {
+ this.nfe = nfe;
+ return this;
+ }
+
+ public void unsetNfe() {
+ this.nfe = null;
+ }
+
+ // Returns true if field nfe is set (has been asigned a value) and false otherwise
+ public boolean isSetNfe() {
+ return this.nfe != null;
+ }
+
+ public void setNfeIsSet(boolean value) {
+ if (!value) {
+ this.nfe = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ColumnOrSuperColumn)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((InvalidRequestException)value);
+ }
+ break;
+
+ case NFE:
+ if (value == null) {
+ unsetNfe();
+ } else {
+ setNfe((NotFoundException)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ case IRE:
+ return getIre();
+
+ case NFE:
+ return getNfe();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return isSetSuccess();
+ case IRE:
+ return isSetIre();
+ case NFE:
+ return isSetNfe();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof get_result)
+ return this.equals((get_result)that);
+ return false;
+ }
+
+ public boolean equals(get_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_ire = true && this.isSetIre();
+ boolean that_present_ire = true && that.isSetIre();
+ if (this_present_ire || that_present_ire) {
+ if (!(this_present_ire && that_present_ire))
+ return false;
+ if (!this.ire.equals(that.ire))
+ return false;
+ }
+
+ boolean this_present_nfe = true && this.isSetNfe();
+ boolean that_present_nfe = true && that.isSetNfe();
+ if (this_present_nfe || that_present_nfe) {
+ if (!(this_present_nfe && that_present_nfe))
+ return false;
+ if (!this.nfe.equals(that.nfe))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(get_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ get_result typedOther = (get_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetIre()).compareTo(isSetIre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(ire, typedOther.ire);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetNfe()).compareTo(isSetNfe());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(nfe, typedOther.nfe);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case SUCCESS:
+ if (field.type == TType.STRUCT) {
+ this.success = new ColumnOrSuperColumn();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case IRE:
+ if (field.type == TType.STRUCT) {
+ this.ire = new InvalidRequestException();
+ this.ire.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case NFE:
+ if (field.type == TType.STRUCT) {
+ this.nfe = new NotFoundException();
+ this.nfe.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetIre()) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ this.ire.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetNfe()) {
+ oprot.writeFieldBegin(NFE_FIELD_DESC);
+ this.nfe.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("get_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ire:");
+ if (this.ire == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ire);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("nfe:");
+ if (this.nfe == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nfe);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ if (success == null) {
+ throw new TProtocolException("Required field 'success' was not present! Struct: " + toString());
+ }
+ if (ire == null) {
+ throw new TProtocolException("Required field 'ire' was not present! Struct: " + toString());
+ }
+ if (nfe == null) {
+ throw new TProtocolException("Required field 'nfe' was not present! Struct: " + toString());
+ }
+ // check that fields of type enum have valid values
+ }
+
+ }
+
+ public static class multiget_args implements TBase, java.io.Serializable, Cloneable, Comparable<multiget_args> {
+ private static final TStruct STRUCT_DESC = new TStruct("multiget_args");
+ private static final TField KEYSPACE_FIELD_DESC = new TField("keyspace", TType.STRING, (short)1);
+ private static final TField KEYS_FIELD_DESC = new TField("keys", TType.LIST, (short)2);
+ private static final TField COLUMN_PATH_FIELD_DESC = new TField("column_path", TType.STRUCT, (short)3);
+ private static final TField CONSISTENCY_LEVEL_FIELD_DESC = new TField("consistency_level", TType.I32, (short)4);
+
+ public String keyspace;
+ public static final int KEYSPACE = 1;
+ public List<String> keys;
+ public static final int KEYS = 2;
+ public ColumnPath column_path;
+ public static final int COLUMN_PATH = 3;
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public int consistency_level;
+ public static final int CONSISTENCY_LEVEL = 4;
+
+ // isset id assignments
+ private static final int __CONSISTENCY_LEVEL_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(KEYSPACE, new FieldMetaData("keyspace", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(KEYS, new FieldMetaData("keys", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
+ put(COLUMN_PATH, new FieldMetaData("column_path", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, ColumnPath.class)));
+ put(CONSISTENCY_LEVEL, new FieldMetaData("consistency_level", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(multiget_args.class, metaDataMap);
+ }
+
+ public multiget_args() {
+ this.consistency_level = 1;
+
+ }
+
+ public multiget_args(
+ String keyspace,
+ List<String> keys,
+ ColumnPath column_path,
+ int consistency_level)
+ {
+ this();
+ this.keyspace = keyspace;
+ this.keys = keys;
+ this.column_path = column_path;
+ this.consistency_level = consistency_level;
+ setConsistency_levelIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public multiget_args(multiget_args other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetKeyspace()) {
+ this.keyspace = other.keyspace;
+ }
+ if (other.isSetKeys()) {
+ List<String> __this__keys = new ArrayList<String>();
+ for (String other_element : other.keys) {
+ __this__keys.add(other_element);
+ }
+ this.keys = __this__keys;
+ }
+ if (other.isSetColumn_path()) {
+ this.column_path = new ColumnPath(other.column_path);
+ }
+ this.consistency_level = other.consistency_level;
+ }
+
+ @Override
+ public multiget_args clone() {
+ return new multiget_args(this);
+ }
+
+ public String getKeyspace() {
+ return this.keyspace;
+ }
+
+ public multiget_args setKeyspace(String keyspace) {
+ this.keyspace = keyspace;
+ return this;
+ }
+
+ public void unsetKeyspace() {
+ this.keyspace = null;
+ }
+
+ // Returns true if field keyspace is set (has been asigned a value) and false otherwise
+ public boolean isSetKeyspace() {
+ return this.keyspace != null;
+ }
+
+ public void setKeyspaceIsSet(boolean value) {
+ if (!value) {
+ this.keyspace = null;
+ }
+ }
+
+ public List<String> getKeys() {
+ return this.keys;
+ }
+
+ public multiget_args setKeys(List<String> keys) {
+ this.keys = keys;
+ return this;
+ }
+
+ public void unsetKeys() {
+ this.keys = null;
+ }
+
+ // Returns true if field keys is set (has been asigned a value) and false otherwise
+ public boolean isSetKeys() {
+ return this.keys != null;
+ }
+
+ public void setKeysIsSet(boolean value) {
+ if (!value) {
+ this.keys = null;
+ }
+ }
+
+ public ColumnPath getColumn_path() {
+ return this.column_path;
+ }
+
+ public multiget_args setColumn_path(ColumnPath column_path) {
+ this.column_path = column_path;
+ return this;
+ }
+
+ public void unsetColumn_path() {
+ this.column_path = null;
+ }
+
+ // Returns true if field column_path is set (has been asigned a value) and false otherwise
+ public boolean isSetColumn_path() {
+ return this.column_path != null;
+ }
+
+ public void setColumn_pathIsSet(boolean value) {
+ if (!value) {
+ this.column_path = null;
+ }
+ }
+
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public int getConsistency_level() {
+ return this.consistency_level;
+ }
+
+ /**
+ *
+ * @see ConsistencyLevel
+ */
+ public multiget_args setConsistency_level(int consistency_level) {
+ this.consistency_level = consistency_level;
+ setConsistency_levelIsSet(true);
+ return this;
+ }
+
+ public void unsetConsistency_level() {
+ __isset_bit_vector.clear(__CONSISTENCY_LEVEL_ISSET_ID);
+ }
+
+ // Returns true if field consistency_level is set (has been asigned a value) and false otherwise
+ public boolean isSetConsistency_level() {
+ return __isset_bit_vector.get(__CONSISTENCY_LEVEL_ISSET_ID);
+ }
+
+ public void setConsistency_levelIsSet(boolean value) {
+ __isset_bit_vector.set(__CONSISTENCY_LEVEL_ISSET_ID, value);
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case KEYSPACE:
+ if (value == null) {
+ unsetKeyspace();
+ } else {
+ setKeyspace((String)value);
+ }
+ break;
+
+ case KEYS:
+ if (value == null) {
+ unsetKeys();
+ } else {
+ setKeys((List<String>)value);
+ }
+ break;
+
+ case COLUMN_PATH:
+ if (value == null) {
+ unsetColumn_path();
+ } else {
+ setColumn_path((ColumnPath)value);
+ }
+ break;
+
+ case CONSISTENCY_LEVEL:
+ if (value == null) {
+ unsetConsistency_level();
+ } else {
+ setConsistency_level((Integer)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case KEYSPACE:
+ return getKeyspace();
+
+ case KEYS:
+ return getKeys();
+
+ case COLUMN_PATH:
+ return getColumn_path();
+
+ case CONSISTENCY_LEVEL:
+ return getConsistency_level();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case KEYSPACE:
+ return isSetKeyspace();
+ case KEYS:
+ return isSetKeys();
+ case COLUMN_PATH:
+ return isSetColumn_path();
+ case CONSISTENCY_LEVEL:
+ return isSetConsistency_level();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof multiget_args)
+ return this.equals((multiget_args)that);
+ return false;
+ }
+
+ public boolean equals(multiget_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_keyspace = true && this.isSetKeyspace();
+ boolean that_present_keyspace = true && that.isSetKeyspace();
+ if (this_present_keyspace || that_present_keyspace) {
+ if (!(this_present_keyspace && that_present_keyspace))
+ return false;
+ if (!this.keyspace.equals(that.keyspace))
+ return false;
+ }
+
+ boolean this_present_keys = true && this.isSetKeys();
+ boolean that_present_keys = true && that.isSetKeys();
+ if (this_present_keys || that_present_keys) {
+ if (!(this_present_keys && that_present_keys))
+ return false;
+ if (!this.keys.equals(that.keys))
+ return false;
+ }
+
+ boolean this_present_column_path = true && this.isSetColumn_path();
+ boolean that_present_column_path = true && that.isSetColumn_path();
+ if (this_present_column_path || that_present_column_path) {
+ if (!(this_present_column_path && that_present_column_path))
+ return false;
+ if (!this.column_path.equals(that.column_path))
+ return false;
+ }
+
+ boolean this_present_consistency_level = true;
+ boolean that_present_consistency_level = true;
+ if (this_present_consistency_level || that_present_consistency_level) {
+ if (!(this_present_consistency_level && that_present_consistency_level))
+ return false;
+ if (this.consistency_level != that.consistency_level)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(multiget_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ multiget_args typedOther = (multiget_args)other;
+
+ lastComparison = Boolean.valueOf(isSetKeyspace()).compareTo(isSetKeyspace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(keyspace, typedOther.keyspace);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetKeys()).compareTo(isSetKeys());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(keys, typedOther.keys);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetColumn_path()).compareTo(isSetColumn_path());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(column_path, typedOther.column_path);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetConsistency_level()).compareTo(isSetConsistency_level());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(consistency_level, typedOther.consistency_level);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case KEYSPACE:
+ if (field.type == TType.STRING) {
+ this.keyspace = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case KEYS:
+ if (field.type == TType.LIST) {
+ {
+ TList _list34 = iprot.readListBegin();
+ this.keys = new ArrayList<String>(_list34.size);
+ for (int _i35 = 0; _i35 < _list34.size; ++_i35)
+ {
+ String _elem36;
+ _elem36 = iprot.readString();
+ this.keys.add(_elem36);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case COLUMN_PATH:
+ if (field.type == TType.STRUCT) {
+ this.column_path = new ColumnPath();
+ this.column_path.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case CONSISTENCY_LEVEL:
+ if (field.type == TType.I32) {
+ this.consistency_level = iprot.readI32();
+ setConsistency_levelIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!isSetConsistency_level()) {
+ throw new TProtocolException("Required field 'consistency_level' was not found in serialized data! Struct: " + toString());
+ }
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.keyspace != null) {
+ oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
+ oprot.writeString(this.keyspace);
+ oprot.writeFieldEnd();
+ }
+ if (this.keys != null) {
+ oprot.writeFieldBegin(KEYS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.keys.size()));
+ for (String _iter37 : this.keys) {
+ oprot.writeString(_iter37);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.column_path != null) {
+ oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC);
+ this.column_path.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CONSISTENCY_LEVEL_FIELD_DESC);
+ oprot.writeI32(this.consistency_level);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("multiget_args(");
+ boolean first = true;
+
+ sb.append("keyspace:");
+ if (this.keyspace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.keyspace);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("keys:");
+ if (this.keys == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.keys);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("column_path:");
+ if (this.column_path == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.column_path);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("consistency_level:");
+ String consistency_level_name = ConsistencyLevel.VALUES_TO_NAMES.get(this.consistency_level);
+ if (consistency_level_name != null) {
+ sb.append(consistency_level_name);
+ sb.append(" (");
+ }
+ sb.append(this.consistency_level);
+ if (consistency_level_name != null) {
+ sb.append(")");
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ if (keyspace == null) {
+ throw new TProtocolException("Required field 'keyspace' was not present! Struct: " + toString());
+ }
+ if (keys == null) {
+ throw new TProtocolException("Required field 'keys' was not present! Struct: " + toString());
+ }
+ if (column_path == null) {
+ throw new TProtocolException("Required field 'column_path' was not present! Struct: " + toString());
+ }
+ // 'consistency_level' 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
+ if (isSetConsistency_level() && !ConsistencyLevel.VALID_VALUES.contains(consistency_level)){
+ throw new TProtocolException("The field 'consistency_level' has been assigned the invalid value " + consistency_level);
+ }
+ }
+
+ }
+
+ public static class multiget_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("multiget_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
+ private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1);
+
+ public Map<String,ColumnOrSuperColumn> success;
[... 1787 lines stripped ...]