Add local variable information to DB store.
[cfb.git] / prod / net / jaekl / cfb / db / Condition.java
index b221551f15089c912c59a37ee9b200d9988a6ed7..98bd5f26f165c24b29f3c317a2c772c56aaea87e 100644 (file)
@@ -11,12 +11,22 @@ public class Condition {
                m_column = column;
                m_value = value;
                m_operation = operation;
+               
+               if ((null == m_value) && (Operation.EQUAL == m_operation)) {
+                       m_operation = Operation.NULL;
+               }
        }
        
        public Condition(Column column, Object value) {
                this(column, value, Operation.EQUAL);
        }
        
+       public Condition(Column column, Operation operation) {
+               this(column, null, operation);
+               
+               assert(Operation.NULL == operation || Operation.NOT_NULL == operation);
+       }
+       
        public Column getColumn() { return m_column; }
        public Object getValue() { return m_value; }
        public Operation getOperation() { return m_operation; }