package com.appstax.android;

import com.appstax.AxObject;
import com.appstax.AxUser;

import java.util.List;
import java.util.Map;

public abstract class Appstax extends com.appstax.Ax {

    public static void save(final AxObject object, final Callback<AxObject> callback) {
        new Request<AxObject>(callback) {
            protected AxObject run() {
                return com.appstax.Ax.save(object);
            }
        };
    }

    public static void remove(final AxObject object, final Callback<AxObject> callback) {
        new Request<AxObject>(callback) {
            protected AxObject run() {
                return com.appstax.Ax.remove(object);
            }
        };
    }

    public static void refresh(final AxObject object, final Callback<AxObject> callback) {
        new Request<AxObject>(callback) {
            protected AxObject run() {
                return com.appstax.Ax.refresh(object);
            }
        };
    }

    public static void find(final String collection, final String id, final Callback<AxObject> callback) {
        new Request<AxObject>(callback) {
            protected AxObject run() {
                return com.appstax.Ax.find(collection, id);
            }
        };
    }

    public static void find(final String collection, final Callback<List<AxObject>> callback) {
        new Request<List<AxObject>>(callback) {
            protected List<AxObject> run() {
                return com.appstax.Ax.find(collection);
            }
        };
    }

    public static void filter(final String collection, final String filter, final Callback<List<AxObject>> callback) {
        new Request<List<AxObject>>(callback) {
            protected List<AxObject> run() {
                return com.appstax.Ax.filter(collection, filter);
            }
        };
    }

    public static void filter(final String collection, final Map<String, String> properties, final Callback<List<AxObject>> callback) {
        new Request<List<AxObject>>(callback) {
            protected List<AxObject> run() {
                return com.appstax.Ax.filter(collection, properties);
            }
        };
    }

    public static void signup(final String username, final String password, final Callback<AxUser> callback) {
        new Request<AxUser>(callback) {
            protected AxUser run() {
                return com.appstax.Ax.signup(username, password);
            }
        };
    }

    public static void login(final String username, final String password, final Callback<AxUser> callback) {
        new Request<AxUser>(callback) {
            protected AxUser run() {
                return com.appstax.Ax.login(username, password);
            }
        };
    }

    public static void logout(final Callback<Void> callback) {
        new Request<Void>(callback) {
            protected Void run() {
                com.appstax.Ax.logout();
                return null;
            }
        };
    }

    public static void save(final AxUser user, final Callback<AxUser> callback) {
        new Request<AxUser>(callback) {
            protected AxUser run() {
                return com.appstax.Ax.save(user);
            }
        };
    }

    public static void refresh(final AxUser user, final Callback<AxUser> callback) {
        new Request<AxUser>(callback) {
            protected AxUser run() {
                return com.appstax.Ax.refresh(user);
            }
        };
    }

}

@@ -23,16 +23,39 @@
 droid;%0A%0A
+import com.appstax.Ax;%0A
 import c
@@ -75,16 +75,16 @@
 Object;%0A
-
 import c
@@ -187,28 +187,16 @@
 extends 
-com.appstax.
 Ax %7B%0A%0A  
@@ -381,36 +381,24 @@
      return 
-com.appstax.
 Ax.save(obje
@@ -624,36 +624,24 @@
      return 
-com.appstax.
 Ax.remove(ob
@@ -870,36 +870,24 @@
      return 
-com.appstax.
 Ax.refresh(o
@@ -1133,36 +1133,24 @@
      return 
-com.appstax.
 Ax.find(coll
@@ -1402,36 +1402,24 @@
      return 
-com.appstax.
 Ax.find(coll
@@ -1690,36 +1690,24 @@
      return 
-com.appstax.
 Ax.filter(co
@@ -2009,28 +2009,16 @@
  return 
-com.appstax.
 Ax.filte
@@ -2283,36 +2283,24 @@
      return 
-com.appstax.
 Ax.signup(us
@@ -2560,28 +2560,16 @@
  return 
-com.appstax.
 Ax.login
@@ -2774,28 +2774,16 @@
         
-com.appstax.
 Ax.logou
@@ -3030,28 +3030,16 @@
  return 
-com.appstax.
 Ax.save(
@@ -3231,32 +3231,32 @@
  AxUser run() %7B%0A
+
                 
@@ -3262,28 +3262,16 @@
  return 
-com.appstax.
 Ax.refre

Fix import