public QueryDto(Query query) { path = query.getPath(); type = query.getType(); expressions = query.getExpressions(); }
public Query deepCopy() { return new Query(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Query) return this.equals((Query)that); return false; }
/** * Performs a deep copy on <i>other</i>. */ public Query(Query other) { if (other.isSetPath()) { this.path = other.path; } if (other.isSetType()) { this.type = other.type; } if (other.isSetExpressions()) { List<String> __this__expressions = new ArrayList<String>(other.expressions); this.expressions = __this__expressions; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; case TYPE: if (value == null) { unsetType(); } else { setType((QueryType)value); } break; case EXPRESSIONS: if (value == null) { unsetExpressions(); } else { setExpressions((List<String>)value); } break; } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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); } }
/** * Performs a deep copy on <i>other</i>. */ public Query(Query other) { if (other.isSetPath()) { this.path = other.path; } if (other.isSetType()) { this.type = other.type; } if (other.isSetExpressions()) { List<String> __this__expressions = new ArrayList<String>(other.expressions); this.expressions = __this__expressions; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; case TYPE: if (value == null) { unsetType(); } else { setType((QueryType)value); } break; case EXPRESSIONS: if (value == null) { unsetExpressions(); } else { setExpressions((List<String>)value); } break; } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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 QueryDto(Query query) { path = query.getPath(); type = query.getType(); expressions = query.getExpressions(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, NamedQuery struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.name = iprot.readString(); struct.setNameIsSet(true); struct.enabled = iprot.readBool(); struct.setEnabledIsSet(true); struct.repositoryName = iprot.readString(); struct.setRepositoryNameIsSet(true); struct.query = new Query(); struct.query.read(iprot); struct.setQueryIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.comment = new Comment(); struct.comment.read(iprot); struct.setCommentIsSet(true); } } }
/** 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 PATH: return isSetPath(); case TYPE: return isSetType(); case EXPRESSIONS: return isSetExpressions(); } throw new IllegalStateException(); }
public Query deepCopy() { return new Query(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Query) return this.equals((Query)that); return false; }
public QueryDto(Query query) { path = query.getPath(); type = query.getType(); expressions = query.getExpressions(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, NamedQuery struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.name = iprot.readString(); struct.setNameIsSet(true); struct.enabled = iprot.readBool(); struct.setEnabledIsSet(true); struct.repositoryName = iprot.readString(); struct.setRepositoryNameIsSet(true); struct.query = new Query(); struct.query.read(iprot); struct.setQueryIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.comment = new Comment(); struct.comment.read(iprot); struct.setCommentIsSet(true); } } }
/** 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 PATH: return isSetPath(); case TYPE: return isSetType(); case EXPRESSIONS: return isSetExpressions(); } throw new IllegalStateException(); }
@Override protected Query doForward(com.linecorp.centraldogma.common.Query<?> query) { switch (query.type()) { case IDENTITY: return new Query(query.path(), QueryType.IDENTITY, Collections.emptyList()); case JSON_PATH: return new Query(query.path(), QueryType.JSON_PATH, query.expressions()); } throw new Error(); }