-
Notifications
You must be signed in to change notification settings - Fork 0
/
queries
74 lines (32 loc) · 2.48 KB
/
queries
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
create view fidMatch as select events.EVENT_ID,features.PRIORITY from events INNER JOIN features ON features.FEATURE_ID =events.FEATURE_ID;
create view eidMatch as select events.EVENT_ID,feeds.FEED_ID from events INNER JOIN feeds ON events.EVENT_ID =feeds.EVENT_ID;
create view sortfeeds as select eidMatch.FEED_ID from eidMatch INNER JOIN fidMatch ON eidMatch.EVENT_ID=fidMatch.EVENT_ID order by fidMatch.PRIORITY ASC;
zac-si-184@zac-si-184:~/Documents/apache-tomcat-8.5.41/webapps/new_notify/src/raj$ sudo javac -cp .:/home/zac-si-184/Documents/apache-tomcat-8.5.41/webapps/new_notify/WEB-INF/lib/* -d /home/zac-si-184/Documents/apache-tomcat-8.5.41/webapps/new_notify/WEB-INF/classes/ *.java
private static UpdateTime instance;
private UpdateTime(){
//Private Constructor
}
public synchronized static UpdateTime getInstance()
{
if (instance==null)
{
instance = new UpdateTime();
System.out.println("UpdateTime Class Object creatred...!!!");
}
else{
System.out.println("UpdateTime Class Object not Creatred just returned Created one...!!!");
}
return instance;
}
background="/new_notify/sample.jpeg"
feature:
create table feature(FEATURE_ID bigint primary key auto_increment,FEATURE_NAME varchar(45) unique ,DURATION bigint);
events:
create table events(EID int primary key auto_increment,EVENT varchar(45),FID int,MID int, FOREIGN kEY(FID) REFERENCES feature(FID), FOREIGN kEY(MID) REFERENCES notification_mode(MID));
notification_mode:
create table notification_mode(MID int primary key auto_increment,MODE varchar(34));
<%@ page import="java.sql.*; "%>
create table events(EVENT_ID bigint primary key auto_increment,EVENT varchar(45),FEATURE_ID bigint,MODE_ID bigint,STATUS boolean DEFAULT 1,MAIL varchar(34), FOREIGN kEY(FEATURE_ID) REFERENCES feature(FEATURE_ID), FOREIGN kEY(MODE_ID) REFERENCES notification_mode(MODE_ID))
create table events(EVENT_ID bigint primary key auto_increment,EVENT varchar(45),FEATURE_ID bigint,MODE_ID bigint,STATUS boolean DEFAULT 1,MAIL varchar(34), FOREIGN kEY(FEATURE_ID) REFERENCES feature(FEATURE_ID), FOREIGN kEY(MODE_ID) REFERENCES notification_mode(MODE_ID));
create table notification_mode(MODE_ID bigint primary key auto_increment,MODE varchar(34) unique);
select events.MAIL from events INNER JOIN notification_mode ON events.MODE_ID=notification_mode.MODE_ID AND notification_mode.MODE='mail' ;