org.javers.core.graph.SingleEdge Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
package org.javers.core.graph;
import org.javers.common.validation.Validate;
import org.javers.core.metamodel.object.GlobalId;
import org.javers.core.metamodel.type.JaversProperty;
/**
* OneToOne or ManyToOne relation
*
* Immutable
*
* @author bartosz walacik
*/
class SingleEdge extends AbstractSingleEdge {
private final ObjectNode referencedNode;
SingleEdge(JaversProperty property, ObjectNode referencedNode) {
super(property);
Validate.argumentsAreNotNull(referencedNode);
this.referencedNode = referencedNode;
}
@Override
public GlobalId getReference() {
return referencedNode.getGlobalId();
}
}