@Override public ColumnDefinition setIndexWithType(String type) { this.columnDef.setIndex_type(IndexType.valueOf(type)); return this; }
/** * Getting IndexType object from indexType string * @param indexTypeAsString - string return by parser corresponding to IndexType * @return IndexType - an IndexType object */ private IndexType getIndexTypeFromString(String indexTypeAsString) { IndexType indexType; try { indexType = IndexType.findByValue(new Integer(indexTypeAsString)); } catch (NumberFormatException e) { try { // if this is not an integer lets try to get IndexType by name indexType = IndexType.valueOf(indexTypeAsString); } catch (IllegalArgumentException ie) { throw new RuntimeException("IndexType '" + indexTypeAsString + "' is unsupported.", ie); } } if (indexType == null) { throw new RuntimeException("IndexType '" + indexTypeAsString + "' is unsupported."); } return indexType; }
@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(); }
case 3: // INDEX_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.index_type = IndexType.findByValue(iprot.readI32()); struct.setIndex_typeIsSet(true); } else {
if (!(this_present_index_type && that_present_index_type)) return false; if (!this.index_type.equals(that.index_type)) return false;
@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(); }
case 3: // INDEX_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.index_type = IndexType.findByValue(iprot.readI32()); struct.setIndex_typeIsSet(true); } else {
if (!(this_present_index_type && that_present_index_type)) return false; if (!this.index_type.equals(that.index_type)) return false;
@Override public ColumnDefinition setIndexWithType(String type) { this.columnDef.setIndex_type(IndexType.valueOf(type)); return this; }
@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(); }
case 3: // INDEX_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.index_type = IndexType.findByValue(iprot.readI32()); struct.setIndex_typeIsSet(true); } else {
if (!(this_present_index_type && that_present_index_type)) return false; if (!this.index_type.equals(that.index_type)) return false;
@Override public String getIndexType() { return this.columnDef.getIndex_type() == null ? null : this.columnDef.getIndex_type().name(); }
@Override public ColumnDefinition setFields(Map<String, Object> options) { for (Entry<String, FieldMetadata> field : fieldsMetadata.entrySet()) { String fieldName = field.getKey(); if (options.containsKey(fieldName)) { if ("index_type".equals(fieldName)) { setFieldValue(field.getValue().getName(), IndexType.valueOf(options.get(fieldName).toString())); } else { setFieldValue(field.getValue().getName(), options.get(fieldName)); } } } return this; } }
.append(TAB + TAB + "index_type : " + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue())));
BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.index_type = IndexType.findByValue(iprot.readI32()); struct.setIndex_typeIsSet(true);
@Override public String getIndexType() { return this.columnDef.getIndex_type() == null ? null : this.columnDef.getIndex_type().name(); }
@Override public ColumnDefinition setFields(Map<String, Object> options) { for (Entry<String, FieldMetadata> field : fieldsMetadata.entrySet()) { String fieldName = field.getKey(); if (options.containsKey(fieldName)) { if ("index_type".equals(fieldName)) { setFieldValue(field.getValue().getName(), IndexType.valueOf(options.get(fieldName).toString())); } else { setFieldValue(field.getValue().getName(), options.get(fieldName)); } } } return this; } }