-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * 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
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
+/*\r
+ * [[ Authors will Fill in the Copyright header ]]\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Authors : Brent Salisbury, Evan Zeller\r
+ */\r
package org.opendaylight.ovsdb.lib.database;\r
\r
import com.fasterxml.jackson.annotation.JsonProperty;\r
+import org.opendaylight.ovsdb.lib.notation.Condition;\r
+import org.opendaylight.ovsdb.lib.notation.Function;\r
\r
public class ColumnSchema {\r
+\r
+ String name;\r
+\r
@JsonProperty("type")\r
private OvsdbType type;\r
+\r
@JsonProperty("ephemeral")\r
private Boolean ephemeral;\r
+\r
@JsonProperty("mutable")\r
private Boolean mutable;\r
+\r
public OvsdbType getType() {\r
return type;\r
}\r
+\r
public Boolean getEphemeral() {\r
return ephemeral;\r
}\r
+\r
public Boolean getMutable() {\r
return mutable;\r
}\r
+\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ public void setName(String name) {\r
+ this.name = name;\r
+ }\r
+\r
+ public Condition opEqual(String some) {\r
+ return new Condition(this.getName(), Function.EQUALS, some);\r
+ }\r
+\r
+ public Condition opGreaterThan(Object val) {\r
+ return new Condition(this.getName(), Function.GREATER_THAN, val);\r
+ }\r
+\r
+ public Condition opLesserThan(int val) {\r
+ return new Condition(this.getName(), Function.GREATER_THAN, val);\r
+ }\r
+\r
+ public Condition opLesserThanOrEquals(Object val) {\r
+ return new Condition(this.getName(), Function.LESS_THAN_OR_EQUALS, val);\r
+ }\r
+\r
@Override\r
public String toString() {\r
- return "ColumnSchema [type=" + type + ", ephemeral=" + ephemeral\r
+ return "ColumnType [type=" + type + ", ephemeral=" + ephemeral\r
+ ", mutable=" + mutable + "]";\r
}\r
+\r
}\r