be.personify.iam.model.provisioning.ProvisionAttempt 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 javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import be.personify.iam.model.util.Persisted;
import be.personify.util.Action;
import be.personify.util.State;
import be.personify.util.generator.MetaInfo;
@Entity
@MetaInfo( group="provisioning", frontendGroup="Provisioning", name="provisionAttempt", description="A result of a provisioning", number = 11,
showInMenu=true, sortOrderInGroup=4,
sortProperty = "creationDate",
sortOrder = "descending",
creatable = false,
addable = false,
deletable = false,
editable = false,
dashboard = true,
persistentPropertiesToIncludeOnSearchResult = "creationDate",
iconClass = "stopwatch")
public class ProvisionAttempt extends Persisted implements Serializable{
private static final long serialVersionUID = 443147408145699678L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@MetaInfo(name="id", description="the id of the provisioning", searchable=false,showInSearchResultGrid=false)
private long id;
@ManyToOne( targetEntity=Account.class)
@MetaInfo( showInSearchResultGrid=false, name="account", description="the link to the account_", searchable = false, editable = false)
private Account account;
@ManyToOne( targetEntity=TargetSystem.class)
@MetaInfo( showInSearchResultGrid=true, name="targetsystem", description="the link to the targetsystem_", searchable = true, editable = false)
private TargetSystem targetSystem;
@MetaInfo(name="identityHref", description="The identityHref of the identity in the targetsystem", searchable=true, showInSearchResultGrid=false, editable = false)
private String identityHref;
@MetaInfo(name="status", description="The status of the provisioning", searchable=true, showInSearchResultGrid=true, editable = false)
@Enumerated(EnumType.STRING)
private ProvisionAttemptStatus status;
@Enumerated(EnumType.STRING)
private Action action;
@MetaInfo(name="timeTotal", description="The total time spent for provisioning", searchable=false, showInSearchResultGrid=false, editable = false, unit="ms")
private long timeTotal = 0;
@MetaInfo(name="timeConnectorFind", description="The time spent for provisioning in the connector for finding", searchable=false, showInSearchResultGrid=false, editable = false, unit="ms")
private long timeConnectorFind = 0;
@MetaInfo(name="timeConnectorOperation", description="The time spent for provisioning in the connector for the operation", searchable=false, showInSearchResultGrid=false, editable = false, unit="ms")
private long timeConnectorOperation = 0;
@MetaInfo(name="localState", description="The localState of the identity in the targetsystem", searchable=false, showInSearchResultGrid=false, editable = false)
@Enumerated(EnumType.STRING)
private State localState;
@MetaInfo(name="remoteState", description="The remote state of the identity in the targetsystem", searchable=false, showInSearchResultGrid=false, editable = false)
@Enumerated(EnumType.STRING)
private State remoteState;
@MetaInfo(searchable=false, showInSearchResultGrid=false, name = "errorDetail", description = "error of the provisioning")
@Lob
@Column(length = 20971520)
private String errorDetail;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getIdentityHref() {
return identityHref;
}
public void setIdentityHref(String identityHref) {
this.identityHref = identityHref;
}
public State getLocalState() {
return localState;
}
public void setLocalState(State localState) {
this.localState = localState;
}
public ProvisionAttemptStatus getStatus() {
return status;
}
public void setStatus(ProvisionAttemptStatus status) {
this.status = status;
}
public State getRemoteState() {
return remoteState;
}
public void setRemoteState(State remoteState) {
this.remoteState = remoteState;
}
public String getErrorDetail() {
return errorDetail;
}
public void setErrorDetail(String errorDetail) {
this.errorDetail = errorDetail;
}
public TargetSystem getTargetSystem() {
return targetSystem;
}
public void setTargetSystem(TargetSystem targetSystem) {
this.targetSystem = targetSystem;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
public Action getAction() {
return action;
}
public void setAction(Action action) {
this.action = action;
}
public long getTimeTotal() {
return timeTotal;
}
public void setTimeTotal(long timeTotal) {
this.timeTotal = timeTotal;
}
public long getTimeConnectorFind() {
return timeConnectorFind;
}
public void setTimeConnectorFind(long timeConnectorFind) {
this.timeConnectorFind = timeConnectorFind;
}
public long getTimeConnectorOperation() {
return timeConnectorOperation;
}
public void setTimeConnectorOperation(long timeConnectorOperation) {
this.timeConnectorOperation = timeConnectorOperation;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((account == null) ? 0 : account.hashCode());
result = prime * result + ((action == null) ? 0 : action.hashCode());
result = prime * result + ((errorDetail == null) ? 0 : errorDetail.hashCode());
result = prime * result + (int) (id ^ (id >>> 32));
result = prime * result + ((identityHref == null) ? 0 : identityHref.hashCode());
result = prime * result + ((localState == null) ? 0 : localState.hashCode());
result = prime * result + ((remoteState == null) ? 0 : remoteState.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
result = prime * result + ((targetSystem == null) ? 0 : targetSystem.hashCode());
result = prime * result + (int) (timeConnectorFind ^ (timeConnectorFind >>> 32));
result = prime * result + (int) (timeConnectorOperation ^ (timeConnectorOperation >>> 32));
result = prime * result + (int) (timeTotal ^ (timeTotal >>> 32));
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;
ProvisionAttempt other = (ProvisionAttempt) obj;
if (account == null) {
if (other.account != null)
return false;
} else if (!account.equals(other.account))
return false;
if (action != other.action)
return false;
if (errorDetail == null) {
if (other.errorDetail != null)
return false;
} else if (!errorDetail.equals(other.errorDetail))
return false;
if (id != other.id)
return false;
if (identityHref == null) {
if (other.identityHref != null)
return false;
} else if (!identityHref.equals(other.identityHref))
return false;
if (localState != other.localState)
return false;
if (remoteState != other.remoteState)
return false;
if (status != other.status)
return false;
if (targetSystem == null) {
if (other.targetSystem != null)
return false;
} else if (!targetSystem.equals(other.targetSystem))
return false;
if (timeConnectorFind != other.timeConnectorFind)
return false;
if (timeConnectorOperation != other.timeConnectorOperation)
return false;
if (timeTotal != other.timeTotal)
return false;
return true;
}
}