
org.catools.etl.model.CEtlProject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etl Show documentation
Show all versions of etl Show documentation
The base ETL to be used in other CATools project as a base contract.
package org.catools.etl.model;
import org.catools.common.json.CJsonUtil;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;
@NamedQueries(
{
@NamedQuery(
name = "getProjectById",
query = "FROM CEtlProject where id=:id"
),
@NamedQuery(
name = "getProjects",
query = "FROM CEtlProject"
)
}
)
@Entity
@Table(name = "project", schema = "etl")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "project")
public class CEtlProject implements Serializable {
private static final long serialVersionUID = 6069874018185613707L;
@Id
@Column(name = "id", length = 20, unique = true, nullable = false)
private String id;
@Column(name = "name", length = 250, unique = true, nullable = false)
private String name;
public CEtlProject() {
}
public CEtlProject(String id, String name) {
this.id = id;
this.name = name;
}
public String getId() {
return id;
}
public CEtlProject setId(String id) {
this.id = id;
return this;
}
public String getName() {
return name;
}
public CEtlProject setName(String name) {
this.name = name;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CEtlProject that = (CEtlProject) o;
return Objects.equals(id, that.id) && Objects.equals(name, that.name);
}
@Override
public int hashCode() {
return Objects.hash(id, id, name);
}
@Override
public String toString() {
return CJsonUtil.toString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy