// // storagenodedbaccess_java.h // // Created by Frank Vernon on 5/7/14. // Copyright (c) 2014 IOnU. All rights reserved. // Copyright (c) 2016, Sequence Logic, Inc. All rights reserved. // #ifndef STORAGENODEDBACCESS_JAVA #define STORAGENODEDBACCESS_JAVA #include #include #include #include "storagenodedbaccess.h" namespace sequencelogic { class StorageNodeDBAccessJava { public: typedef std::vector STRING_VECTOR; typedef std::shared_ptr STRING_VECTOR_PTR; StorageNodeDBAccessJava(); ~StorageNodeDBAccessJava(); bool initDB(const std::string & dbFilePath); STRING_VECTOR_PTR getNodes(const std::string & nodeJSON); std::string listChildren(const std::string & parent, int offset = 0, int limit = 0, const std::string & sort = "metadata_utime", bool sortAscending = true); std::string listChildren(const std::string & parentJSON, const std::string & startingNodeJSON, int limit = 0, const std::string & sort = "metadata_utime", bool sortAscending = true); bool putNode(const std::string & nodeJSON); int rowCount(); int countChildren(const std::string & parent); STRING_VECTOR_PTR getNodesInDirectory(const std::string & nodeJSON); STRING_VECTOR_PTR getNodesByPath(const std::string & nodeJSON); STRING_VECTOR_PTR getNodesByPathForMountAndSignature(const std::string & nodeJSON); STRING_VECTOR_PTR getNodesByStatus(const std::string & nodeJSON); STRING_VECTOR_PTR getNodesByUniformResourceName(const std::string & nodeJSON); bool deleteNodes(const std::string & nodeJSON); private: StorageNodeDBAccess dbAccess; }; }; #endif