be.personify.iam.model.provisioning.RouteEntry 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.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import be.personify.iam.model.util.Persisted;
import be.personify.util.generator.MetaInfo;
@Entity
@MetaInfo( group="provisioning", frontendGroup="Route", name="RouteEntry", description="Route entry to connectors",
showInMenu=false,
sortOrderInGroup=2,
afterDeleteGoToLink="route",
afterCreateGoToLink="route",
iconClass = "puzzle-piece",
showOnHomePage=false,
number=7
)
public class RouteEntry extends Persisted implements Serializable {
private static final long serialVersionUID = 5453351805584023078L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@MetaInfo(name="id", description="the id of the route entry", searchable=false,showInSearchResultGrid=false)
private long id;
@MetaInfo(name="name", description="the name of the route entry, this is also used in the json as a key")
private String name;
@OneToOne( targetEntity=TargetSystemAttribute.class)
@MetaInfo(name="targetSystemAttribute", description="the 'target' attribute in the remote system. see targetSystemAttribute_", searchable = false)
private TargetSystemAttribute targetSystemAttribute;
@ManyToOne( targetEntity=Route.class)
@MetaInfo( showInSearchResultGrid=false, name="route", description="the involved route_", searchable = false)
private Route route;
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 TargetSystemAttribute getTargetSystemAttribute() {
return targetSystemAttribute;
}
public void setTargetSystemAttribute(TargetSystemAttribute targetSystemAttribute) {
this.targetSystemAttribute = targetSystemAttribute;
}
public Route getRoute() {
return route;
}
public void setRoute(Route route) {
this.route = route;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (int) (id ^ (id >>> 32));
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((route == null) ? 0 : route.hashCode());
result = prime * result + ((targetSystemAttribute == null) ? 0 : targetSystemAttribute.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;
RouteEntry other = (RouteEntry) obj;
if (id != other.id)
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (route == null) {
if (other.route != null)
return false;
} else if (!route.equals(other.route))
return false;
if (targetSystemAttribute == null) {
if (other.targetSystemAttribute != null)
return false;
} else if (!targetSystemAttribute.equals(other.targetSystemAttribute))
return false;
return true;
}
}