public class EntityDependencyGraph extends Object
Nodes linked to each other by Edges.
Each Node corresponds to a single JPA entity and each Edge between them
corresponds to a single relationship between the JPA entities (i.e. one of OneToOne,
OneToMany, ManyToOne or ManyToMany).| Constructor and Description |
|---|
EntityDependencyGraph() |
| Modifier and Type | Method and Description |
|---|---|
Set<Node> |
addEntities(Class<?>... entities)
A convenience method to add a number of entities to the graph at once.
|
Set<Node> |
addEntities(Collection<Class<?>> entities)
A convenience method to add a number of entities to the graph at once.
|
Node |
addEntity(Class<?> entity)
Adds a single entity to the dependency graph and analyzes it.
|
Set<Node> |
getAllNodes() |
Set<Node> |
getLeafNodes() |
Node |
getNode(Class<?> entityClass) |
Set<Node> |
getRootNodes() |
String |
toString() |
public Node addEntity(Class<?> entity)
entity - Node instance corresponding to the provided entity class or null
if the class doesn't represent a JPA entity.public Set<Node> addEntities(Class<?>... entities)
entities - public Set<Node> addEntities(Collection<Class<?>> entities)
entities - public Node getNode(Class<?> entityClass)
entityClass - the class of an entitypublic Set<Node> getRootNodes()
public Set<Node> getLeafNodes()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.