01: /*
02: * Created on Oct 6, 2004
03: */
04: package net.sourceforge.orbroker;
05:
06: import java.util.logging.Level;
07:
08: /**
09: * @author Nils Kilden-Pedersen
10: */
11: abstract class DynamicStatement extends Statement {
12:
13: /**
14: * Constructor.
15: * @param id
16: * @param resultObjectDef
17: */
18: DynamicStatement(String id, ResultObjectDefinition resultObjectDef) {
19: super (id, resultObjectDef);
20: }
21:
22: protected BrokerException buildFailedParsingException(Exception e) {
23: String msg = "Parsing of dynamic statement '" + getId()
24: + "' failed.";
25: return new BrokerException(msg, e);
26: }
27:
28: protected void logBrokerStatement(StringBuffer buffer,
29: Statement.Type type) {
30: if (Broker.isLoggable(Level.FINE)) {
31: StringBuffer message = new StringBuffer().append("Parsed ")
32: .append(type.toString());
33: message.append(" template statement '")
34: .append(this .getId()).append("' as:\n");
35: message.append(buffer);
36: Broker.log(Level.FINE, message.toString());
37: }
38: }
39:
40: }
|