com.kenshoo.pl.entity.FullIdentifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.entity;
import java.util.Objects;
public class FullIdentifier, CHILD extends EntityType>{
private final Identifier parentId;
private final Identifier childId;
private final Identifier keyToParent;
public FullIdentifier(Identifier parentId, Identifier childId, Identifier keyToParent) {
this.parentId = parentId;
this.childId = childId;
this.keyToParent = keyToParent;
}
public Identifier getParentId() {
return parentId;
}
public Identifier getChildId() {
return childId;
}
public Identifier getKetToParent() {
return keyToParent;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FullIdentifier, ?> that = (FullIdentifier, ?>) o;
return Objects.equals(parentId, that.parentId) &&
Objects.equals(childId, that.childId) &&
Objects.equals(keyToParent, that.keyToParent);
}
@Override
public int hashCode() {
return Objects.hash(parentId, childId, keyToParent);
}
@Override
public String toString() {
return "FullIdentifier{" +
"parentId=" + parentId +
", childId=" + childId +
'}';
}
}