public TTimeRange deepCopy() { return new TTimeRange(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof TTimeRange) return this.equals((TTimeRange)that); return false; }
@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MIN_STAMP: return getMinStamp(); case MAX_STAMP: return getMaxStamp(); } throw new java.lang.IllegalStateException(); }
@Override public void clear() { setMinStampIsSet(false); this.minStamp = 0; setMaxStampIsSet(false); this.maxStamp = 0; }
/** 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 java.lang.IllegalArgumentException(); } switch (field) { case MIN_STAMP: return isSetMinStamp(); case MAX_STAMP: return isSetMaxStamp(); } throw new java.lang.IllegalStateException(); }
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case MIN_STAMP: if (value == null) { unsetMinStamp(); } else { setMinStamp((java.lang.Long)value); } break; case MAX_STAMP: if (value == null) { unsetMaxStamp(); } else { setMaxStamp((java.lang.Long)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.minStamp = iprot.readI64(); struct.setMinStampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.maxStamp = iprot.readI64(); struct.setMaxStampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetMinStamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'minStamp' was not found in serialized data! Struct: " + toString()); if (!struct.isSetMaxStamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxStamp' was not found in serialized data! Struct: " + toString()); struct.validate();
struct.timeRange = new TTimeRange(); struct.timeRange.read(iprot); struct.setTimeRangeIsSet(true); _val132 = new TTimeRange(); _val132.read(iprot); struct.colFamTimeRangeMap.put(_key131, _val132);
timeRange.isSetMinStamp() && timeRange.isSetMaxStamp()) { out.setTimeRange(timeRange.getMinStamp(), timeRange.getMaxStamp()); for (Map.Entry<ByteBuffer, TTimeRange> entry : colFamTimeRangeMap.entrySet()) { out.setColumnFamilyTimeRange(Bytes.toBytes(entry.getKey()), entry.getValue().getMinStamp(), entry.getValue().getMaxStamp());
TTimeRange tTimeRange = new TTimeRange(); tTimeRange.setMinStamp(in.getTimeRange().getMin()).setMaxStamp(in.getTimeRange().getMax()); out.setTimeRange(tTimeRange); out.setBatchSize(in.getBatch()); for (Map.Entry<byte[], TimeRange> entry : in.getColumnFamilyTimeRange().entrySet()) { if (entry.getValue() != null) { TTimeRange timeRange = new TTimeRange(); timeRange.setMinStamp(entry.getValue().getMin()).setMaxStamp(entry.getValue().getMax()); out.putToColFamTimeRangeMap(ByteBuffer.wrap(entry.getKey()), timeRange);
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public TTimeRange setMaxStamp(long maxStamp) { this.maxStamp = maxStamp; setMaxStampIsSet(true); return this; }
if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.minStamp = iprot.readI64(); struct.setMinStampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.maxStamp = iprot.readI64(); struct.setMaxStampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetMinStamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'minStamp' was not found in serialized data! Struct: " + toString()); if (!struct.isSetMaxStamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxStamp' was not found in serialized data! Struct: " + toString()); struct.validate();
public void setFieldValue(_Fields field, Object value) { switch (field) { case MIN_STAMP: if (value == null) { unsetMinStamp(); } else { setMinStamp((Long)value); } break; case MAX_STAMP: if (value == null) { unsetMaxStamp(); } else { setMaxStamp((Long)value); } break; } }
case 6: // TIME_RANGE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.timeRange = new TTimeRange(); struct.timeRange.read(iprot); struct.setTimeRangeIsSet(true); } else { _val115 = new TTimeRange(); _val115.read(iprot); struct.colFamTimeRangeMap.put(_key114, _val115);
public static Scan scanFromThrift(TScan in) throws IOException { Scan out = new Scan(); if (in.isSetStartRow()) out.setStartRow(in.getStartRow()); if (in.isSetStopRow()) out.setStopRow(in.getStopRow()); if (in.isSetCaching()) out.setCaching(in.getCaching()); if (in.isSetMaxVersions()) { out.setMaxVersions(in.getMaxVersions()); } if (in.isSetColumns()) { for (TColumn column : in.getColumns()) { if (column.isSetQualifier()) { out.addColumn(column.getFamily(), column.getQualifier()); } else { out.addFamily(column.getFamily()); } } } TTimeRange timeRange = in.getTimeRange(); if (timeRange != null && timeRange.isSetMinStamp() && timeRange.isSetMaxStamp()) { out.setTimeRange(timeRange.getMinStamp(), timeRange.getMaxStamp()); } return out; }
@Override public int compareTo(TTimeRange other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(isSetMinStamp()).compareTo(other.isSetMinStamp()); if (lastComparison != 0) { return lastComparison; } if (isSetMinStamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minStamp, other.minStamp); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.valueOf(isSetMaxStamp()).compareTo(other.isSetMaxStamp()); if (lastComparison != 0) { return lastComparison; } if (isSetMaxStamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxStamp, other.maxStamp); if (lastComparison != 0) { return lastComparison; } } return 0; }
public TTimeRange( long minStamp, long maxStamp) { this(); this.minStamp = minStamp; setMinStampIsSet(true); this.maxStamp = maxStamp; setMaxStampIsSet(true); }
out.setRow(in.getRow()); TTimeRange tTimeRange = new TTimeRange(); tTimeRange.setMaxStamp(in.getTimeRange().getMax()).setMinStamp(in.getTimeRange().getMin()); out.setTimeRange(tTimeRange); out.setMaxVersions(in.getMaxVersions());
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }