org.apache.thrift.TBaseHelper Java Examples
The following examples show how to use
org.apache.thrift.TBaseHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractThriftBase.java From ikasoa with MIT License | 5 votes |
@Override public int compareTo(AbstractThriftBase other) { if (!ObjectUtil.equals(getClass(), other.getClass())) return getClass().getName().compareTo(other.getClass().getName()); int lastComparison = Boolean.valueOf(isSet(null)).compareTo(isSet(null)); if (lastComparison != 0) return lastComparison; if (isSet(null)) { lastComparison = TBaseHelper.compareTo(str, other.getStr()); if (lastComparison != 0) return lastComparison; } return 0; }
Example #2
Source File: ThriftSampleData.java From incubator-pinot with Apache License 2.0 | 4 votes |
public int compareTo(ThriftSampleData other) { if (!this.getClass().equals(other.getClass())) { return this.getClass().getName().compareTo(other.getClass().getName()); } else { int lastComparison = 0; lastComparison = Boolean.valueOf(this.isSetId()).compareTo(other.isSetId()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetId()) { lastComparison = TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(this.isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetName()) { lastComparison = TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(this.isSetCreated_at()).compareTo(other.isSetCreated_at()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetCreated_at()) { lastComparison = TBaseHelper.compareTo(this.created_at, other.created_at); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(this.isSetActive()).compareTo(other.isSetActive()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetActive()) { lastComparison = TBaseHelper.compareTo(this.active, other.active); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(this.isSetGroups()).compareTo(other.isSetGroups()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetGroups()) { lastComparison = TBaseHelper.compareTo(this.groups, other.groups); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(this.isSetMap_values()).compareTo(other.isSetMap_values()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetMap_values()) { lastComparison = TBaseHelper.compareTo(this.map_values, other.map_values); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(this.isSetSet_values()).compareTo(other.isSetSet_values()); if (lastComparison != 0) { return lastComparison; } else { if (this.isSetSet_values()) { lastComparison = TBaseHelper.compareTo(this.set_values, other.set_values); if (lastComparison != 0) { return lastComparison; } } return 0; } } } } } } } } }
Example #3
Source File: CliClient.java From stratio-cassandra with Apache License 2.0 | 2 votes |
/** * Converts column name into byte[] according to comparator type * @param column - column name from parser * @param columnFamily - column family name from parser * @return bytes[] - into which column name was converted according to comparator type */ private byte[] columnNameAsByteArray(String column, String columnFamily) { return TBaseHelper.byteBufferToByteArray(columnNameAsBytes(column, columnFamily)); }
Example #4
Source File: CliClient.java From stratio-cassandra with Apache License 2.0 | 2 votes |
/** * Converts column name into byte[] according to comparator type * @param column - column name from parser * @param cfDef - column family from parser * @return bytes[] - into which column name was converted according to comparator type */ private byte[] columnNameAsByteArray(String column, CfDef cfDef) { return TBaseHelper.byteBufferToByteArray(columnNameAsBytes(column, cfDef)); }
Example #5
Source File: CliClient.java From stratio-cassandra with Apache License 2.0 | 2 votes |
/** * Converts sub-column name into byte[] according to comparator type * @param superColumn - sub-column name from parser * @param cfDef - column family from parser * @return bytes[] - into which column name was converted according to comparator type */ private byte[] subColumnNameAsByteArray(String superColumn, CfDef cfDef) { return TBaseHelper.byteBufferToByteArray(subColumnNameAsBytes(superColumn, cfDef)); }