be.personify.iam.model.vault.ProvisioningUnitTransformer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personify-model Show documentation
Show all versions of personify-model Show documentation
a possible model for personify
package be.personify.iam.model.vault;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import be.personify.iam.model.util.Persisted;
import be.personify.util.generator.MetaInfo;
@Entity
@MetaInfo( group="vault", frontendGroup="Entitlement", name="ProvisioningUnitTransformer",
description="A link between a provisioning unit and a tranformer",
showInMenu=false,
showDetailButtonOnSearchResult = false,
showEditButtonOnSearchResult = false,
iconClass="random",
number=13,
workflowEnabled=false,
isConcept = false,
afterDeleteGoToLink="provisioningUnit",
afterCreateGoToLink="provisioningUnit")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class ProvisioningUnitTransformer extends Persisted implements Serializable {
private static final long serialVersionUID = -1698577511208371213L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@MetaInfo(name="id", description="The id of the task", showInSearchResultGrid = false)
private long id;
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name="provisioning_unit_id")
@JsonInclude
@MetaInfo( searchable=false, showInSearchResultGrid=false, name="provisioningUnit", description = "the provisioningUnit_")
private ProvisioningUnit provisioningUnit;
@OneToOne
@JoinColumn(name="transformer_id")
@JsonInclude
@MetaInfo( searchable=false, showInSearchResultGrid=true, name="transformer", description = "the transformer_")
private Transformer transformer;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public ProvisioningUnit getProvisioningUnit() {
return provisioningUnit;
}
public void setProvisioningUnit(ProvisioningUnit provisioningUnit) {
this.provisioningUnit = provisioningUnit;
}
public Transformer getTransformer() {
return transformer;
}
public void setTransformer(Transformer transformer) {
this.transformer = transformer;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (int) (id ^ (id >>> 32));
result = prime * result + ((provisioningUnit == null) ? 0 : provisioningUnit.hashCode());
result = prime * result + ((transformer == null) ? 0 : transformer.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ProvisioningUnitTransformer other = (ProvisioningUnitTransformer) obj;
if (id != other.id)
return false;
if (provisioningUnit == null) {
if (other.provisioningUnit != null)
return false;
} else if (!provisioningUnit.equals(other.provisioningUnit))
return false;
if (transformer == null) {
if (other.transformer != null)
return false;
} else if (!transformer.equals(other.transformer))
return false;
return true;
}
}