Closed
Description
EntityGraph
and Subgraph
share a lot of identical methods. Those methods could be declared on a (new) common interface extended by both EG and SG.
public interface Graph<T> {
void addAttributeNodes(String ... attributeName);
void addAttributeNodes(Attribute<T, ?> ... attribute);
<X> Subgraph<X> addSubgraph(Attribute<T, X> attribute);
<X> Subgraph<? extends X> addSubgraph(Attribute<T, X> attribute, Class<? extends X> type);
<X> Subgraph<X> addSubgraph(String attributeName);
<X> Subgraph<X> addSubgraph(String attributeName, Class<X> type);
<X> Subgraph<X> addKeySubgraph(Attribute<T, X> attribute);
<X> Subgraph<? extends X> addKeySubgraph(Attribute<T, X> attribute, Class<? extends X> type);
<X> Subgraph<X> addKeySubgraph(String attributeName);
<X> Subgraph<X> addKeySubgraph(String attributeName, Class<X> type);
List<AttributeNode<?>> getAttributeNodes();
}
public interface EntityGraph<T> extends Graph<T> {
String getName();
<T> Subgraph<? extends T> addSubclassSubgraph(Class<? extends T> type);
}
public interface Subgraph<T> extends Graph<T> {
Class<T> getClassType();
}
Metadata
Metadata
Assignees
Labels
No labels