public DecimalType deepCopy() { return new DecimalType(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof DecimalType) return this.equals((DecimalType)that); return false; }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SCALE: return getScale(); case PRECISION: return getPrecision(); } throw new java.lang.IllegalStateException(); }
public DecimalType( int scale, int precision) { this(); this.scale = scale; setScaleIsSet(true); this.precision = precision; setPrecisionIsSet(true); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SCALE: if (value == null) { unsetScale(); } else { setScale((Integer)value); } break; case PRECISION: if (value == null) { unsetPrecision(); } else { setPrecision((Integer)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.scale = iprot.readI32(); struct.setScaleIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.precision = iprot.readI32(); struct.setPrecisionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetScale()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'scale' was not found in serialized data! Struct: " + toString()); if (!struct.isSetPrecision()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'precision' was not found in serialized data! Struct: " + toString()); struct.validate();
case DECIMAL: DecimalType DECIMAL; DECIMAL = new DecimalType(); DECIMAL.read(iprot); return DECIMAL; case DATE:
/** 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 SCALE: return isSetScale(); case PRECISION: return isSetPrecision(); } throw new java.lang.IllegalStateException(); }
public DecimalType setPrecision(int precision) { this.precision = precision; setPrecisionIsSet(true); return this; }
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); } }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.scale = iprot.readI32(); struct.setScaleIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.precision = iprot.readI32(); struct.setPrecisionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetScale()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'scale' was not found in serialized data! Struct: " + toString()); if (!struct.isSetPrecision()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'precision' was not found in serialized data! Struct: " + toString()); struct.validate();
public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case SCALE: if (value == null) { unsetScale(); } else { setScale((java.lang.Integer)value); } break; case PRECISION: if (value == null) { unsetPrecision(); } else { setPrecision((java.lang.Integer)value); } break; } }
case DECIMAL: DecimalType DECIMAL; DECIMAL = new DecimalType(); DECIMAL.read(iprot); return DECIMAL; case DATE:
@Override public void clear() { setScaleIsSet(false); this.scale = 0; setPrecisionIsSet(false); this.precision = 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 IllegalArgumentException(); } switch (field) { case SCALE: return isSetScale(); case PRECISION: return isSetPrecision(); } throw new IllegalStateException(); }
public DecimalType setPrecision(int precision) { this.precision = precision; setPrecisionIsSet(true); return this; }
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); } }
if (field.type == DECIMAL_FIELD_DESC.type) { DecimalType DECIMAL; DECIMAL = new DecimalType(); DECIMAL.read(iprot); return DECIMAL; } else {
public DecimalType( int scale, int precision) { this(); this.scale = scale; setScaleIsSet(true); this.precision = precision; setPrecisionIsSet(true); }
@Override public int compareTo(DecimalType other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetScale()).compareTo(other.isSetScale()); if (lastComparison != 0) { return lastComparison; } if (isSetScale()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scale, other.scale); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrecision()).compareTo(other.isSetPrecision()); if (lastComparison != 0) { return lastComparison; } if (isSetPrecision()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.precision, other.precision); if (lastComparison != 0) { return lastComparison; } } return 0; }