Wiki » History » Version 3
Soh Keong, 06/11/2021 04:20 PM
1 | 1 | Soh Keong | {{toc}} |
---|---|---|---|
2 | |||
3 | h1. Specification |
||
4 | |||
5 | h1. Activity Diagram |
||
6 | !FlowChart.jpg! |
||
7 | 2 | Soh Keong | |
8 | h1. Programming Guide |
||
9 | |||
10 | h2. Jar version |
||
11 | |||
12 | |_. version |_. Description | |
||
13 | | 1.0 | Init | |
||
14 | |||
15 | h2. Jar File Download |
||
16 | |||
17 | "Jar": |
||
18 | |||
19 | h2. Database Table |
||
20 | |||
21 | <pre> |
||
22 | CREATE TABLE KEYWORD_PRODUCT ( |
||
23 | KEYWORD_REF_NO INTEGER NOT NULL, |
||
24 | KEYWORD VARCHAR(50) NOT NULL, |
||
25 | STATUS VARCHAR(2) DEFAULT 'A', |
||
26 | CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
||
27 | MODIFY_DATETIME TIMESTAMP, |
||
28 | PRIMARY KEY (KEYWORD_REF_NO)) |
||
29 | |||
30 | CREATE UNIQUE INDEX UI_PROD_KEYWORD ON KEYWORD_PRODUCT(KEYWORD) |
||
31 | </pre> |
||
32 | |||
33 | <pre> |
||
34 | CREATE TABLE KEYWORD_PRODUCT_PATTERN ( |
||
35 | PRODUCT_REF_NO INTEGER NOT NULL, |
||
36 | KEYWORD_REF_NO INTEGER NOT NULL, |
||
37 | PRIORITY INTEGER, |
||
38 | STATUS VARCHAR(2) DEFAULT 'A', |
||
39 | CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
||
40 | MODIFY_DATETIME TIMESTAMP, |
||
41 | PRIMARY KEY (PRODUCT_REF_NO,KEYWORD_REF_NO)) |
||
42 | |||
43 | CREATE INDEX IX_KEYWORD_PRODUCT_PATTERN_PRIO ON KEYWORD_PRODUCT_PATTERN(PRIORITY) |
||
44 | CREATE INDEX IX_KEYWORD_PRODUCT_PATTERN_STATUS ON KEYWORD_PRODUCT_PATTERN(STATUS) |
||
45 | </pre> |
||
46 | |||
47 | <pre> |
||
48 | CREATE TABLE KEYWORD_SEARCH_PRODUCT ( |
||
49 | PRODUCT_REF_NO INTEGER NOT NULL, |
||
50 | SHOPPER_REF_NO INTEGER NOT NULL, |
||
51 | SEARCH_TYPE VARCHAR(5) NOT NULL, |
||
52 | CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
||
53 | MODIFY_DATETIME TIMESTAMP, |
||
54 | PRIMARY KEY (PRODUCT_REF_NO,SHOPPER_REF_NO,SEARCH_TYPE)) |
||
55 | |||
56 | CREATE INDEX IX_KEYWORD_SEARCH_PRODUCT_MODI ON KEYWORD_SEARCH_PRODUCT(MODIFY_DATETIME) |
||
57 | </pre> |
||
58 | |||
59 | <pre> |
||
60 | CREATE TABLE KEYWORD_SEARCH_PATTERN ( |
||
61 | SHOPPER_REF_NO INTEGER NOT NULL, |
||
62 | KEYWORD_REF_NO INTEGER NOT NULL, |
||
63 | PRIORITY INTEGER NOT NULL, |
||
64 | CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
||
65 | MODIFY_DATETIME TIMESTAMP, |
||
66 | PRIMARY KEY (SHOPPER_REF_NO, KEYWORD_REF_NO, PRIORITY)) |
||
67 | |||
68 | CREATE INDEX IX_KEYWORD_SEARCH_PATTERN_MODIFY ON KEYWORD_SEARCH_PATTERN(MODIFY_DATETIME) |
||
69 | </pre> |
||
70 | |||
71 | 3 | Soh Keong | h1. Methods |
72 | |||
73 | h2. Maintenance |
||
74 | |||
75 | <pre> |
||
76 | com.cosway.keyword.service.KeywordService service = new com.cosway.keyword.service.KeywordService(); |
||
77 | </pre> |
||
78 | |||
79 | h3. Keyword |
||
80 | |||
81 | <pre> |
||
82 | boolean added = addKeyword(Connection conn, String keyword) |
||
83 | boolean updated = updateKeywordStatus(Connection conn, int keywordRefNo, String status) |
||
84 | Map<Integer, String> KeywordMap = getKeywordAInActiveMap(Connection conn) |
||
85 | Map<Integer, String> KeywordMap = getKeywordAllMap(Connection conn) |
||
86 | Map<Integer, String> KeywordMap = getKeywordPrefixMap(Connection conn, String search) |
||
87 | Map<Integer, String> KeywordMap = getKeywordwildcardMap(Connection conn, String search) |
||
88 | </pre> |