Fix resource leaks in test cases
[controller.git] / opendaylight / md-sal / sal-dom-xsql / src / main / java / org / opendaylight / controller / md / sal / dom / xsql / XSQLColumn.java
index 55ac600f4a3010ccd0b8e63e240fb00b23d31351..9deae60d65145a77e49046837d1ac5032882c552 100644 (file)
@@ -1,13 +1,25 @@
+/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 package org.opendaylight.controller.md.sal.dom.xsql;
 
 import java.io.Serializable;
 
-public class XSQLColumn implements Serializable, Comparable {
+public class XSQLColumn implements Serializable, Comparable<Object> {
+    private static final long serialVersionUID = 4854919735031714751L;
+
     private String name = null;
     private String tableName = null;
     private int charWidth = -1;
-    private Class type = null;
+    private Class<?> type = null;
     private transient Object bluePrintNode = null;
+    private String origName = null;
+    private String origTableName = null;
 
     public XSQLColumn(Object odlNode, String _tableName, Object _bluePrintNode) {
         this.name = XSQLODLUtils.getNodeNameFromDSN(odlNode);
@@ -16,6 +28,13 @@ public class XSQLColumn implements Serializable, Comparable {
         this.type = XSQLODLUtils.getTypeForODLColumn(odlNode);
     }
 
+    public XSQLColumn(String _name, String _tableName,String _origName, String _origTableName){
+        this.name = _name;
+        this.tableName = _tableName;
+        this.origName = _origName;
+        this.origTableName = _origTableName;
+    }
+
     public String getName() {
         return name;
     }