-
Notifications
You must be signed in to change notification settings - Fork 6
/
BeforeFindEvent.java
38 lines (33 loc) · 1.29 KB
/
BeforeFindEvent.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - info@scireum.de
*/
package sirius.biz.importer;
import sirius.db.mixing.Entity;
import sirius.kernel.commons.Context;
/**
* Triggered within {@link sirius.biz.importer.ImportHandler#tryFind(Context)} before the entity is actually being
* looked up.
*
* @param <E> the type of entity being looked up
*/
public class BeforeFindEvent<E extends Entity> extends ContextScriptableEvent<E> {
/**
* Creates a new event for the given entity type, context and import context.
*
* @param entityType the type of entities being looked up
* @param context the context to read data from. Note that this can and should be modified by the handler,
* as this is the whole purpose of this event anyway.
* @param importerContext the import context which can be used to access other handlers / the importer itself
*/
public BeforeFindEvent(Class<E> entityType, Context context, ImporterContext importerContext) {
super(entityType, context, importerContext);
}
@Override
public String toString() {
return "BeforeFindEvent: " + getType().getName() + " with context: " + getContext();
}
}