// Path: crmsdk2015/src/main/java/com/microsoft/xrm/sdk/Client/QueryOptions.java
// public class QueryOptions {
// 
//     private HashMap<String, String> queries = new HashMap<>();
// 
//     public QueryOptions() {
// 
//     }
// 
//     public static QueryOptions build() {
//         return new QueryOptions();
//     }
// 
//     HashMap<String, String> getQueryMap() {
//         return this.queries;
//     }
// 
//     public QueryOptions putExpand(String expand) {
//         queries.put("$expand", expand);
//         return this;
//     }
// 
//     public QueryOptions putFilter(String filter) {
//         queries.put("$filter", filter);
//         return this;
//     }
// 
//     public QueryOptions putOrderBy(String orderby) {
//         queries.put("$orderby", orderby);
//         return this;
//     }
// 
//     public QueryOptions putSelect(String select) {
//         queries.put("$select", select);
//         return this;
//     }
// 
//     public QueryOptions putSelect(String... select) {
//         StringBuilder stringBuilder = new StringBuilder();
//         for (String column : select) {
//             if (stringBuilder.length() > 0) {
//                 stringBuilder.append(',');
//             }
//             stringBuilder.append(column);
//         }
//         queries.put("$select", stringBuilder.toString());
//         return this;
//     }
// 
//     public QueryOptions putSkip(String skip) {
//         queries.put("$skip", skip);
//         return this;
//     }
// 
//     public QueryOptions putTop(String top) {
//         queries.put("$top", top);
//         return this;
//     }
// }


import rx.Observable;
import android.support.annotation.NonNull;
import com.microsoft.xrm.sdk.Client.QueryOptions;
import java.util.UUID;
package com.microsoft.xrm.sdk;





public interface RestOrganizationService {

    /**
     * Creates a record.
     * @param entity An entity instance that contains the properties to set in the newly created record.
     *               must be a subclass of entity to use this method.
     */
    Observable<UUID> Create(Entity entity);

    void Create(Entity entity, Callback<UUID> callback);

    Observable<UUID> Create(Entity relatedTo, Entity create, String relationshipName);

    void Create(Entity relatedTo, Entity create, String relationshipName, Callback<UUID> callback);

    Observable<UUID> Create(String relatedToSchemaName, UUID relatedToId, Entity create, String relationshipName);

    void Create(String relatedToSchemaName, UUID relatedToId, Entity create, String relationshipName,
                          Callback<UUID> callback);

    Observable<?> Delete(String entitySchemaName, UUID id);

    void Delete(String entitySchemaName, UUID id, Callback<?> callback);

//    Observable<Entity> Retrieve(String entitySchemaName, UUID id, @NonNull QueryOptions queryOptions);
//
//    void Retrieve(String entitySchemaName, UUID id, @NonNull QueryOptions queryOptions, Callback<Entity> callback);

// Path: crmsdk2015/src/main/java/com/microsoft/xrm/sdk/Client/QueryOptions.java
// public class QueryOptions {
// 
//     private HashMap<String, String> queries = new HashMap<>();
// 
//     public QueryOptions() {
// 
//     }
// 
//     public static QueryOptions build() {
//         return new QueryOptions();
//     }
// 
//     HashMap<String, String> getQueryMap() {
//         return this.queries;
//     }
// 
//     public QueryOptions putExpand(String expand) {
//         queries.put("$expand", expand);
//         return this;
//     }
// 
//     public QueryOptions putFilter(String filter) {
//         queries.put("$filter", filter);
//         return this;
//     }
// 
//     public QueryOptions putOrderBy(String orderby) {
//         queries.put("$orderby", orderby);
//         return this;
//     }
// 
//     public QueryOptions putSelect(String select) {
//         queries.put("$select", select);
//         return this;
//     }
// 
//     public QueryOptions putSelect(String... select) {
//         StringBuilder stringBuilder = new StringBuilder();
//         for (String column : select) {
//             if (stringBuilder.length() > 0) {
//                 stringBuilder.append(',');
//             }
//             stringBuilder.append(column);
//         }
//         queries.put("$select", stringBuilder.toString());
//         return this;
//     }
// 
//     public QueryOptions putSkip(String skip) {
//         queries.put("$skip", skip);
//         return this;
//     }
// 
//     public QueryOptions putTop(String top) {
//         queries.put("$top", top);
//         return this;
//     }
// }


// Path: crmsdk2015/src/main/java/com/microsoft/xrm/sdk/RestOrganizationService.java
import rx.Observable;
import android.support.annotation.NonNull;
import com.microsoft.xrm.sdk.Client.QueryOptions;
import java.util.UUID;

package com.microsoft.xrm.sdk;





public interface RestOrganizationService {

    /**
     * Creates a record.
     * @param entity An entity instance that contains the properties to set in the newly created record.
     *               must be a subclass of entity to use this method.
     */
    Observable<UUID> Create(Entity entity);

    void Create(Entity entity, Callback<UUID> callback);

    Observable<UUID> Create(Entity relatedTo, Entity create, String relationshipName);

    void Create(Entity relatedTo, Entity create, String relationshipName, Callback<UUID> callback);

    Observable<UUID> Create(String relatedToSchemaName, UUID relatedToId, Entity create, String relationshipName);

    void Create(String relatedToSchemaName, UUID relatedToId, Entity create, String relationshipName,
                          Callback<UUID> callback);

    Observable<?> Delete(String entitySchemaName, UUID id);

    void Delete(String entitySchemaName, UUID id, Callback<?> callback);

//    Observable<Entity> Retrieve(String entitySchemaName, UUID id, @NonNull QueryOptions queryOptions);
//
//    void Retrieve(String entitySchemaName, UUID id, @NonNull QueryOptions queryOptions, Callback<Entity> callback);

    Observable<EntityCollection> RetrieveMultiple(String entitySchemaName, UUID id, String relationshipName, @NonNull QueryOptions queryOptions);