All Downloads are FREE. Search and download functionalities are using the official Maven repository.

be.personify.iam.model.provisioning.Reconciliation Maven / Gradle / Ivy

There is a newer version: 1.5.2.RELEASE
Show newest version
package be.personify.iam.model.provisioning;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import javax.persistence.CascadeType;
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 javax.persistence.OneToMany;
import javax.persistence.Table;

import be.personify.iam.model.util.Persisted;
import be.personify.util.generator.MetaInfo;

@Entity
@MetaInfo( group="provisioning", frontendGroup="Provisioning", name="Reconciliation", description="A reconciliation", 
				iconClass="sync", 
				sortOrderInGroup=1, showInMenu=true,
				number=6,
				workflowEnabled = false,
				rst_include_description = true
)
@Table(name="reconciliation")
public class Reconciliation extends Persisted implements Serializable {
	
	private static final long serialVersionUID = 8104918783591219906L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@MetaInfo(name="id", description="the id of the reconciliation", searchable=false,showInSearchResultGrid=false)
	private long id;

	@Column(nullable=false)
	@MetaInfo(name="name",description="the name of the reconciliation",sampleValue="recon1")
	private String name;
	
	@MetaInfo(name="description",
			searchable=false,
			showInSearchResultGrid=false,
			customRenderer = "text_area|rows:3",
			description="the description of the reconciliation",
			sampleValue="reconciliation from system1 to system2")
	private String description;
	
	@MetaInfo(name="active",description="indicating if the targetsystem is active",sampleValue="true")
	private boolean active;
	
	@MetaInfo(name="source",description="The targetsystem_ that is going to be used as a source during the reconciliation", searchable = false, showInSearchResultGrid = false)
	@ManyToOne
	private TargetSystem source;
	
	@MetaInfo(name="target",description="The targetsystem_ that is going to be used as a target during the reconciliation", searchable = false, showInSearchResultGrid = false)
	@ManyToOne
	private TargetSystem target;
	
	
	@MetaInfo(name="chunkSize",description="the size of the chunks into which the whole recon is splitted",
			sampleValue="1000", 
			customRenderer = "integer_dropdown|values:10,50,100,200,500,1000|default:500", 
			showInSearchResultGridMobile = false,
			searchable = false)
	private int chunkSize;
	
	@ElementCollection(fetch = FetchType.EAGER)
	@JoinTable(name="reconciliation_configuration", joinColumns=@JoinColumn(name="id"))
	@MapKeyColumn (name="configuration_id")
	@Column(name="value")
	@MetaInfo(name="configuration", description="the configuration of the reconciliation, the mapping between source ans target attributes")
	private Map configuration;
	
	@OneToMany(mappedBy="reconciliation", cascade=CascadeType.ALL)
	@ElementCollection(targetClass=ReconciliationExecution.class)
	@MetaInfo(name="executions", description="A list of all the executions")
	private List executions;
	
	@OneToMany(mappedBy="reconciliation", cascade=CascadeType.ALL)
	@ElementCollection(targetClass=ReconciliationTransformer.class)
	@MetaInfo(name="executions", description="A list of all the transformers")
	private List transformers;
	
	
	
	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 boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public TargetSystem getSource() {
		return source;
	}

	public void setSource(TargetSystem source) {
		this.source = source;
	}

	public TargetSystem getTarget() {
		return target;
	}

	public void setTarget(TargetSystem target) {
		this.target = target;
	}

	public Map getConfiguration() {
		return configuration;
	}

	public void setConfiguration(Map configuration) {
		this.configuration = configuration;
	}
	
	
	public int getChunkSize() {
		return chunkSize;
	}

	public void setChunkSize(int chunkSize) {
		this.chunkSize = chunkSize;
	}

	public List getExecutions() {
		return executions;
	}

	public void setExecutions(List executions) {
		this.executions = executions;
	}

	public List getTransformers() {
		return transformers;
	}

	public void setTransformers(List transformers) {
		this.transformers = transformers;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + Objects.hash(active, chunkSize, configuration, description, executions, id, name,
				source, target, transformers);
		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;
		Reconciliation other = (Reconciliation) obj;
		return active == other.active && chunkSize == other.chunkSize
				&& Objects.equals(configuration, other.configuration) && Objects.equals(description, other.description)
				&& Objects.equals(executions, other.executions) && id == other.id && Objects.equals(name, other.name)
				&& Objects.equals(source, other.source) && Objects.equals(target, other.target)
				&& Objects.equals(transformers, other.transformers);
	}

	
	

	
	
	



	
	
		

	

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy