be.personify.iam.model.provisioning.ReconciliationTransformer 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.provisioning;
import java.io.Serializable;
import java.util.Map;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.MapKeyColumn;
import be.personify.iam.model.util.Persisted;
import be.personify.util.generator.MetaInfo;
@Entity
@MetaInfo( group="vault", frontendGroup="Provisioning", name="transformer",
description="A transformer produces configurable output towards a targetsystem.",
workflowEnabled=false,
iconClass="random",
showInMenu=false,
sortOrderInGroup = 4,
number=16,
isConcept = false,
afterDeleteGoToLink="reconciliation",
afterCreateGoToLink = "reconciliation",
afterUpdateGoToLink = "reconciliation")
public class ReconciliationTransformer extends Persisted implements Serializable{
private static final long serialVersionUID = 442067640549647187L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@MetaInfo(showInSearchResultGrid=false , name="id", description="the id of the property")
private long id;
@MetaInfo( searchable=true, showInSearchResultGrid=true, name="name", description = "the name of the transformer", required = true)
private String name;
@MetaInfo( searchable=true, showInSearchResultGrid=false, name="description", description = "the description of the transformer")
private String description;
@MetaInfo( searchable=false, showInSearchResultGrid=false, name="className", description = "the classname of the transformer", validationPattern = "^([A-Za-z]{1}[A-Za-z\\d_]*\\.)+[A-Za-z][A-Za-z\\d_]*$", fixedInitialValue = "com.test")
private String className;
@MetaInfo(name="reconciliation",description="the related reconciliation_",sampleValue="FILETOREST", searchable = false, editable = false)
@ManyToOne(targetEntity=Reconciliation.class)
private Reconciliation reconciliation;
@ElementCollection(fetch = FetchType.EAGER)
@JoinTable(name="recon_transformer_configuration", joinColumns=@JoinColumn(name="id"))
@MapKeyColumn (name="configuration_id")
@Column(name="value")
@MetaInfo( searchable=false, showInSearchResultGrid=false, name="configuration", description = "the configuration of the transformer")
private Map configuration;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
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 getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Map getConfiguration() {
return configuration;
}
public void setConfiguration(Map configuration) {
this.configuration = configuration;
}
public Reconciliation getReconciliation() {
return reconciliation;
}
public void setReconciliation(Reconciliation reconciliation) {
this.reconciliation = reconciliation;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(className, configuration, description, id, name, reconciliation);
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;
ReconciliationTransformer other = (ReconciliationTransformer) obj;
return Objects.equals(className, other.className) && Objects.equals(configuration, other.configuration)
&& Objects.equals(description, other.description) && id == other.id && Objects.equals(name, other.name)
&& Objects.equals(reconciliation, other.reconciliation);
}
}