2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ===================================================================
10 * Unless otherwise specified, all software contained herein is licensed
11 * under the Apache License, Version 2.0 (the "License");
12 * you may not use this software except in compliance with the License.
13 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 * Unless otherwise specified, all documentation contained herein is licensed
24 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
25 * you may not use this documentation except in compliance with the License.
26 * You may obtain a copy of the License at
28 * https://creativecommons.org/licenses/by/4.0/
30 * Unless required by applicable law or agreed to in writing, documentation
31 * distributed under the License is distributed on an "AS IS" BASIS,
32 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 * See the License for the specific language governing permissions and
34 * limitations under the License.
36 * ============LICENSE_END============================================
41 package org.onap.portal.domain.db.fn;
43 import java.io.Serializable;
44 import java.math.BigInteger;
45 import javax.persistence.Column;
46 import javax.persistence.Entity;
47 import javax.persistence.Id;
48 import javax.persistence.IdClass;
49 import javax.persistence.Index;
50 import javax.persistence.Table;
51 import javax.validation.constraints.Digits;
52 import javax.validation.constraints.NotNull;
53 import javax.validation.constraints.Size;
54 import lombok.AllArgsConstructor;
55 import lombok.EqualsAndHashCode;
57 import lombok.NoArgsConstructor;
59 import org.hibernate.validator.constraints.SafeHtml;
60 import org.onap.portal.domain.db.fn.FnQzFiredTriggers.FnQzFiredTriggersID;
63 CREATE TABLE `fn_qz_fired_triggers` (
64 `SCHED_NAME` varchar(120) NOT NULL,
65 `ENTRY_ID` varchar(95) NOT NULL,
66 `TRIGGER_NAME` varchar(200) NOT NULL,
67 `TRIGGER_GROUP` varchar(200) NOT NULL,
68 `INSTANCE_NAME` varchar(200) NOT NULL,
69 `FIRED_TIME` bigint(13) NOT NULL,
70 `SCHED_TIME` bigint(13) NOT NULL,
71 `PRIORITY` int(11) NOT NULL,
72 `STATE` varchar(16) NOT NULL,
73 `JOB_NAME` varchar(200) DEFAULT NULL,
74 `JOB_GROUP` varchar(200) DEFAULT NULL,
75 `IS_NONCONCURRENT` varchar(1) DEFAULT NULL,
76 `REQUESTS_RECOVERY` varchar(1) DEFAULT NULL,
77 PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
78 KEY `idx_fn_qz_ft_trig_inst_name` (`SCHED_NAME`,`INSTANCE_NAME`),
79 KEY `idx_fn_qz_ft_inst_job_req_rcvry` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
80 KEY `idx_fn_qz_ft_j_g` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
81 KEY `idx_fn_qz_ft_jg` (`SCHED_NAME`,`JOB_GROUP`),
82 KEY `idx_fn_qz_ft_t_g` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
83 KEY `idx_fn_qz_ft_tg` (`SCHED_NAME`,`TRIGGER_GROUP`)
87 @Table(name = "fn_qz_fired_triggers", indexes = {
88 @Index(name = "idx_fn_qz_ft_trig_inst_name", columnList = "sched_name, instance_name"),
89 @Index(name = "idx_fn_qz_ft_inst_job_req_rcvry", columnList = "sched_name, instance_name, requests_recovery"),
90 @Index(name = "idx_fn_qz_ft_j_g", columnList = "sched_name, job_name, job_group"),
91 @Index(name = "idx_fn_qz_ft_jg", columnList = "sched_name, job_group"),
92 @Index(name = "idx_fn_qz_ft_t_g", columnList = "sched_name, trigger_name, trigger_group"),
93 @Index(name = "idx_fn_qz_ft_tg", columnList = "sched_name, trigger_group")
102 @IdClass(FnQzFiredTriggersID.class)
103 public class FnQzFiredTriggers implements Serializable{
107 @Column(name = "SCHED_NAME", length = 120, nullable = false)
108 private String schedName;
112 @Column(name = "ENTRY_ID", length = 95, nullable = false)
113 private String entryId;
114 @Column(name = "TRIGGER_NAME", length = 200, nullable = false)
118 private String triggerName;
119 @Column(name = "TRIGGER_GROUP", length = 200, nullable = false)
123 private String triggerGroup;
124 @Column(name = "INSTANCE_NAME", length = 200, nullable = false)
128 private String instanceName;
129 @Column(name = "FIRED_TIME", length = 13, nullable = false)
130 @Digits(integer = 13, fraction = 0)
132 private BigInteger firedTime;
133 @Column(name = "SCHED_TIME", length = 13, nullable = false)
134 @Digits(integer = 13, fraction = 0)
136 private BigInteger schedTime;
137 @Column(name = "PRIORITY", nullable = false)
139 private Integer priority;
140 @Column(name = "STATE", length = 16, nullable = false)
144 private String state;
145 @Column(name = "JOB_NAME", length = 200, columnDefinition = "varchar(200) DEFAULT NULL")
148 private String jobName;
149 @Column(name = "JOB_GROUP", length = 200, columnDefinition = "varchar(200) DEFAULT NULL")
152 private String jobGroup;
153 @Column(name = "IS_NONCONCURRENT", length = 1, columnDefinition = "varchar(1) DEFAULT NULL")
156 private String isNonconcurrent;
157 @Column(name = "REQUESTS_RECOVERY", length = 1, columnDefinition = "varchar(1) DEFAULT NULL")
160 private String requestsRecovery;
167 public static class FnQzFiredTriggersID implements Serializable {
170 private String schedName;
173 private String entryId;