diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/aai/champ/ChampGraph.java | 6 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/champ/event/AbstractLoggingChampGraph.java | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/org/onap/aai/champ/ChampGraph.java b/src/main/java/org/onap/aai/champ/ChampGraph.java index c70294b..2762e43 100644 --- a/src/main/java/org/onap/aai/champ/ChampGraph.java +++ b/src/main/java/org/onap/aai/champ/ChampGraph.java @@ -59,7 +59,10 @@ public interface ChampGraph { * If finer control is needed, you should consider accessing an implementation's * constructors/builders. */ - public static class Factory { + public static final class Factory { + private Factory(){ + //not called + } public static ChampGraph newInstance(ChampGraph.Type type, String graphName) { switch (type) { case IN_MEMORY: @@ -70,7 +73,6 @@ public interface ChampGraph { .build(); /* case DSE: //See above, DSE still in beta - return new DseChampGraphImpl.Builder("localhost").build(); */ default: throw new RuntimeException("Unknown type of ChampAPI implementation"); diff --git a/src/main/java/org/onap/aai/champ/event/AbstractLoggingChampGraph.java b/src/main/java/org/onap/aai/champ/event/AbstractLoggingChampGraph.java index 907f898..e9a806d 100644 --- a/src/main/java/org/onap/aai/champ/event/AbstractLoggingChampGraph.java +++ b/src/main/java/org/onap/aai/champ/event/AbstractLoggingChampGraph.java @@ -71,14 +71,19 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph { public abstract Stream<ChampObject> queryObjects(Map<String, Object> queryParams); public abstract ChampRelationship executeStoreRelationship(ChampRelationship relationship) throws ChampUnmarshallingException, ChampMarshallingException, ChampObjectNotExistsException, ChampSchemaViolationException, ChampRelationshipNotExistsException; public abstract ChampRelationship executeReplaceRelationship(ChampRelationship relationship) throws ChampUnmarshallingException, ChampMarshallingException, ChampSchemaViolationException, ChampRelationshipNotExistsException; + @Override public abstract Optional<ChampRelationship> retrieveRelationship(Object key) throws ChampUnmarshallingException; public abstract void executeDeleteRelationship(ChampRelationship relationship) throws ChampRelationshipNotExistsException; + @Override public abstract Stream<ChampRelationship> retrieveRelationships(ChampObject object) throws ChampUnmarshallingException, ChampObjectNotExistsException; + @Override public abstract Stream<ChampRelationship> queryRelationships(Map<String, Object> queryParams); public abstract ChampPartition executeStorePartition(ChampPartition partition) throws ChampSchemaViolationException, ChampRelationshipNotExistsException, ChampMarshallingException, ChampObjectNotExistsException; public abstract void executeDeletePartition(ChampPartition graph); public abstract void executeStoreObjectIndex(ChampObjectIndex index); + @Override public abstract Optional<ChampObjectIndex> retrieveObjectIndex(String indexName); + @Override public abstract Stream<ChampObjectIndex> retrieveObjectIndices(); public abstract void executeDeleteObjectIndex(String indexName) throws ChampIndexNotExistsException; public abstract void executeStoreRelationshipIndex(ChampRelationshipIndex index); @@ -96,7 +101,7 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph { /** Configuration property for setting the comma-separated list of servers to use for * communicating with the event bus. */ - public final static String PARAM_EVENT_STREAM_HOSTS = "champ.event.stream.hosts"; + public static final String PARAM_EVENT_STREAM_HOSTS = "champ.event.stream.hosts"; /** Configuration property for setting the number of events that we will try to 'batch' * up before sending them to the event bus. */ |