Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.drools.impl.adapters;
  
 import  org.kie.api.event.process.ProcessCompletedEvent;
 import  org.kie.api.event.process.ProcessNodeLeftEvent;
 import  org.kie.api.event.process.ProcessNodeTriggeredEvent;
 import  org.kie.api.event.process.ProcessStartedEvent;
 import  org.kie.api.event.process.ProcessVariableChangedEvent;
 import  org.kie.api.event.rule.ObjectDeletedEvent;
 import  org.kie.api.event.rule.ObjectInsertedEvent;
 import  org.kie.api.event.rule.ObjectUpdatedEvent;
 
 public class ProcessEventListenerAdapter implements org.kie.api.event.process.ProcessEventListener {
 
     private final ProcessEventListener delegate;
 
     public ProcessEventListenerAdapter(ProcessEventListener delegate) {
         this. = delegate;
     }
 
 	public void beforeProcessStarted(final ProcessStartedEvent event) {
 				return new ProcessInstanceAdapter(event.getProcessInstance());
 			}
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
 	}
 
 	public void afterProcessStarted(final ProcessStartedEvent event) {
 				return new ProcessInstanceAdapter(event.getProcessInstance());
 			}
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
 	}
 
 	public void beforeProcessCompleted(final ProcessCompletedEvent event) {
 				return new ProcessInstanceAdapter(event.getProcessInstance());
 			}
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
 	}
 
 	public void afterProcessCompleted(final ProcessCompletedEvent event) {
 				return new ProcessInstanceAdapter(event.getProcessInstance());
 			}
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
 	}
 
 	public void beforeNodeTriggered(final ProcessNodeTriggeredEvent event) {
 				return new ProcessInstanceAdapter(event.getProcessInstance());
 			}
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
 				return new NodeInstanceAdapter(event.getNodeInstance());
 			}
         });
 	}
 
 	public void afterNodeTriggered(final ProcessNodeTriggeredEvent event) {
 				return new ProcessInstanceAdapter(event.getProcessInstance());
 			}
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
 				return new NodeInstanceAdapter(event.getNodeInstance());
 			}
         });
 	}
 
	public void beforeNodeLeft(final ProcessNodeLeftEvent event) {
				return new ProcessInstanceAdapter(event.getProcessInstance());
			}
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
				return new NodeInstanceAdapter(event.getNodeInstance());
			}
        });
	}
	public void afterNodeLeft(final ProcessNodeLeftEvent event) {
				return new ProcessInstanceAdapter(event.getProcessInstance());
			}
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
				return new NodeInstanceAdapter(event.getNodeInstance());
			}
        });
    }
	public void beforeVariableChanged(final ProcessVariableChangedEvent event) {
				return new ProcessInstanceAdapter(event.getProcessInstance());
			}
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
			public String getVariableId() {
				return event.getVariableId();
			}
				return event.getVariableInstanceId();
			}
			public Object getOldValue() {
				return event.getOldValue();
			}
			public Object getNewValue() {
				return event.getNewValue();
			}
        });
	}
	public void afterVariableChanged(final ProcessVariableChangedEvent event) {
				return new ProcessInstanceAdapter(event.getProcessInstance());
			}
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
			public String getVariableId() {
				return event.getVariableId();
			}
				return event.getVariableInstanceId();
			}
			public Object getOldValue() {
				return event.getOldValue();
			}
			public Object getNewValue() {
				return event.getNewValue();
			}
        });
	}
    @Override
    public int hashCode() {
        return .hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        return obj instanceof ProcessEventListenerAdapter && .equals(((ProcessEventListenerAdapter)obj).);
    }
New to GrepCode? Check out our FAQ X