import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
-import java.util.Date;
+import java.time.LocalDateTime;
import java.util.Set;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.onap.portal.domain.db.fn.FnUser;
+import org.onap.portal.utils.EcompPortalUtils;
import org.onap.portalsdk.core.domain.FusionVo;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
@Getter
@Setter
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class DomainVo extends FusionVo implements Serializable, Cloneable, Comparable {
+ private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DomainVo.class);
private static final long serialVersionUID = 1L;
protected Long id;
- protected Date created;
- protected Date modified;
+ protected LocalDateTime created;
+ protected LocalDateTime modified;
protected FnUser createdId;
protected FnUser modifiedId;
protected Long rowNum;
protected Serializable auditUserId;
protected Set auditTrail = null;
+ public DomainVo(Long id) {
+ this.id = id;
+ }
+
@Override
public int compareTo(Object obj) {
Long c1 = this.getId();
newVo.setId(null);
}
} catch (Exception var8) {
- var8.printStackTrace();
+ logger.error("exception occured",var8);
}
return newVo;
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
+
+ public boolean equals(Object other) {
+ if (this == other) {
+ return true;
+ } else if (other == null) {
+ return false;
+ } else if (!(other instanceof DomainVo)) {
+ return false;
+ } else {
+ DomainVo castOther = (DomainVo)other;
+ return this.getId().equals(castOther.getId())
+ && this.getCreated().equals(castOther.getCreated())
+ && this.getCreatedId().equals(castOther.getCreatedId())
+ && this.getModified().equals(castOther.getModified())
+ && this.getModifiedId() == castOther.getModifiedId();
+ }
+ }
+
}