01: /*
02: * Created on Jul 14, 2003
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.manage;
08:
09: import java.util.ArrayList;
10: import java.util.HashMap;
11:
12: import org.xdev.base.core.AbstractPersistance;
13: import org.xdev.base.xssl.*;
14:
15: /**
16: * @author AYegorov
17: *
18: * To change the template for this generated type comment go to
19: * Window>Preferences>Java>Code Generation>Code and Comments
20: */
21: public class TransactionVariable extends XSSLReturn {
22: Object staticValue = null;
23:
24: private boolean hasBeenChanged = false;
25:
26: /**
27: * @param id
28: */
29: public TransactionVariable(String id) {
30: super (id);
31: // TODO Auto-generated constructor stub
32: }
33:
34: /**
35: * @param id
36: * @param properties
37: */
38: public TransactionVariable(String id, HashMap properties) {
39: super (id, properties);
40: // TODO Auto-generated constructor stub
41: }
42:
43: /* (non-Javadoc)
44: * @see org.xdev.base.templates.TemplateAbstractElement#set()
45: */
46: protected void set() throws Exception {
47:
48: if (this .hasProperty("value")) {
49:
50: this .staticValue = this .getProperty("value");
51: } else {
52: XSSLReturn ret = (XSSLReturn) this .getElement(0);
53:
54: if (ret.execute(this )) {
55: this .staticValue = ret.getObjectValue();
56: }
57: }
58:
59: String name = this .getReferenceId();
60:
61: this .setReference(name, this .staticValue);
62:
63: this .getPersistanceTarget().getPersistance(
64: this .getBooleanProperty("static")).addConstant(name);
65:
66: }
67:
68: /* (non-Javadoc)
69: * @see org.xdev.base.templates.TemplateAbstractElement#getValue()
70: */
71: public Object getObjectValue() {
72: return this.staticValue;
73: }
74:
75: }
|