/** * Reads all databases. * * @param options the feed options. * @return the feed response with the read databases. */ public FeedResponse<Database> readDatabases(FeedOptions options) { logger.debug("Reading Databases."); return new FeedResponse<Database>(new QueryIterable<Database>(this, ResourceType.Database, Database.class, Paths.DATABASES_ROOT, options)); }
/** * Reads all users in a database. * * @param databaseLink the database link. * @param options the feed options. * @return the feed response with the read users. */ public FeedResponse<User> readUsers(String databaseLink, FeedOptions options) { if (StringUtils.isEmpty(databaseLink)) { throw new IllegalArgumentException("databaseLink"); } logger.debug("Reading Users. databaseLink [{}]", databaseLink); String path = Utils.joinPath(databaseLink, Paths.USERS_PATH_SEGMENT); return new FeedResponse<User>(new QueryIterable<User>(this, ResourceType.User, User.class, path, options)); }
/** * Query for databases. * * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response with the obtained databases. */ public FeedResponse<Database> queryDatabases(SqlQuerySpec querySpec, FeedOptions options) { if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying Databases. querySpec: [{}]", querySpec); return new FeedResponse<Database>(new QueryIterable<Database>(this, ResourceType.Database, Database.class, Paths.DATABASES_ROOT, querySpec, options)); }
/** * Reads all permissions. * * @param userLink the user link. * @param options the feed options. * @return the feed response with the read permissions. */ public FeedResponse<Permission> readPermissions(String userLink, FeedOptions options) { if (StringUtils.isEmpty(userLink)) { throw new IllegalArgumentException("permissionLink"); } logger.debug("Reading Permissions. permissionLink [{}]", userLink); String path = Utils.joinPath(userLink, Paths.PERMISSIONS_PATH_SEGMENT); return new FeedResponse<Permission>(new QueryIterable<Permission>(this, ResourceType.Permission, Permission.class, path, options)); }
/** * Reads all user defined functions in a document collection. * * @param collectionLink the collection link. * @param options the feed options. * @return the feed response with the read user defined functions. */ public FeedResponse<UserDefinedFunction> readUserDefinedFunctions(String collectionLink, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } logger.debug("Reading UserDefinedFunctions. collectionLink [{}]", collectionLink); String path = Utils.joinPath(collectionLink, Paths.USER_DEFINED_FUNCTIONS_PATH_SEGMENT); return new FeedResponse<UserDefinedFunction>(new QueryIterable<UserDefinedFunction>(this, ResourceType.UserDefinedFunction, UserDefinedFunction.class, path, options)); }
/** * Reads all attachments in a document. * * @param documentLink the document link. * @param options the feed options. * @return the feed response with the read attachments. */ public FeedResponse<Attachment> readAttachments(String documentLink, FeedOptions options) { if (StringUtils.isEmpty(documentLink)) { throw new IllegalArgumentException("documentLink"); } logger.debug("Reading Attachments. attachmentLink [{}]", documentLink); String path = Utils.joinPath(documentLink, Paths.ATTACHMENTS_PATH_SEGMENT); return new FeedResponse<Attachment>(new QueryIterable<Attachment>(this, ResourceType.Attachment, Attachment.class, path, options)); }
/** * Query for document collections in a database. * * @param databaseLink the database link. * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response with the obtained collections. */ public FeedResponse<DocumentCollection> queryCollections(String databaseLink, SqlQuerySpec querySpec, FeedOptions options) { if (StringUtils.isEmpty(databaseLink)) { throw new IllegalArgumentException("databaseLink"); } if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying Collections. databaseLink: [{}], querySpec [{}]", databaseLink, querySpec); String path = Utils.joinPath(databaseLink, Paths.COLLECTIONS_PATH_SEGMENT); return new FeedResponse<DocumentCollection>(new QueryIterable<DocumentCollection>(this, ResourceType.DocumentCollection, DocumentCollection.class, path, querySpec, options)); }
/** * Query for stored procedures in a document collection. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response with the obtained stored procedures. */ public FeedResponse<StoredProcedure> queryStoredProcedures(String collectionLink, SqlQuerySpec querySpec, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying StoredProcedures. collectionLink [{}], querySpec [{}]", collectionLink, querySpec); String path = Utils.joinPath(collectionLink, Paths.STORED_PROCEDURES_PATH_SEGMENT); return new FeedResponse<StoredProcedure>(new QueryIterable<StoredProcedure>(this, ResourceType.StoredProcedure, StoredProcedure.class, path, querySpec, options)); }
/** * Reads all document collections in a database. * * @param databaseLink the database link. * @param options the fee options. * @return the feed response with the read collections. */ public FeedResponse<DocumentCollection> readCollections(String databaseLink, FeedOptions options) { if (StringUtils.isEmpty(databaseLink)) { throw new IllegalArgumentException("databaseLink"); } logger.debug("Reading Collections. databaseLink: [{}]", databaseLink); String path = Utils.joinPath(databaseLink, Paths.COLLECTIONS_PATH_SEGMENT); return new FeedResponse<DocumentCollection>(new QueryIterable<DocumentCollection>(this, ResourceType.DocumentCollection, DocumentCollection.class, path, options)); }
/** * Reads all documents in a document collection. * * @param collectionLink the collection link. * @param options the feed options. * @return the feed response with read documents. */ public FeedResponse<Document> readDocuments(String collectionLink, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } logger.debug("Reading Documents. collectionLink: [{}]", collectionLink); String path = Utils.joinPath(collectionLink, Paths.DOCUMENTS_PATH_SEGMENT); return new FeedResponse<Document>(new QueryIterable<Document>(this, ResourceType.Document, Document.class, path, options)); }
/** * Reads all stored procedures in a document collection link. * * @param collectionLink the collection link. * @param options the feed options. * @return the feed response with the read stored procedure. */ public FeedResponse<StoredProcedure> readStoredProcedures(String collectionLink, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } logger.debug("Reading StoredProcedures. collectionLink [{}]", collectionLink); String path = Utils.joinPath(collectionLink, Paths.STORED_PROCEDURES_PATH_SEGMENT); return new FeedResponse<StoredProcedure>(new QueryIterable<StoredProcedure>(this, ResourceType.StoredProcedure, StoredProcedure.class, path, options)); }
/** * Reads all conflicts in a document collection. * * @param collectionLink the collection link. * @param options the feed options. * @return the feed response with the read conflicts. */ public FeedResponse<Conflict> readConflicts(String collectionLink, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } logger.debug("Reading Conflicts. collectionLink [{}]", collectionLink); String path = Utils.joinPath(collectionLink, Paths.CONFLICTS_PATH_SEGMENT); return new FeedResponse<Conflict>(new QueryIterable<Conflict>(this, ResourceType.Conflict, Conflict.class, path, options)); }
/** * Reads offers. * * @param options the feed options. * @return the feed response with the read offers. */ public FeedResponse<Offer> readOffers(FeedOptions options) { logger.debug("Reading Offers."); String path = Utils.joinPath(Paths.OFFERS_PATH_SEGMENT, null); return new FeedResponse<Offer>(new QueryIterable<Offer>(this, ResourceType.Offer, Offer.class, path, options)); }
/** * Query for permissions. * * @param permissionLink the permission link. * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response with the obtained permissions. */ public FeedResponse<Permission> queryPermissions(String permissionLink, SqlQuerySpec querySpec, FeedOptions options) { if (StringUtils.isEmpty(permissionLink)) { throw new IllegalArgumentException("permissionLink"); } if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying Permissions. permissionLink [{}], querySpec [{}]", permissionLink, querySpec); String path = Utils.joinPath(permissionLink, Paths.PERMISSIONS_PATH_SEGMENT); return new FeedResponse<Permission>(new QueryIterable<Permission>(this, ResourceType.Permission, Permission.class, path, querySpec, options)); }
/** * Query for triggers. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response with the obtained triggers. */ public FeedResponse<Trigger> queryTriggers(String collectionLink, SqlQuerySpec querySpec, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying Triggers. collectionLink [{}], querySpec [{}]", collectionLink, querySpec); String path = Utils.joinPath(collectionLink, Paths.TRIGGERS_PATH_SEGMENT); return new FeedResponse<Trigger>(new QueryIterable<Trigger>(this, ResourceType.Trigger, Trigger.class, path, querySpec, options)); }
/** * Query for user defined functions. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response with the obtained user defined functions. */ public FeedResponse<UserDefinedFunction> queryUserDefinedFunctions(String collectionLink, SqlQuerySpec querySpec, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying UserDefinedFunctions. collectionLink [{}], querySpec [{}]", collectionLink, querySpec); String path = Utils.joinPath(collectionLink, Paths.USER_DEFINED_FUNCTIONS_PATH_SEGMENT); return new FeedResponse<UserDefinedFunction>(new QueryIterable<UserDefinedFunction>(this, ResourceType.UserDefinedFunction, UserDefinedFunction.class, path, querySpec, options)); }
/** * Reads all triggers in a document collection. * * @param collectionLink the collection link. * @param options the feed options. * @return the feed response with the read triggers. */ public FeedResponse<Trigger> readTriggers(String collectionLink, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } logger.debug("Reading Triggers. collectionLink [{}]", collectionLink); String path = Utils.joinPath(collectionLink, Paths.TRIGGERS_PATH_SEGMENT); return new FeedResponse<Trigger>( new QueryIterable<Trigger>(this, ResourceType.Trigger, Trigger.class, path, options)); }
/** * Query for conflicts. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param options the feed options. * @return the feed response of the obtained conflicts. */ public FeedResponse<Conflict> queryConflicts(String collectionLink, SqlQuerySpec querySpec, FeedOptions options) { if (StringUtils.isEmpty(collectionLink)) { throw new IllegalArgumentException("collectionLink"); } if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying Conflicts. collectionLink [{}], querySpec [{}]", collectionLink, querySpec); String path = Utils.joinPath(collectionLink, Paths.CONFLICTS_PATH_SEGMENT); return new FeedResponse<Conflict>(new QueryIterable<Conflict>(this, ResourceType.Conflict, Conflict.class, path, querySpec, options)); }
/** * Query for offers in a database. * * @param querySpec the query specification. * @param options the feed options. * @return the feed response with the obtained offers. */ public FeedResponse<Offer> queryOffers(SqlQuerySpec querySpec, FeedOptions options) { if (querySpec == null) { throw new IllegalArgumentException("querySpec"); } logger.debug("Querying Offers. querySpec [{}]", querySpec); String path = Utils.joinPath(Paths.OFFERS_PATH_SEGMENT, null); return new FeedResponse<Offer>(new QueryIterable<Offer>(this, ResourceType.Offer, Offer.class, path, querySpec, options)); }
return new FeedResponse<Document>(new QueryIterable<Document>(this, ResourceType.Document, Document.class,