2 * ============LICENSE_START=======================================================
3 * feature-active-standby-management
4 * ================================================================================
5 * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.drools.activestandby;
23 import java.util.Date;
29 public class DroolsPdpImpl extends DroolsPdpObject {
31 private boolean designated;
33 private Date updatedDate;
34 private Date designatedDate;
41 * @param pdpId ID for the PDP
42 * @param designated is designated
43 * @param priority priority
44 * @param updatedDate date updated
46 public DroolsPdpImpl(String pdpId, boolean designated, int priority, Date updatedDate) {
48 this.designated = designated;
49 this.priority = priority;
50 this.updatedDate = updatedDate;
51 //When this is translated to a TimeStamp in MySQL, it assumes the date is relative
52 //to the local timezone. So, a value of Date(0) is actually Dec 31 18:00:00 CST 1969
53 //which is an invalid value for the MySql TimeStamp
54 this.designatedDate = new Date(864000000);
58 public int hashCode() {
59 return super.hashCode();
63 public boolean equals(Object obj) {
64 return super.equals(obj);