blob: df59903bad850f32800cc0b1523086f5e01af3fd [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.cn.portfolio.service.internal.repository;
import javax.persistence.*;
import java.util.Objects;
/**
* @author Myrle Krantz
*/
@SuppressWarnings({"WeakerAccess", "unused"})
@Entity
@Table(name = "bastet_p_task_defs")
public class TaskDefinitionEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@Column(name = "identifier")
private String identifier;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "product_id", nullable = false)
private ProductEntity product;
@Column(name = "a_name")
private String name;
@Column(name = "description")
private String description;
@Column(name = "actions")
private String actions;
@Column(name = "four_eyes")
private Boolean fourEyes;
@Column(name = "mandatory")
private Boolean mandatory;
public TaskDefinitionEntity() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public ProductEntity getProduct() {
return product;
}
public void setProduct(ProductEntity product) {
this.product = product;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getActions() {
return actions;
}
public void setActions(String actions) {
this.actions = actions;
}
public Boolean getFourEyes() {
return fourEyes;
}
public void setFourEyes(Boolean fourEyes) {
this.fourEyes = fourEyes;
}
public Boolean getMandatory() {
return mandatory;
}
public void setMandatory(Boolean mandatory) {
this.mandatory = mandatory;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TaskDefinitionEntity that = (TaskDefinitionEntity) o;
return Objects.equals(identifier, that.identifier) &&
Objects.equals(product, that.product);
}
@Override
public int hashCode() {
return Objects.hash(identifier, product);
}
@Override
public String toString() {
return "TaskDefinitionEntity{" +
"identifier='" + identifier + '\'' +
", product=" + product +
", name='" + name + '\'' +
", description='" + description + '\'' +
", actions='" + actions + '\'' +
", fourEyes=" + fourEyes +
", mandatory=" + mandatory +
'}';
}
}