public Tuple(XmlElement elTuple) { XmlNodeList l = elTuple.GetElementsByTagName("field"); fields = new Field[l.Count]; for (int i = 0; i < l.Count; i++) { XmlElement elField = (XmlElement) l[i]; fields[i] = new Field(elField); } if (elTuple.HasAttribute("id")) { tupleID = new TupleID(elTuple.GetAttribute("id")); } if (elTuple.HasAttribute("creationTimestamp")) { creationTimestamp = long.Parse(elTuple.GetAttribute("creationTimestamp")); } if (elTuple.HasAttribute("lastModificationTimestamp")) { lastModificationTimestamp = long.Parse(elTuple.GetAttribute("lastModificationTimestamp")); } if (elTuple.HasAttribute("expiration")) { expiration = long.Parse(elTuple.GetAttribute("expiration")); } }
public Tuple TakeTupleById(TupleID id) { Tuple t = new Tuple(new Field[] {}); t.TupleID = id; return Take(t); }
public bool Update(TupleID tupleId, Tuple tuple) { TSResponse resp = SendReceive(new UpdateCommand(tupleId, tuple)); return resp.Type.Equals(TSResponse.ResponseType.ok); }
public Tuple ReadTupleById(TupleID id) { Tuple t = new Tuple(new Field[] {}); t.TupleID = id; return Read(t); }