Add filter obejcts for concepts
[policy/models.git] / models-dao / src / main / java / org / onap / policy / models / dao / PfDao.java
index 609afef..e635085 100644 (file)
@@ -108,7 +108,7 @@ public interface PfDao {
     <T extends PfConcept> int deleteByConceptKey(Class<T> someClass, Collection<PfConceptKey> keys);
 
     /**
-     * policypolicypolicy Delete a collection of objects in the database referred to by reference key.
+     * Delete a collection of objects in the database referred to by reference key.
      *
      * @param <T> the type of the objects to delete, a subclass of {@link PfConcept}
      * @param someClass the class of the objects to delete, a subclass of {@link PfConcept}
@@ -132,10 +132,11 @@ public interface PfDao {
      * @param someClass the class of the object to get, a subclass of {@link PfConcept}, if name is null, all concepts
      *        of type T are returned, if name is not null and version is null, all versions of that concept matching the
      *        name are returned.
-     * @param key the key of the object to get
+     * @param name the name of the object to get, null returns all objects
+     * @param version the version the object to get, null returns all objects for a specified name
      * @return the objects that was retrieved from the database
      */
-    <T extends PfConcept> List<T> getFiltered(Class<T> someClass, PfConceptKey key);
+    <T extends PfConcept> List<T> getFiltered(Class<T> someClass, String name, String version);
 
     /**
      * Get an object from the database, referred to by concept key.
@@ -186,25 +187,6 @@ public interface PfDao {
      */
     <T extends PfConcept> List<T> getAllVersions(Class<T> someClass, final String name);
 
-    /**
-     * Get latest version of objects in the database of a given type.
-     *
-     * @param <T> the type of the objects to get, a subclass of {@link PfConcept}
-     * @param someClass the class of the objects to get, a subclass of {@link PfConcept}
-     * @return the objects or null if no objects were retrieved
-     */
-    <T extends PfConcept> List<T> getLatestVersions(Class<T> someClass);
-
-    /**
-     * Get latest version of an object in the database of a given type.
-     *
-     * @param <T> the type of the objects to get, a subclass of {@link PfConcept}
-     * @param someClass the class of the objects to get, a subclass of {@link PfConcept}
-     * @param conceptName the name of the concept for which to get the latest version
-     * @return the objects or null if no objects were retrieved
-     */
-    <T extends PfConcept> T getLatestVersion(Class<T> someClass, final String conceptName);
-
     /**
      * Get a concept from the database with the given concept key.
      *