#import <IJAbstractRepository.h>
Instance Methods | |
| (id) | - initWithBackend: |
| ABSTRACT METHOD. You'll need to write your custom implementation. More... | |
| (void) | - createDocument:success:failure: |
| Create a document in the server. More... | |
| (void) | - updateDocument:success:failure: |
| Update a document in the server. More... | |
| (void) | - deleteDocument:success:failure: |
| Delete a document in the server. More... | |
| (void) | - deleteDocumentWithId:success:failure: |
| Delete a document in the server. More... | |
| (void) | - findDocumentWithId:success:failure: |
| Find a document in the server. More... | |
| (void) | - findDocumentsWithConditions:success:failure: |
| Find a list of documents in the server. More... | |
| (void) | - findAllDocumentsWithSuccess:failure: |
| Find all documents in the server. More... | |
| (void) | - refreshDocument:success:failure: |
| Refresh a local document. More... | |
| (IJAbstractDocument *) | - writeDocumentWithResponseObject: |
| ABSTRACT METHOD. You'll need to write your custom implementation. More... | |
Properties | |
| NSString * | serverUrl |
| NSString * | basePath |
| IJAbstractBackend * | backend |
| - (void) createDocument: | (IJAbstractDocument *) | document | |
| success: | (void(^)(IJAbstractDocument *document)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Create a document in the server.
This will do a POST call to server with the received object and retrieve an AbstractDocument.
| - (void) deleteDocument: | (IJAbstractDocument *) | document | |
| success: | (void(^)(BOOL successful)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Delete a document in the server.
This will do a DELETE call to server with the received object and returns a BOOL.
| - (void) deleteDocumentWithId: | (NSString *) | documentId | |
| success: | (void(^)(BOOL successful)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Delete a document in the server.
This will do a DELETE call to server with the received object ID and returns a BOOL.
| - (void) findAllDocumentsWithSuccess: | (void(^)(NSArray *documents)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Find all documents in the server.
This will do a GET call to server and returns an array filled with all AbstractDocuments in server.
| - (void) findDocumentsWithConditions: | (NSDictionary *) | searchConditions | |
| success: | (void(^)(NSArray *documents)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Find a list of documents in the server.
This will do a GET call to server with the received search conditions and returns an array filled with AbstractDocuments.
| - (void) findDocumentWithId: | (NSString *) | documentId | |
| success: | (void(^)(IJAbstractDocument *document)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Find a document in the server.
This will do a GET call to server with the received object ID and returns an AbstractDocument.
| - (id) initWithBackend: | (IJAbstractBackend *) | backend |
ABSTRACT METHOD. You'll need to write your custom implementation.
You'll need to create and set your backend, and set the server url and path for the current entity.
| - (void) refreshDocument: | (IJAbstractDocument *) | document | |
| success: | (void(^)(BOOL success)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Refresh a local document.
This will do a GET call to server with the received Abstractdocument reference and update it.
| - (void) updateDocument: | (IJAbstractDocument *) | document | |
| success: | (void(^)(IJAbstractDocument *document)) | success | |
| failure: | (void(^)(IJError *error)) | failure | |
Update a document in the server.
This will do a PUT call to server with the received object and retrieve the updated AbstractDocument.
| - (IJAbstractDocument *) writeDocumentWithResponseObject: | (NSDictionary *) | responseObject |
ABSTRACT METHOD. You'll need to write your custom implementation.
You'll need to init your custom AbstractDocument initWithDictionary method to write your custom entity.
|
readwritenonatomicretain |
The backend that will handle all the HTTP operations.
|
readwritenonatomicretain |
The path for your custom entity.
|
readwritenonatomicretain |
The server url.
1.8.7