APConnection Class Reference
Inherits from | NSObject |
Declared in | APConnection.h |
Overview
A Connection is represents an edge in a graph and is used to connect two APObjects. A Connection itself can store data in its properties and attributes fields.
Tasks
Other Methods
-
createdBy
property -
articleAId
property -
articleBId
property -
objectId
property -
labelA
property -
labelB
property -
relationId
property -
relationType
property -
lastModifiedBy
property -
utcDateCreated
property -
utcLastModifiedDate
property -
revision
property -
properties
property -
attributes
property -
tags
property
Getting the APConnection
-
+ connectionWithRelationType:
Initialize and return an APConnection for the provided relation type.
-
– initWithRelationType:
Initialize and return an APConnection for the provided relation type.
Searching for APConnections
-
+ searchForAllConnectionsWithRelationType:successHandler:
searchForAllConnectionsWithRelationType:successHandler:failureHandler:
-
+ searchForAllConnectionsWithRelationType:successHandler:failureHandler:
Search for all APConnections of a particular relation type.
-
+ searchForConnectionsWithRelationType:withQueryString:successHandler:
searchForConnectionsWithRelationType:withQueryString:successHandler:failureHandler:
-
+ searchForConnectionsWithRelationType:withQueryString:successHandler:failureHandler:
Searches for APConnections and filters the result according to the query provided.
Create APConnections
-
– create
-
– createConnectionWithFailureHandler:
-
– createConnectionWithSuccessHandler:failureHandler:
Create an APConnection between two APObjects on the remote server.
-
– createConnectionWithObjectA:objectB:
createConnectionWithObjectA:objectB:successHandler:failureHandler:
-
– createConnectionWithObjectA:objectB:failureHandler:
createConnectionWithObjectA:objectB:successHandler:failureHandler:
-
– createConnectionWithObjectA:objectB:successHandler:failureHandler:
Creates an APConnection between two APObjects.
-
– createConnectionWithObjectA:objectB:labelA:labelB:
createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
-
– createConnectionWithObjectA:objectB:labelA:labelB:failureHandler:
createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
-
– createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
Creates an APConnection between two APObjects. The labels on either side of the connection are specified as parameters.
-
– createConnectionWithObjectAId:objectBId:labelA:labelB:
createConnectionWithObjectAId:objectBId:labelA:labelB:successHandler:failureHandler:
-
– createConnectionWithObjectAId:objectBId:labelA:labelB:failureHandler:
createConnectionWithObjectAId:objectBId:labelA:labelB:successHandler:failureHandler:
-
– createConnectionWithObjectAId:objectBId:labelA:labelB:successHandler:failureHandler:
Creates an APConnection between two APObjects.
Fetch APConnections
-
+ fetchConnectionWithRelationType:objectId:successHandler:
fetchConnectionWithRelationType:objectId:successHandler:failureHandler:
-
+ fetchConnectionWithRelationType:objectId:successHandler:failureHandler:
Fetch an APConnection of a particular relation type.
-
+ fetchConnectionsWithRelationType:objectIds:successHandler:
fetchConnectionsWithRelationType:objectId:successHandler:failureHandler:
-
+ fetchConnectionsWithRelationType:objectIds:successHandler:failureHandler:
Fetches multiple APConnections from the remote server.
Delete APConnections
-
+ deleteConnectionsWithRelationType:objectIds:
deleteConnectionsWithRelationType:objectIds:successHandler:failureHandler:
-
+ deleteConnectionsWithRelationType:objectIds:failureHandler:
deleteConnectionsWithRelationType:objectIds:successHandler:failureHandler:
-
+ deleteConnectionsWithRelationType:objectIds:successHandler:failureHandler:
Deletes multiple APConnections.
-
– deleteConnection
-
– deleteConnectionWithFailureHandler:
-
– deleteConnectionWithSuccessHandler:failureHandler:
Deletes an APConnection.
Methods to store key-value pairs
-
– addPropertyWithKey:value:
Method used to add a property to the APObject.
-
– addAttributeWithKey:value:
Method used to add an attibute to the APObject. Attributes are used to store extra information.
Class Methods
connectionWithRelationType:
Initialize and return an APConnection for the provided relation type.
+ (id)connectionWithRelationType:(NSString *)relationType
Parameters
- relationType
The name of the relation. This is specified while creating the schema.
Discussion
Initialize and return an APConnection for the provided relation type.
Declared In
APConnection.h
deleteConnectionsWithRelationType:objectIds:
+ (void)deleteConnectionsWithRelationType:(NSString *)relationType objectIds:(NSArray *)objectIds
Declared In
APConnection.h
deleteConnectionsWithRelationType:objectIds:failureHandler:
+ (void)deleteConnectionsWithRelationType:(NSString *)relationType objectIds:(NSArray *)objectIds failureHandler:(APFailureBlock)failureBlock
Declared In
APConnection.h
deleteConnectionsWithRelationType:objectIds:successHandler:failureHandler:
Deletes multiple APConnections.
+ (void)deleteConnectionsWithRelationType:(NSString *)relationType objectIds:(NSArray *)objectIds successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- relationType
The name of the relation. Connections of this relation name will be deleted.
- objectIds
An array of objectIds. APConnections having these object ids will be deleted.
- successBlock
Block invoked when the delete call is successful.
- failureBlock
Block invoked when the delete call fails.
Discussion
Deletes multiple APConnections.
Declared In
APConnection.h
fetchConnectionWithRelationType:objectId:successHandler:
+ (void)fetchConnectionWithRelationType:(NSString *)relationType objectId:(NSNumber *)objectId successHandler:(APResultSuccessBlock)successBlock
Declared In
APConnection.h
fetchConnectionWithRelationType:objectId:successHandler:failureHandler:
Fetch an APConnection of a particular relation type.
+ (void)fetchConnectionWithRelationType:(NSString *)relationType objectId:(NSNumber *)objectId successHandler:(APResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- relationType
The name of the relation. A connection of this relation name is retrieved.
- objectId
The id of the connection to retrieve.
- successBlock
Block invoked when the fetch call is successful. The block returns the results in the form of a JSON.
- failureBlock
Block invoked when the fetch call operation fails.
Discussion
Fetch an APConnection of a particular relation type.
Declared In
APConnection.h
fetchConnectionsWithRelationType:objectIds:successHandler:
fetchConnectionsWithRelationType:objectId:successHandler:failureHandler:
+ (void)fetchConnectionsWithRelationType:(NSString *)relationType objectIds:(NSArray *)objectIds successHandler:(APResultSuccessBlock)successBlock
Declared In
APConnection.h
fetchConnectionsWithRelationType:objectIds:successHandler:failureHandler:
Fetches multiple APConnections from the remote server.
+ (void)fetchConnectionsWithRelationType:(NSString *)relationType objectIds:(NSArray *)objectIds successHandler:(APResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- relationType
The name of the relation. Connections of this relation are retrieved.
- objectIds
An array of objectIds. Connections with these object ids are fetched.
- successBlock
Block invoked when the fetch call is successful. The block returns the results in the form of a JSON.
- failureBlock
Block invoked when the fetch call operation fails.
Discussion
Fetches multiple APConnections from the remote server.
Declared In
APConnection.h
searchForAllConnectionsWithRelationType:successHandler:
+ (void)searchForAllConnectionsWithRelationType:(NSString *)relationType successHandler:(APResultSuccessBlock)successBlock
Declared In
APConnection.h
searchForAllConnectionsWithRelationType:successHandler:failureHandler:
Search for all APConnections of a particular relation type.
+ (void)searchForAllConnectionsWithRelationType:(NSString *)relationType successHandler:(APResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- relationType
The relation type that the connections should belong to.
- successBlock
Block invoked when the search call is successful.
- failureBlock
Block invoked when the search call fails.
Discussion
Search for all APConnections of a particular relation type.
Declared In
APConnection.h
searchForConnectionsWithRelationType:withQueryString:successHandler:
+ (void)searchForConnectionsWithRelationType:(NSString *)relationType withQueryString:(NSString *)queryString successHandler:(APResultSuccessBlock)successBlock
Declared In
APConnection.h
searchForConnectionsWithRelationType:withQueryString:successHandler:failureHandler:
Searches for APConnections and filters the result according to the query provided.
+ (void)searchForConnectionsWithRelationType:(NSString *)relationType withQueryString:(NSString *)queryString successHandler:(APResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- relationType
The relation type that the connections should belong to.
- queryString
SQL kind of query to search for specific objects. For more info http://appacitive.com
- successBlock
Block invoked when the search call is successful.
- failureBlock
Block invoked when the search call fails.
Discussion
Searches for APConnections and filters the result according to the query provided.
Declared In
APConnection.h
Instance Methods
addAttributeWithKey:value:
Method used to add an attibute to the APObject. Attributes are used to store extra information.
- (void)addAttributeWithKey:(NSString *)keyName value:(id)object
Parameters
- keyName
key of the data item to be stored.
- object
Corresponding value to the key.
Discussion
Method used to add an attibute to the APObject. Attributes are used to store extra information.
Declared In
APConnection.h
addPropertyWithKey:value:
Method used to add a property to the APObject.
- (void)addPropertyWithKey:(NSString *)keyName value:(id)object
Parameters
- keyName
key of the data item to be stored.
- object
Corresponding value to the key.
Discussion
Method used to add a property to the APObject.
Declared In
APConnection.h
createConnectionWithFailureHandler:
- (void)createConnectionWithFailureHandler:(APFailureBlock)failureBlock
Declared In
APConnection.h
createConnectionWithObjectA:objectB:
- (void)createConnectionWithObjectA:(APObject *)objectA objectB:(APObject *)objectB
Declared In
APConnection.h
createConnectionWithObjectA:objectB:failureHandler:
- (void)createConnectionWithObjectA:(APObject *)objectA objectB:(APObject *)objectB failureHandler:(APFailureBlock)failureBlock
Declared In
APConnection.h
createConnectionWithObjectA:objectB:labelA:labelB:
- (void)createConnectionWithObjectA:(APObject *)objectA objectB:(APObject *)objectB labelA:(NSString *)labelA labelB:(NSString *)labelB
Declared In
APConnection.h
createConnectionWithObjectA:objectB:labelA:labelB:failureHandler:
- (void)createConnectionWithObjectA:(APObject *)objectA objectB:(APObject *)objectB labelA:(NSString *)labelA labelB:(NSString *)labelB failureHandler:(APFailureBlock)failureBlock
Declared In
APConnection.h
createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
Creates an APConnection between two APObjects. The labels on either side of the connection are specified as parameters.
- (void)createConnectionWithObjectA:(APObject *)objectA objectB:(APObject *)objectB labelA:(NSString *)labelA labelB:(NSString *)labelB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- objectA
The article to create a connection from.
- objectB
The article to create a connection to.
- labelA
The label at the starting vertex of the connection.
- successBlock
Block invoked when the create operation is successful.
- failureBlock
Block invoked when the create operation fails.
- lablelB
The label at the end vertex of the connection.
Discussion
Creates an APConnection between two APObjects. The labels on either side of the connection are specified as parameters.
Declared In
APConnection.h
createConnectionWithObjectA:objectB:successHandler:failureHandler:
Creates an APConnection between two APObjects.
- (void)createConnectionWithObjectA:(APObject *)objectA objectB:(APObject *)objectB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- objectA
The article to create a connection from.
- objectB
The article to create a connection to.
- successBlock
Block invoked when the create operation is successful.
- failureBlock
Block invoked when the create operation fails.
Discussion
Creates an APConnection between two APObjects.
This method will set labelA and labelB as the schemaName of objectA and objectB.
Declared In
APConnection.h
createConnectionWithObjectAId:objectBId:labelA:labelB:
- (void)createConnectionWithObjectAId:(NSNumber *)objectAId objectBId:(NSNumber *)objectBId labelA:(NSString *)labelA labelB:(NSString *)labelB
Declared In
APConnection.h
createConnectionWithObjectAId:objectBId:labelA:labelB:failureHandler:
- (void)createConnectionWithObjectAId:(NSNumber *)objectAId objectBId:(NSNumber *)objectBId labelA:(NSString *)labelA labelB:(NSString *)labelB failureHandler:(APFailureBlock)failureBlock
Declared In
APConnection.h
createConnectionWithObjectAId:objectBId:labelA:labelB:successHandler:failureHandler:
Creates an APConnection between two APObjects.
- (void)createConnectionWithObjectAId:(NSNumber *)objectAId objectBId:(NSNumber *)objectBId labelA:(NSString *)labelA labelB:(NSString *)labelB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- labelA
The label at the starting vertex of the connection.
- labelB
The label at the end vertex of the connection.
- failureHandler
Block invoked when the create operation fails.
- successHandler
Block invoked when the create operation is successful.
Discussion
Creates an APConnection between two APObjects.
Declared In
APConnection.h
createConnectionWithSuccessHandler:failureHandler:
Create an APConnection between two APObjects on the remote server.
- (void)createConnectionWithSuccessHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- successBlock
Block invoked when the create operation is successful.
- failureBlock
Block invoked when the create operation fails.
Discussion
Create an APConnection between two APObjects on the remote server.
This method requires the articleAId, articleBId, labelA and labelB properties to be set.
Declared In
APConnection.h
deleteConnectionWithFailureHandler:
- (void)deleteConnectionWithFailureHandler:(APFailureBlock)failureBlock
Declared In
APConnection.h
deleteConnectionWithSuccessHandler:failureHandler:
Deletes an APConnection.
- (void)deleteConnectionWithSuccessHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock
Parameters
- successBlock
Block invoked when delete is successful.
- failureBlock
Block invoked when delete fails.
Declared In
APConnection.h
initWithRelationType:
Initialize and return an APConnection for the provided relation type.
- (id)initWithRelationType:(NSString *)relationType
Parameters
- relationType
The name of the relation. This is specified while creating the schema.
Discussion
Initialize and return an APConnection for the provided relation type.
Declared In
APConnection.h