forked from actframework/actframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDbPlugin.java
More file actions
37 lines (29 loc) · 802 Bytes
/
DbPlugin.java
File metadata and controls
37 lines (29 loc) · 802 Bytes
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
package act.db;
import act.Act;
import act.ActComponent;
import act.app.App;
import act.plugin.Plugin;
import act.util.DestroyableBase;
import java.util.Map;
/**
* The base class for Database Plugin
*/
@ActComponent
public abstract class DbPlugin extends DestroyableBase implements Plugin {
@Override
public void register() {
Act.dbManager().register(this);
Act.trigger(new DbPluginRegistered(this));
}
@Override
public int hashCode() {
return getClass().hashCode();
}
@Override
public boolean equals(Object obj) {
return obj == this || null != obj && getClass() == obj.getClass();
}
public abstract DbService initDbService(String id, App app, Map<String, Object> conf);
public void afterDbServiceLoaded() {
}
}