org.javers.core.graph.MultiEdge 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.core.metamodel.type.JaversProperty;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* OneToMany or ManyToMany relation
* @author bartosz walacik
*/
class MultiEdge extends Edge {
private final List references; //should not be empty
public MultiEdge(JaversProperty property) {
super(property);
references = new ArrayList<>();
}
public List getReferences(){
return Collections.unmodifiableList(references);
}
public void addReferenceNode(ObjectNode objectNode) {
references.add(objectNode);
}
}