public Order deepCopy() { return new Order(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Order) return this.equals((Order)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case COL: if (value == null) { unsetCol(); } else { setCol((String)value); } break; case ORDER: if (value == null) { unsetOrder(); } else { setOrder((Integer)value); } break; } }
/** 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 COL: return isSetCol(); case ORDER: return isSetOrder(); } throw new IllegalStateException(); }
public static List<String> getColumnNamesFromSortCols(List<Order> sortCols) { List<String> names = new ArrayList<String>(); for (Order o : sortCols) { names.add(o.getCol()); } return names; }
@Override public void apply(StorageDescriptor t, Object[] fields) { if (finalCounter > 1 && fields[2] == null) { return; } Order order = new Order(); if (finalCounter > 0) { order.setCol((String) fields[1]); } if (finalCounter > 1) { order.setOrder(extractSqlInt(fields[2])); } t.addToSortCols(order); }}); }
/** * Performs a deep copy on <i>other</i>. */ public Order(Order other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetCol()) { this.col = other.col; } this.order = other.order; }
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); } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case COL: if (value == null) { unsetCol(); } else { setCol((String)value); } break; case ORDER: if (value == null) { unsetOrder(); } else { setOrder((Integer)value); } break; } }
public static List<String> getColumnNamesFromSortCols(List<Order> sortCols) { List<String> names = new ArrayList<String>(); for (Order o : sortCols) { names.add(o.getCol()); } return names; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetCol()) { optionals.set(0); } if (struct.isSetOrder()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCol()) { oprot.writeString(struct.col); } if (struct.isSetOrder()) { oprot.writeI32(struct.order); } }
public boolean equals(Order that) { if (that == null) return false; boolean this_present_col = true && this.isSetCol(); boolean that_present_col = true && that.isSetCol(); if (this_present_col || that_present_col) { if (!(this_present_col && that_present_col)) return false; if (!this.col.equals(that.col)) return false; } boolean this_present_order = true; boolean that_present_order = true; if (this_present_order || that_present_order) { if (!(this_present_order && that_present_order)) return false; if (this.order != that.order) return false; } return true; }
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); } }
public T addSortCol(String col, int order) { if (sortCols == null) sortCols = new ArrayList<>(); sortCols.add(new Order(col, order)); return child; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case COL: if (value == null) { unsetCol(); } else { setCol((String)value); } break; case ORDER: if (value == null) { unsetOrder(); } else { setOrder((Integer)value); } break; } }