Interface SocialDBDriver

  • All Known Implementing Classes:
    SocialDBDatastaxDriver

    public interface SocialDBDriver
    Author:
    Massimiliano Assante ISTI-CNR, Costantino Perciante ISTI-CNR DatabookStore is the high level interface for querying and adding data to DatabookStore
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Boolean BatchCreateChildOfWithParameter​(String parentid, String parameterName, String parameterValue, List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> childResource, String parentResourceName, String childResourceName)
      batch create a child resource given its parent id in the DB
      Boolean BatchDeleteChildOfWithParameter​(String parentid, String parameterName, String parameterValue, List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> childResource, String parentResourceName, String childResourceName)
      batch delete a child resource with a certain attribute value given its parent id
      Boolean BatchUpdateChildOf​(String parentid, List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> childResource, String parentResourceName)
      Batch update a child resource given its id and its parent id in the DB
      Boolean check​(String id, String parameterName, String parameterValue, String resourceName)
      check attribute value of a resource given its id from the DB
      Boolean checkChildOf​(String parentid, String parameterName, String parameterValue, String parentResourceName, String childResourceName)
      check attribute value of a child resource given its parent id from the DB
      void closeConnection()
      close the connection to the underlying database
      Boolean create​(org.gcube.social_networking.socialnetworking.model.shared.IdResource resource)
      create a resource in the DB
      Boolean createChildOf​(String parentid, org.gcube.social_networking.socialnetworking.model.shared.IdResource childResource, String parentResourceName)
      create a child resource given its parent id in the DB
      Boolean delete​(String id, String resourceName)
      delete a resource given its id in the DB
      Boolean deleteChildOf​(String parentid, String childid, String childResourceName)
      delete a child resource given its id and its parent id in the DB
      Boolean deleteChildOfWithParameter​(String parentid, String childid, String parameterName, String parameterValue, String parentResourceName, String childResourceName)
      delete a child resource with a certain attribute value given its parent id
      Boolean deleteWithParameter​(String parameterName, String parameterValue, String resourceName)
      delete resources with a certain attribute value
      org.gcube.social_networking.socialnetworking.model.shared.IdResource read​(String id, String resourceName)
      read a resource given its id from the DB
      List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readAll​(String resourceName)
      list all instances of a resource in the DB
      List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readChildOf​(String parentid, String parentResourceName, String childResourceName)
      read a list of the children of a resource given its id from the DB
      List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readChildOfWithParameter​(String parentid, String parameterName, String parameterValue, String parentResourceName, String childResourceName)
      read a list of the children of a resource with a specific attribute value
      List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readWithParameter​(String parameterName, String parameterValue, String resourceName)
      read a list of resources with a specific attribute value
      org.gcube.social_networking.socialnetworking.model.shared.InviteOperationResult saveInvite​(org.gcube.social_networking.socialnetworking.model.shared.Invite invite)  
      Boolean update​(org.gcube.social_networking.socialnetworking.model.shared.IdResource resource)
      update a resource given its id in the DB
      Boolean updateChildOf​(String parentid, String childid, org.gcube.social_networking.socialnetworking.model.shared.IdResource childResource, String parentResourceName)
      update a child resource given its id and its parent id in the DB
      Boolean updateChildOfWithParameter​(String parentid, String parameterName, String parameterValue, org.gcube.social_networking.socialnetworking.model.shared.IdResource childResource, String parentResourceName)
      update a child resource with a certain attribute value given its parent id
      Boolean updateWithParameter​(String parameterName, String parameterValue, org.gcube.social_networking.socialnetworking.model.shared.IdResource resource)
      update a resource with a certain attribute value
    • Method Detail

      • create

        Boolean create​(org.gcube.social_networking.socialnetworking.model.shared.IdResource resource)
        create a resource in the DB
      • createChildOf

        Boolean createChildOf​(String parentid,
                              org.gcube.social_networking.socialnetworking.model.shared.IdResource childResource,
                              String parentResourceName)
        create a child resource given its parent id in the DB
      • BatchCreateChildOfWithParameter

        Boolean BatchCreateChildOfWithParameter​(String parentid,
                                                String parameterName,
                                                String parameterValue,
                                                List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> childResource,
                                                String parentResourceName,
                                                String childResourceName)
        batch create a child resource given its parent id in the DB
      • read

        org.gcube.social_networking.socialnetworking.model.shared.IdResource read​(String id,
                                                                                  String resourceName)
        read a resource given its id from the DB
      • check

        Boolean check​(String id,
                      String parameterName,
                      String parameterValue,
                      String resourceName)
        check attribute value of a resource given its id from the DB
      • checkChildOf

        Boolean checkChildOf​(String parentid,
                             String parameterName,
                             String parameterValue,
                             String parentResourceName,
                             String childResourceName)
        check attribute value of a child resource given its parent id from the DB
      • readAll

        List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readAll​(String resourceName)
        list all instances of a resource in the DB
      • readChildOf

        List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readChildOf​(String parentid,
                                                                                               String parentResourceName,
                                                                                               String childResourceName)
        read a list of the children of a resource given its id from the DB
      • readWithParameter

        List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readWithParameter​(String parameterName,
                                                                                                     String parameterValue,
                                                                                                     String resourceName)
        read a list of resources with a specific attribute value
      • readChildOfWithParameter

        List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> readChildOfWithParameter​(String parentid,
                                                                                                            String parameterName,
                                                                                                            String parameterValue,
                                                                                                            String parentResourceName,
                                                                                                            String childResourceName)
        read a list of the children of a resource with a specific attribute value
      • update

        Boolean update​(org.gcube.social_networking.socialnetworking.model.shared.IdResource resource)
        update a resource given its id in the DB
      • updateChildOf

        Boolean updateChildOf​(String parentid,
                              String childid,
                              org.gcube.social_networking.socialnetworking.model.shared.IdResource childResource,
                              String parentResourceName)
        update a child resource given its id and its parent id in the DB
      • BatchUpdateChildOf

        Boolean BatchUpdateChildOf​(String parentid,
                                   List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> childResource,
                                   String parentResourceName)
        Batch update a child resource given its id and its parent id in the DB
      • updateWithParameter

        Boolean updateWithParameter​(String parameterName,
                                    String parameterValue,
                                    org.gcube.social_networking.socialnetworking.model.shared.IdResource resource)
        update a resource with a certain attribute value
      • updateChildOfWithParameter

        Boolean updateChildOfWithParameter​(String parentid,
                                           String parameterName,
                                           String parameterValue,
                                           org.gcube.social_networking.socialnetworking.model.shared.IdResource childResource,
                                           String parentResourceName)
        update a child resource with a certain attribute value given its parent id
      • delete

        Boolean delete​(String id,
                       String resourceName)
        delete a resource given its id in the DB
      • deleteChildOf

        Boolean deleteChildOf​(String parentid,
                              String childid,
                              String childResourceName)
        delete a child resource given its id and its parent id in the DB
      • deleteWithParameter

        Boolean deleteWithParameter​(String parameterName,
                                    String parameterValue,
                                    String resourceName)
        delete resources with a certain attribute value
      • deleteChildOfWithParameter

        Boolean deleteChildOfWithParameter​(String parentid,
                                           String childid,
                                           String parameterName,
                                           String parameterValue,
                                           String parentResourceName,
                                           String childResourceName)
        delete a child resource with a certain attribute value given its parent id
      • BatchDeleteChildOfWithParameter

        Boolean BatchDeleteChildOfWithParameter​(String parentid,
                                                String parameterName,
                                                String parameterValue,
                                                List<org.gcube.social_networking.socialnetworking.model.shared.IdResource> childResource,
                                                String parentResourceName,
                                                String childResourceName)
        batch delete a child resource with a certain attribute value given its parent id
      • saveInvite

        org.gcube.social_networking.socialnetworking.model.shared.InviteOperationResult saveInvite​(org.gcube.social_networking.socialnetworking.model.shared.Invite invite)
                                                                                            throws ServerException
        Throws:
        ServerException
      • closeConnection

        void closeConnection()
        close the connection to the underlying database