01: /*
02: * Created on Mar 4, 2004
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.xssl.bpm.compare;
08:
09: import java.util.HashMap;
10:
11: /**
12: * @author AYegorov
13: *
14: * To change the template for this generated type comment go to
15: * Window>Preferences>Java>Code Generation>Code and Comments
16: */
17: public class NullValueReplacement extends AbstractComparison {
18: private Object returnRep = null;
19:
20: /**
21: * @param id
22: */
23: public NullValueReplacement(String id) {
24: super (id);
25: // XXX Auto-generated constructor stub
26: }
27:
28: /**
29: * @param id
30: * @param properties
31: */
32: public NullValueReplacement(String id, HashMap properties) {
33: super (id, properties);
34: // XXX Auto-generated constructor stub
35: }
36:
37: /* (non-Javadoc)
38: * @see org.xdev.base.xssl.bpm.compare.AbstractComparison#compare(java.lang.Object, java.lang.Object)
39: */
40: protected boolean compare(Object source, Object target) {
41: if (source == null || "".equals(source)) {
42: source = target;
43: }
44:
45: this .returnRep = source;
46:
47: return true;
48: }
49:
50: public Object getObjectValue() {
51: return this.returnRep;
52: }
53: }
|