Subversion Repositories SmartDukaan

Rev

Rev 5536 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5519 amar.kumar 1
package in.shop2020.alert.persistence;
2
 
3
import java.util.Date;
4
import java.util.List;
5
 
6
import org.apache.ibatis.annotations.Param;
7
 
8
import in.shop2020.alert.EntityProcessedState;
9
import in.shop2020.alert.EntityType;
10
import in.shop2020.alert.domain.AlertMapper;
11
import in.shop2020.alert.domain.AlertedEntity;
12
import in.shop2020.alert.domain.MonitoredEntity;
13
import in.shop2020.alert.domain.SearchFilter;
14
 
15
public interface EntityMapper {
16
 
17
	boolean isEntityMonitorable(int entityType);
18
 
19
	void insertEntity(MonitoredEntity monitoredEntity);
20
 
21
	void updateEntity(MonitoredEntity monitoredEntity);
22
 
23
	List<MonitoredEntity> getEntities(SearchFilter searchFilter);
24
 
25
	List<AlertedEntity> getAlertedEntities(SearchFilter searchFilter);
26
 
27
	MonitoredEntity getEntity(@Param("entityType") EntityType entityType,
28
			@Param("entityIdentifier") String entityIdentifier);
29
 
30
	void insertAlertedEntity(@Param("entity") MonitoredEntity entity,
31
			@Param("lastAlertedTime") Date lastAlertedTime);
32
 
33
	void removeMonitoredEntity(@Param("entityType") EntityType entityType, @Param("entityIdentifier") String entityIdentifier);
34
 
35
	List<MonitoredEntity> getEntitiesToBeAlerted();
36
 
37
	void updateEntityProcessedState(@Param("id") long id, @Param("state") EntityProcessedState state);
38
 
39
	in.shop2020.alert.domain.AlertMapper getAlertMapper(@Param("entityType") EntityType entityType, @Param("eventType")int eventType);
40
 
41
	void activateEntityMonitoring(@Param("entityType") EntityType entityType, @Param("userIds") String userIds);
42
 
43
	void deActivateEntityMonitoring(@Param("entityType") EntityType entityType);
44
 
45
	void registerEventType(AlertMapper alertMap);
46
 
47
}