m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/model
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-15 01:24:27 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-15 01:24:27 +0100
commitb5fa21f2b22a97fb5e43bfd02b77827c158d02f7 (patch)
treece2079b2a93a527a793cfa7b305effd810a6763a /src/main/java/pl/edu/mimuw/cloudatlas/model
parent1986aaadaf6dd4316dce0186616a515e6721628c (diff)
Fix value query serialization
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/model')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/model/ValueQuery.java44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueQuery.java b/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueQuery.java
index 95f826a..e577c13 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueQuery.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueQuery.java
@@ -28,27 +28,27 @@ public class ValueQuery extends Value {
*
* @param query the code of the query
*/
- public ValueQuery(String query) throws Exception {
- this.code = query;
- if (!query.isEmpty()) {
- Yylex lex = new Yylex(new ByteArrayInputStream(query.getBytes()));
- this.query = (new parser(lex)).pProgram();
- }
- this.signature = null;
- this.timestamp = System.currentTimeMillis();
- this.installed = true;
- }
-
- public ValueQuery(String query, byte[] querySignature) throws Exception {
- this.code = query;
- if (!query.isEmpty()) {
- Yylex lex = new Yylex(new ByteArrayInputStream(query.getBytes()));
- this.query = (new parser(lex)).pProgram();
- }
- this.signature = querySignature;
- this.timestamp = System.currentTimeMillis();
- this.installed = true;
- }
+// public ValueQuery(String query) throws Exception {
+// this.code = query;
+// if (!query.isEmpty()) {
+// Yylex lex = new Yylex(new ByteArrayInputStream(query.getBytes()));
+// this.query = (new parser(lex)).pProgram();
+// }
+// this.signature = null;
+// this.timestamp = System.currentTimeMillis();
+// this.installed = true;
+// }
+
+// public ValueQuery(String query, byte[] querySignature) throws Exception {
+// this.code = query;
+// if (!query.isEmpty()) {
+// Yylex lex = new Yylex(new ByteArrayInputStream(query.getBytes()));
+// this.query = (new parser(lex)).pProgram();
+// }
+// this.signature = querySignature;
+// this.timestamp = System.currentTimeMillis();
+// this.installed = true;
+// }
public ValueQuery(QueryData queryData) throws Exception {
this.code = queryData.getCode();
@@ -57,7 +57,7 @@ public class ValueQuery extends Value {
this.query = (new parser(lex)).pProgram();
}
this.signature = queryData.getSignature();
- this.timestamp = System.currentTimeMillis();
+ this.timestamp = queryData.getTimestamp();
this.installed = queryData.isInstalled();
}