/** * isInedexesPresent method return whether indexes present or not on * particular column. * * @param columnInfo * the column info * @param columnDef * the column def * @param isCql3Enabled * the is cql3 enabled * @param isCounterColumnType * the is counter column type * @return true, if is indexes present * @throws Exception * the exception */ private boolean isIndexPresent(ColumnInfo columnInfo, ColumnDef columnDef, boolean isCql3Enabled, boolean isCounterColumnType) throws Exception { return (isValidationClassSame(columnInfo, columnDef, isCql3Enabled, isCounterColumnType) && (columnDef .isSetIndex_type() == columnInfo.isIndexable() || (columnDef.isSetIndex_type()))); }
Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertTrue(columns.contains(new String(columnDef.getName(), Constants.ENCODING))); Assert.assertEquals(IndexType.KEYS, columnDef.index_type); Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertTrue(columns.contains(new String(columnDef.getName(), Constants.ENCODING))); Assert.assertEquals(IndexType.KEYS, columnDef.index_type);
Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertTrue(columns.contains(new String(columnDef.getName(), Constants.ENCODING))); Assert.assertEquals(IndexType.KEYS, columnDef.index_type); Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertTrue(columns.contains(new String(columnDef.getName(), Constants.ENCODING))); Assert.assertEquals(IndexType.KEYS, columnDef.index_type);
Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertNotNull(columnDef.index_name); Assert.assertEquals(IntegerType.class.getName(), columnDef.getValidation_class()); Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertEquals("PERSON_NAME", new String(columnDef.getName(), Constants.ENCODING)); Assert.assertNotNull(columnDef.index_name);
Assert.assertFalse(columnDef.isSetIndex_type()); Assert.assertTrue(columns.contains(new String(columnDef.getName(), Constants.ENCODING))); Assert.assertNull(columnDef.index_name);
Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertNotNull(columnDef.index_name); Assert.assertEquals(IntegerType.class.getName(), columnDef.getValidation_class()); Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertEquals("PERSON_NAME", new String(columnDef.getName(), Constants.ENCODING)); Assert.assertNotNull(columnDef.index_name);
for (ColumnDef columnDef : cfDef.getColumn_metadata()) Assert.assertTrue(columnDef.isSetIndex_type()); Assert.assertTrue(columns.contains(new String(columnDef.getName(), Constants.ENCODING))); Assert.assertNotNull(columnDef.index_name);
/** * isInedexesPresent method return whether indexes present or not on * particular column. * * @param columnInfo * the column info * @param cfDef * the cf def * @return true, if is indexes present * @throws UnsupportedEncodingException */ private boolean isIndexPresent(ColumnInfo columnInfo, ColumnDef columnDef, boolean isCql3Enabled) throws Exception { return (isValidationClassSame(columnInfo, columnDef, isCql3Enabled) && (columnDef.isSetIndex_type() == columnInfo .isIndexable() || (columnDef.isSetIndex_type()))); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_validation_class = true && (isSetValidation_class()); builder.append(present_validation_class); if (present_validation_class) builder.append(validation_class); boolean present_index_type = true && (isSetIndex_type()); builder.append(present_index_type); if (present_index_type) builder.append(index_type.getValue()); boolean present_index_name = true && (isSetIndex_name()); builder.append(present_index_name); if (present_index_name) builder.append(index_name); boolean present_index_options = true && (isSetIndex_options()); builder.append(present_index_options); if (present_index_options) builder.append(index_options); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_validation_class = true && (isSetValidation_class()); builder.append(present_validation_class); if (present_validation_class) builder.append(validation_class); boolean present_index_type = true && (isSetIndex_type()); builder.append(present_index_type); if (present_index_type) builder.append(index_type.getValue()); boolean present_index_name = true && (isSetIndex_name()); builder.append(present_index_name); if (present_index_name) builder.append(index_name); boolean present_index_options = true && (isSetIndex_options()); builder.append(present_index_options); if (present_index_options) builder.append(index_options); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_validation_class = true && (isSetValidation_class()); builder.append(present_validation_class); if (present_validation_class) builder.append(validation_class); boolean present_index_type = true && (isSetIndex_type()); builder.append(present_index_type); if (present_index_type) builder.append(index_type.getValue()); boolean present_index_name = true && (isSetIndex_name()); builder.append(present_index_name); if (present_index_name) builder.append(index_name); boolean present_index_options = true && (isSetIndex_options()); builder.append(present_index_options); if (present_index_options) builder.append(index_options); return builder.toHashCode(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case VALIDATION_CLASS: return isSetValidation_class(); case INDEX_TYPE: return isSetIndex_type(); case INDEX_NAME: return isSetIndex_name(); case INDEX_OPTIONS: return isSetIndex_options(); } throw new IllegalStateException(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case VALIDATION_CLASS: return isSetValidation_class(); case INDEX_TYPE: return isSetIndex_type(); case INDEX_NAME: return isSetIndex_name(); case INDEX_OPTIONS: return isSetIndex_options(); } throw new IllegalStateException(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case VALIDATION_CLASS: return isSetValidation_class(); case INDEX_TYPE: return isSetIndex_type(); case INDEX_NAME: return isSetIndex_name(); case INDEX_OPTIONS: return isSetIndex_options(); } throw new IllegalStateException(); }
oprot.writeString(struct.validation_class); BitSet optionals = new BitSet(); if (struct.isSetIndex_type()) { optionals.set(0); if (struct.isSetIndex_type()) { oprot.writeI32(struct.index_type.getValue());
oprot.writeString(struct.validation_class); BitSet optionals = new BitSet(); if (struct.isSetIndex_type()) { optionals.set(0); if (struct.isSetIndex_type()) { oprot.writeI32(struct.index_type.getValue());
/** * Performs a deep copy on <i>other</i>. */ public ColumnDef(ColumnDef other) { if (other.isSetName()) { this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name); ; } if (other.isSetValidation_class()) { this.validation_class = other.validation_class; } if (other.isSetIndex_type()) { this.index_type = other.index_type; } if (other.isSetIndex_name()) { this.index_name = other.index_name; } if (other.isSetIndex_options()) { Map<String,String> __this__index_options = new HashMap<String,String>(other.index_options); this.index_options = __this__index_options; } }
/** * Performs a deep copy on <i>other</i>. */ public ColumnDef(ColumnDef other) { if (other.isSetName()) { this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name); ; } if (other.isSetValidation_class()) { this.validation_class = other.validation_class; } if (other.isSetIndex_type()) { this.index_type = other.index_type; } if (other.isSetIndex_name()) { this.index_name = other.index_name; } if (other.isSetIndex_options()) { Map<String,String> __this__index_options = new HashMap<String,String>(other.index_options); this.index_options = __this__index_options; } }
/** * Performs a deep copy on <i>other</i>. */ public ColumnDef(ColumnDef other) { if (other.isSetName()) { this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name); ; } if (other.isSetValidation_class()) { this.validation_class = other.validation_class; } if (other.isSetIndex_type()) { this.index_type = other.index_type; } if (other.isSetIndex_name()) { this.index_name = other.index_name; } if (other.isSetIndex_options()) { Map<String,String> __this__index_options = new HashMap<String,String>(other.index_options); this.index_options = __this__index_options; } }
for (ColumnDef def : thriftDefs) if (def.isSetIndex_type())