Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
This is a jpa2 implementation of the Implementations of the org.owasp.appsensor.core.listener.EventListener interface can register with this class and be notified when new org.owasp.appsensor.core.Events are added to the data store The implementation stores the org.owasp.appsensor.core.Event in a jpa2 driven DB.

John Melton (
public class Jpa2EventStore extends EventStore {
	private Logger logger;

maintain a repository to read/write org.owasp.appsensor.core.Events from
	public void addEvent(Event event) {
		.warn("Security event " + event.getDetectionPoint().getLabel() + " triggered by user: " + event.getUser().getUsername());

	public Collection<EventfindEvents(SearchCriteria criteria) {
		// TODO: instead of findAll every time (inefficient), update this to do actual query
		return findEvents(criteria.findAll());
New to GrepCode? Check out our FAQ X