public void buildOwnershipInsert(
     CapsuleOwnership ownership, boolean withYield, CapsuleContract.SyncStateAction syncAction) {
   // Build the URI
   Uri uri =
       CapsuleOperations.appendDirtyQueryParam(syncAction, CapsuleContract.Ownerships.CONTENT_URI);
   // Build the INSERT operation
   ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
   builder.withValues(Ownerships.buildContentValues(ownership));
   builder.withYieldAllowed(withYield);
   // Add it to the collection
   this.mOperations.add(builder.build());
 }
 public void buildDiscoveryUpdate(
     CapsuleDiscovery discovery, boolean withYield, CapsuleContract.SyncStateAction syncAction) {
   // Build the URI
   Uri uri =
       CapsuleOperations.appendDirtyQueryParam(
           syncAction,
           ContentUris.withAppendedId(
               CapsuleContract.Discoveries.CONTENT_URI, discovery.getDiscoveryId()));
   // Build the UPDATE operation
   ContentProviderOperation.Builder builder = ContentProviderOperation.newUpdate(uri);
   builder.withValues(Discoveries.buildContentValues(discovery));
   builder.withYieldAllowed(withYield);
   // Add it to the collection
   this.mOperations.add(builder.build());
 }
 public void buildOwnershipInsert(
     CapsuleOwnership ownership,
     boolean withYield,
     int capsuleIdBackRefIndex,
     CapsuleContract.SyncStateAction syncAction) {
   // Build the URI
   Uri uri =
       CapsuleOperations.appendDirtyQueryParam(syncAction, CapsuleContract.Ownerships.CONTENT_URI);
   // Build the INSERT operation
   ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
   builder.withValues(Ownerships.buildContentValues(ownership));
   builder.withYieldAllowed(withYield);
   // Add the back value reference index for the Capsule ID
   if (capsuleIdBackRefIndex >= 0) {
     builder.withValueBackReference(CapsuleContract.Ownerships.CAPSULE_ID, capsuleIdBackRefIndex);
   }
   // Add it to the collection
   this.mOperations.add(builder.build());
 }
 public void buildDiscoveryUpdate(
     CapsuleDiscovery discovery,
     boolean withYield,
     int capsuleIdBackRefIndex,
     CapsuleContract.SyncStateAction syncAction) {
   // Build the URI
   Uri uri =
       CapsuleOperations.appendDirtyQueryParam(
           syncAction,
           ContentUris.withAppendedId(
               CapsuleContract.Discoveries.CONTENT_URI, discovery.getDiscoveryId()));
   // Build the UPDATE operation
   ContentProviderOperation.Builder builder = ContentProviderOperation.newUpdate(uri);
   builder.withValues(Discoveries.buildContentValues(discovery));
   builder.withYieldAllowed(withYield);
   // Add the back value reference for the Capsule ID
   if (capsuleIdBackRefIndex >= 0) {
     builder.withValueBackReference(CapsuleContract.Discoveries.CAPSULE_ID, capsuleIdBackRefIndex);
   }
   // Add it to the collection
   this.mOperations.add(builder.build());
 }