/** Performs a deep copy on <i>other</i>. */ public KsDef(KsDef other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } if (other.isSetStrategy_class()) { this.strategy_class = other.strategy_class; } if (other.isSetStrategy_options()) { Map<String, String> __this__strategy_options = new HashMap<String, String>(); for (Map.Entry<String, String> other_element : other.strategy_options.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__strategy_options_copy_key = other_element_key; String __this__strategy_options_copy_value = other_element_value; __this__strategy_options.put( __this__strategy_options_copy_key, __this__strategy_options_copy_value); } this.strategy_options = __this__strategy_options; } this.replication_factor = other.replication_factor; if (other.isSetCf_defs()) { List<CfDef> __this__cf_defs = new ArrayList<CfDef>(); for (CfDef other_element : other.cf_defs) { __this__cf_defs.add(new CfDef(other_element)); } this.cf_defs = __this__cf_defs; } this.durable_writes = other.durable_writes; }
public boolean equals(KsDef that) { if (that == null) return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_strategy_class = true && this.isSetStrategy_class(); boolean that_present_strategy_class = true && that.isSetStrategy_class(); if (this_present_strategy_class || that_present_strategy_class) { if (!(this_present_strategy_class && that_present_strategy_class)) return false; if (!this.strategy_class.equals(that.strategy_class)) return false; } boolean this_present_strategy_options = true && this.isSetStrategy_options(); boolean that_present_strategy_options = true && that.isSetStrategy_options(); if (this_present_strategy_options || that_present_strategy_options) { if (!(this_present_strategy_options && that_present_strategy_options)) return false; if (!this.strategy_options.equals(that.strategy_options)) return false; } boolean this_present_replication_factor = true && this.isSetReplication_factor(); boolean that_present_replication_factor = true && that.isSetReplication_factor(); if (this_present_replication_factor || that_present_replication_factor) { if (!(this_present_replication_factor && that_present_replication_factor)) return false; if (this.replication_factor != that.replication_factor) return false; } boolean this_present_cf_defs = true && this.isSetCf_defs(); boolean that_present_cf_defs = true && that.isSetCf_defs(); if (this_present_cf_defs || that_present_cf_defs) { if (!(this_present_cf_defs && that_present_cf_defs)) return false; if (!this.cf_defs.equals(that.cf_defs)) return false; } boolean this_present_durable_writes = true && this.isSetDurable_writes(); boolean that_present_durable_writes = true && that.isSetDurable_writes(); if (this_present_durable_writes || that_present_durable_writes) { if (!(this_present_durable_writes && that_present_durable_writes)) return false; if (this.durable_writes != that.durable_writes) return false; } return true; }
public int compareTo(KsDef other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; KsDef typedOther = (KsDef) other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStrategy_class()).compareTo(typedOther.isSetStrategy_class()); if (lastComparison != 0) { return lastComparison; } if (isSetStrategy_class()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.strategy_class, typedOther.strategy_class); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStrategy_options()).compareTo(typedOther.isSetStrategy_options()); if (lastComparison != 0) { return lastComparison; } if (isSetStrategy_options()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.strategy_options, typedOther.strategy_options); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetReplication_factor()).compareTo(typedOther.isSetReplication_factor()); if (lastComparison != 0) { return lastComparison; } if (isSetReplication_factor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.replication_factor, typedOther.replication_factor); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCf_defs()).compareTo(typedOther.isSetCf_defs()); if (lastComparison != 0) { return lastComparison; } if (isSetCf_defs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cf_defs, typedOther.cf_defs); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDurable_writes()).compareTo(typedOther.isSetDurable_writes()); if (lastComparison != 0) { return lastComparison; } if (isSetDurable_writes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durable_writes, typedOther.durable_writes); if (lastComparison != 0) { return lastComparison; } } return 0; }