package net.ttddyy.dsproxy.test;

import net.ttddyy.dsproxy.proxy.ParameterKey;

/**
 * @author Tadaya Tsuyukubo
 */
public class ParameterKeyValue implements Comparable<ParameterKeyValue> {

    public enum OperationType {
        SET_PARAM, SET_NULL, REGISTER_OUT
    }

    private ParameterKey key;
    private Object value;
    private OperationType type;

    public ParameterKeyValue(int indexKey, Object value, OperationType type) {
        this(new ParameterKey(indexKey), value, type);
    }

    public ParameterKeyValue(String nameKey, Object value, OperationType type) {
        this(new ParameterKey(nameKey), value, type);
    }

    public ParameterKeyValue(ParameterKey key, Object value, OperationType type) {
        this.key = key;
        this.value = value;
        this.type = type;
    }

    public boolean isSetParam() {
        return this.type == OperationType.SET_PARAM;
    }

    public boolean isSetNull() {
        return this.type == OperationType.SET_NULL;
    }

    public boolean isRegisterOut() {
        return this.type == OperationType.REGISTER_OUT;
    }

    public ParameterKey getKey() {
        return key;
    }

    public void setKey(ParameterKey key) {
        this.key = key;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public OperationType getType() {
        return type;
    }

    public void setType(OperationType type) {
        this.type = type;
    }

    @Override
    public int compareTo(ParameterKeyValue o) {
        int byKey = this.key.compareTo(o.key);  //use key for ordering
        if (byKey != 0) {
            return byKey;
        }
        return this.value == o.value ? 0 : 1;
    }

}

@@ -318,24 +318,57 @@
 ject value;%0A
+    private String displayValue;%0A
     private 
@@ -388,16 +388,32 @@
  type;%0A%0A
+    @Deprecated%0A
     publ
@@ -537,32 +537,48 @@
 , type);%0A    %7D%0A%0A
+    @Deprecated%0A
     public Param
@@ -695,32 +695,48 @@
 , type);%0A    %7D%0A%0A
+    @Deprecated%0A
     public Param
@@ -850,24 +850,677 @@
 ue = value;%0A
+        this.displayValue = value == null ? null : value.toString();%0A        this.type = type;%0A    %7D%0A%0A    public ParameterKeyValue(int indexKey, Object value, String displayValue, OperationType type) %7B%0A        this(new ParameterKey(indexKey), value, displayValue, type);%0A    %7D%0A%0A    public ParameterKeyValue(String nameKey, Object value, String displayValue, OperationType type) %7B%0A        this(new ParameterKey(nameKey), value, displayValue, type);%0A    %7D%0A%0A    public ParameterKeyValue(ParameterKey key, Object value, String displayValue, OperationType type) %7B%0A        this.key = key;%0A        this.value = value;%0A        this.displayValue = displayValue;%0A
         this
@@ -2090,32 +2090,210 @@
 = value;%0A    %7D%0A%0A
+    public String getDisplayValue() %7B%0A        return displayValue;%0A    %7D%0A%0A    public void setDisplayValue(String displayValue) %7B%0A        this.displayValue = displayValue;%0A    %7D%0A%0A
     public Opera

Add ParameterKeyValue#getDisplayValue()