1 package org.opendaylight.controller.md.sal.dom.xsql.jdbc;
3 import java.io.Serializable;
6 public class JDBCCommand implements Serializable {
8 public static final int TYPE_EXECUTE_QUERY = 1;
9 public static final int TYPE_QUERY_REPLY = 2;
10 public static final int TYPE_QUERY_RECORD = 3;
11 public static final int TYPE_QUERY_FINISH = 4;
12 public static final int TYPE_QUERY_ERROR = 5;
14 private JDBCResultSet rs = null;
15 private Map record = null;
16 private int rsID = -1;
17 private Exception err = null;
19 public JDBCCommand(Exception _err, int _RSID) {
20 this.type = TYPE_QUERY_ERROR;
25 public JDBCCommand(JDBCResultSet _rs, int _type) {
26 this.type = TYPE_EXECUTE_QUERY;
29 this.rsID = rs.getID();
32 public JDBCCommand(Map _record, int _rsID) {
33 this.record = _record;
35 this.type = TYPE_QUERY_RECORD;
38 public JDBCCommand(int _rsID) {
40 this.type = TYPE_QUERY_FINISH;
43 public int getType() {
47 public JDBCResultSet getRS() {
51 public Map getRecord() {
55 public int getRSID() {
59 public Exception getERROR() {