package com.worklight.jsonstore.api;

import android.database.Cursor;
import com.worklight.jsonstore.database.DatabaseAccessor;
import com.worklight.jsonstore.database.DatabaseManager;
import com.worklight.jsonstore.database.DatabaseSchema;
import com.worklight.jsonstore.database.QueryBuilder;
import com.worklight.jsonstore.database.SearchFieldType;
import com.worklight.jsonstore.database.WritableDatabase;
import com.worklight.jsonstore.exceptions.JSONStoreAddException;
import com.worklight.jsonstore.exceptions.JSONStoreChangeException;
import com.worklight.jsonstore.exceptions.JSONStoreCountException;
import com.worklight.jsonstore.exceptions.JSONStoreDatabaseClosedException;
import com.worklight.jsonstore.exceptions.JSONStoreDirtyCheckException;
import com.worklight.jsonstore.exceptions.JSONStoreException;
import com.worklight.jsonstore.exceptions.JSONStoreFilterException;
import com.worklight.jsonstore.exceptions.JSONStoreFindException;
import com.worklight.jsonstore.exceptions.JSONStoreInvalidSchemaException;
import com.worklight.jsonstore.exceptions.JSONStoreMarkCleanException;
import com.worklight.jsonstore.exceptions.JSONStoreRemoveCollectionException;
import com.worklight.jsonstore.exceptions.JSONStoreRemoveException;
import com.worklight.jsonstore.exceptions.JSONStoreReplaceException;
import com.worklight.jsonstore.exceptions.JSONStoreTransactionFailureException;
import com.worklight.jsonstore.util.JSONStoreLogger;
import com.worklight.jsonstore.util.JSONStoreLogger.JSONStoreAnalyticsLogInstance;
import com.worklight.jsonstore.util.JSONStoreUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import net.sqlcipher.database.SQLiteDatabase;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class JSONStoreCollection
{
  private static final int FIND_BY_ID_CHUNK_SIZE = 200;
  private Map<String, SearchFieldType> additionalSearchFields = new HashMap();
  private WLJSONStore initializedJSONStoreInstance;
  private JSONStoreLogger logger = JSONStoreUtil.getCoreLogger();
  private String name;
  private DatabaseSchema schema;
  private Map<String, SearchFieldType> searchFields = new HashMap();
  private boolean wasReopened;

  public JSONStoreCollection(String paramString)
    throws JSONStoreInvalidSchemaException
  {
    if ((paramString == null) || (paramString.isEmpty()))
    {
      JSONStoreInvalidSchemaException localJSONStoreInvalidSchemaException = new JSONStoreInvalidSchemaException("Error when creating the collection. Collection name cannot be null.");
      this.logger.logError("Error when creating the collection. Collection name cannot be null.", localJSONStoreInvalidSchemaException);
      throw localJSONStoreInvalidSchemaException;
    }
    this.name = paramString;
  }

  private void addNonDuplicates(LinkedHashMap<Integer, JSONObject> paramLinkedHashMap, List<JSONObject> paramList)
    throws JSONStoreFindException
  {
    if (paramList != null)
      try
      {
        Iterator localIterator = paramList.iterator();
        while (localIterator.hasNext())
        {
          JSONObject localJSONObject = (JSONObject)localIterator.next();
          Integer localInteger = Integer.valueOf(localJSONObject.getInt("_id"));
          if (!paramLinkedHashMap.containsKey(localInteger))
            paramLinkedHashMap.put(localInteger, localJSONObject);
        }
      }
      catch (JSONException localJSONException)
      {
        JSONStoreFindException localJSONStoreFindException = new JSONStoreFindException("Error when attempting to find a document. A JSONException occurred.", localJSONException);
        this.logger.logError("Error when attempting to find a document. A JSONException occurred.", localJSONStoreFindException);
        throw localJSONStoreFindException;
      }
  }

  private DatabaseAccessor getAccessor()
    throws JSONStoreDatabaseClosedException
  {
    if (this.initializedJSONStoreInstance == null)
    {
      JSONStoreDatabaseClosedException localJSONStoreDatabaseClosedException1 = new JSONStoreDatabaseClosedException("Collection is not initialized.");
      this.logger.logError("Collection is not initialized.", localJSONStoreDatabaseClosedException1);
      throw localJSONStoreDatabaseClosedException1;
    }
    DatabaseManager localDatabaseManager = DatabaseManager.getInstance();
    if ((localDatabaseManager == null) || (!localDatabaseManager.isDatabaseOpen()))
    {
      JSONStoreDatabaseClosedException localJSONStoreDatabaseClosedException2 = new JSONStoreDatabaseClosedException("Database manager is null or database not opened.");
      this.logger.logError("Database manager is null or database not opened.", localJSONStoreDatabaseClosedException2);
      throw localJSONStoreDatabaseClosedException2;
    }
    DatabaseAccessor localDatabaseAccessor;
    try
    {
      localDatabaseAccessor = localDatabaseManager.getDatabase(getName());
      if (localDatabaseAccessor == null)
      {
        JSONStoreDatabaseClosedException localJSONStoreDatabaseClosedException4 = new JSONStoreDatabaseClosedException("Database accessor is not open. The database is not open.");
        this.logger.logError("Database accessor is not open. The database is not open.", localJSONStoreDatabaseClosedException4);
        throw localJSONStoreDatabaseClosedException4;
      }
    }
    catch (Exception localException)
    {
      JSONStoreDatabaseClosedException localJSONStoreDatabaseClosedException3 = new JSONStoreDatabaseClosedException("Could not get database accessor. Database is not open.");
      this.logger.logError("Could not get database accessor. Database is not open.", localJSONStoreDatabaseClosedException3);
      throw localJSONStoreDatabaseClosedException3;
    }
    SQLiteDatabase localSQLiteDatabase = localDatabaseAccessor.getRawDatabase();
    if ((localSQLiteDatabase == null) || (!localSQLiteDatabase.isOpen()))
    {
      JSONStoreDatabaseClosedException localJSONStoreDatabaseClosedException5 = new JSONStoreDatabaseClosedException("Could not get raw collection instance. The database is not open.");
      this.logger.logError("Could not get raw collection instance. The database is not open.", localJSONStoreDatabaseClosedException5);
      throw localJSONStoreDatabaseClosedException5;
    }
    return localDatabaseAccessor;
  }

  private String getUsername()
  {
    if (this.initializedJSONStoreInstance != null)
      return this.initializedJSONStoreInstance.getUsername();
    return "";
  }

  private boolean isJSONCreatedColumn(String paramString)
  {
    return (paramString.equals("_deleted")) || (paramString.equals("_dirty")) || (paramString.equals("_id")) || (paramString.equals("json")) || (paramString.equals("_operation"));
  }

  private List<JSONObject> removeFilterDuplicates(List<JSONObject> paramList)
  {
    ArrayList localArrayList = new ArrayList();
    HashMap localHashMap = new HashMap();
    Iterator localIterator = paramList.iterator();
    while (localIterator.hasNext())
    {
      JSONObject localJSONObject = (JSONObject)localIterator.next();
      if (!localHashMap.containsKey(localJSONObject.toString()))
      {
        localHashMap.put(localJSONObject.toString(), Boolean.valueOf(true));
        localArrayList.add(localJSONObject);
      }
    }
    return localArrayList;
  }

  private Cursor runQuery(QueryBuilder paramQueryBuilder)
    throws JSONStoreDatabaseClosedException
  {
    if (paramQueryBuilder == null)
      return null;
    DatabaseAccessor localDatabaseAccessor = getAccessor();
    StringBuilder localStringBuilder = new StringBuilder();
    LinkedList localLinkedList = new LinkedList();
    paramQueryBuilder.convertToQueryString(localStringBuilder, localLinkedList);
    String[] arrayOfString = (String[])localLinkedList.toArray(new String[localLinkedList.size()]);
    return localDatabaseAccessor.getRawDatabase().rawQuery(localStringBuilder.toString(), arrayOfString);
  }

  public void addData(List<JSONObject> paramList)
    throws JSONStoreAddException, JSONStoreDatabaseClosedException
  {
    addData(paramList, null);
  }

  // ERROR //
  public void addData(List<JSONObject> paramList, JSONStoreAddOptions paramJSONStoreAddOptions)
    throws JSONStoreAddException, JSONStoreDatabaseClosedException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 236	com/worklight/jsonstore/api/JSONStoreCollection:getUsername	()Ljava/lang/String;
    //   4: aload_0
    //   5: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   8: getstatic 239	com/worklight/jsonstore/util/JSONStoreLogger:OPERATION_ADD	Ljava/lang/String;
    //   11: invokestatic 243	com/worklight/jsonstore/util/JSONStoreLogger:startAnalyticsInstance	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance;
    //   14: astore_3
    //   15: aload_2
    //   16: ifnonnull +11 -> 27
    //   19: new 245	com/worklight/jsonstore/api/JSONStoreAddOptions
    //   22: dup
    //   23: invokespecial 246	com/worklight/jsonstore/api/JSONStoreAddOptions:<init>	()V
    //   26: astore_2
    //   27: aload_1
    //   28: ifnull +16 -> 44
    //   31: aload_1
    //   32: invokeinterface 215 1 0
    //   37: istore 5
    //   39: iload 5
    //   41: ifgt +8 -> 49
    //   44: aload_3
    //   45: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   48: return
    //   49: aload_0
    //   50: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   53: astore 6
    //   55: aload_0
    //   56: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   59: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   62: ifne +13 -> 75
    //   65: aload 6
    //   67: invokeinterface 150 1 0
    //   72: invokevirtual 257	net/sqlcipher/database/SQLiteDatabase:beginTransaction	()V
    //   75: aload_1
    //   76: invokeinterface 73 1 0
    //   81: astore 8
    //   83: aload 8
    //   85: invokeinterface 78 1 0
    //   90: ifeq +367 -> 457
    //   93: aload 8
    //   95: invokeinterface 82 1 0
    //   100: checkcast 84	org/json/JSONObject
    //   103: astore 9
    //   105: aload 9
    //   107: ifnull -24 -> 83
    //   110: aload_0
    //   111: getfield 259	com/worklight/jsonstore/api/JSONStoreCollection:schema	Lcom/worklight/jsonstore/database/DatabaseSchema;
    //   114: aload 9
    //   116: aload_2
    //   117: invokevirtual 263	com/worklight/jsonstore/api/JSONStoreAddOptions:getAdditionalSearchFieldsAsJSON	()Lorg/json/JSONObject;
    //   120: invokevirtual 269	com/worklight/jsonstore/database/DatabaseSchema:mapObject	(Lorg/json/JSONObject;Lorg/json/JSONObject;)Ljava/util/Map;
    //   123: astore 12
    //   125: aload 12
    //   127: ldc 175
    //   129: aload 9
    //   131: invokevirtual 185	org/json/JSONObject:toString	()Ljava/lang/String;
    //   134: invokeinterface 272 3 0
    //   139: pop
    //   140: aload_2
    //   141: invokevirtual 275	com/worklight/jsonstore/api/JSONStoreAddOptions:isMarkDirty	()Z
    //   144: ifeq +232 -> 376
    //   147: aload 12
    //   149: ldc 173
    //   151: new 277	java/util/Date
    //   154: dup
    //   155: invokespecial 278	java/util/Date:<init>	()V
    //   158: invokevirtual 282	java/util/Date:getTime	()J
    //   161: invokestatic 287	java/lang/Long:valueOf	(J)Ljava/lang/Long;
    //   164: invokeinterface 272 3 0
    //   169: pop
    //   170: aload 12
    //   172: ldc 177
    //   174: ldc_w 288
    //   177: invokeinterface 272 3 0
    //   182: pop
    //   183: new 290	android/content/ContentValues
    //   186: dup
    //   187: invokespecial 291	android/content/ContentValues:<init>	()V
    //   190: astore 16
    //   192: aload 12
    //   194: invokeinterface 295 1 0
    //   199: invokeinterface 298 1 0
    //   204: astore 17
    //   206: aload 17
    //   208: invokeinterface 78 1 0
    //   213: ifeq +193 -> 406
    //   216: aload 17
    //   218: invokeinterface 82 1 0
    //   223: checkcast 45	java/lang/String
    //   226: astore 19
    //   228: aload 12
    //   230: aload 19
    //   232: invokeinterface 302 2 0
    //   237: astore 20
    //   239: aload 20
    //   241: instanceof 188
    //   244: ifeq +24 -> 268
    //   247: aload 20
    //   249: checkcast 188	java/lang/Boolean
    //   252: invokevirtual 305	java/lang/Boolean:booleanValue	()Z
    //   255: ifeq +247 -> 502
    //   258: iconst_1
    //   259: istore 21
    //   261: iload 21
    //   263: invokestatic 96	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   266: astore 20
    //   268: aload 16
    //   270: new 201	java/lang/StringBuilder
    //   273: dup
    //   274: invokespecial 202	java/lang/StringBuilder:<init>	()V
    //   277: ldc_w 307
    //   280: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   283: aload 19
    //   285: invokestatic 315	com/worklight/jsonstore/util/JSONStoreUtil:getDatabaseSafeSearchFieldName	(Ljava/lang/String;)Ljava/lang/String;
    //   288: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   291: ldc_w 307
    //   294: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   297: invokevirtual 222	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   300: aload 20
    //   302: invokevirtual 316	java/lang/Object:toString	()Ljava/lang/String;
    //   305: invokevirtual 319	android/content/ContentValues:put	(Ljava/lang/String;Ljava/lang/String;)V
    //   308: goto -102 -> 206
    //   311: astore 7
    //   313: aload_0
    //   314: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   317: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   320: ifne +13 -> 333
    //   323: aload 6
    //   325: invokeinterface 150 1 0
    //   330: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   333: aload 7
    //   335: athrow
    //   336: astore 4
    //   338: aload_3
    //   339: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   342: aload 4
    //   344: athrow
    //   345: astore 10
    //   347: new 230	com/worklight/jsonstore/exceptions/JSONStoreAddException
    //   350: dup
    //   351: ldc_w 324
    //   354: aload 10
    //   356: invokespecial 325	com/worklight/jsonstore/exceptions/JSONStoreAddException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   359: astore 11
    //   361: aload_0
    //   362: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   365: ldc_w 324
    //   368: aload 11
    //   370: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   373: aload 11
    //   375: athrow
    //   376: aload 12
    //   378: ldc 173
    //   380: iconst_0
    //   381: invokestatic 96	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   384: invokeinterface 272 3 0
    //   389: pop
    //   390: aload 12
    //   392: ldc 177
    //   394: ldc_w 327
    //   397: invokeinterface 272 3 0
    //   402: pop
    //   403: goto -220 -> 183
    //   406: aload 6
    //   408: invokeinterface 150 1 0
    //   413: aload_0
    //   414: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   417: aconst_null
    //   418: aload 16
    //   420: invokevirtual 331	net/sqlcipher/database/SQLiteDatabase:insert	(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
    //   423: ldc2_w 332
    //   426: lcmp
    //   427: ifne -344 -> 83
    //   430: new 230	com/worklight/jsonstore/exceptions/JSONStoreAddException
    //   433: dup
    //   434: ldc_w 335
    //   437: invokespecial 336	com/worklight/jsonstore/exceptions/JSONStoreAddException:<init>	(Ljava/lang/String;)V
    //   440: astore 18
    //   442: aload_0
    //   443: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   446: ldc_w 335
    //   449: aload 18
    //   451: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   454: aload 18
    //   456: athrow
    //   457: aload_0
    //   458: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   461: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   464: ifne +13 -> 477
    //   467: aload 6
    //   469: invokeinterface 150 1 0
    //   474: invokevirtual 339	net/sqlcipher/database/SQLiteDatabase:setTransactionSuccessful	()V
    //   477: aload_0
    //   478: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   481: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   484: ifne +13 -> 497
    //   487: aload 6
    //   489: invokeinterface 150 1 0
    //   494: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   497: aload_3
    //   498: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   501: return
    //   502: iconst_0
    //   503: istore 21
    //   505: goto -244 -> 261
    //
    // Exception table:
    //   from	to	target	type
    //   75	83	311	finally
    //   83	105	311	finally
    //   110	140	311	finally
    //   140	183	311	finally
    //   183	206	311	finally
    //   206	258	311	finally
    //   261	268	311	finally
    //   268	308	311	finally
    //   347	376	311	finally
    //   376	403	311	finally
    //   406	457	311	finally
    //   457	477	311	finally
    //   19	27	336	finally
    //   31	39	336	finally
    //   49	75	336	finally
    //   313	333	336	finally
    //   333	336	336	finally
    //   477	497	336	finally
    //   110	140	345	java/lang/Throwable
  }

  public void addData(JSONArray paramJSONArray)
    throws JSONStoreAddException, JSONStoreDatabaseClosedException
  {
    addData(JSONStoreUtil.convertJSONArrayToJSONObjectList(paramJSONArray), null);
  }

  public void addData(JSONArray paramJSONArray, JSONStoreAddOptions paramJSONStoreAddOptions)
    throws JSONStoreAddException, JSONStoreDatabaseClosedException
  {
    addData(JSONStoreUtil.convertJSONArrayToJSONObjectList(paramJSONArray), paramJSONStoreAddOptions);
  }

  public void addData(JSONObject paramJSONObject)
    throws JSONStoreAddException, JSONStoreDatabaseClosedException
  {
    ArrayList localArrayList = new ArrayList();
    localArrayList.add(paramJSONObject);
    addData(localArrayList, null);
  }

  public void addData(JSONObject paramJSONObject, JSONStoreAddOptions paramJSONStoreAddOptions)
    throws JSONStoreAddException, JSONStoreDatabaseClosedException
  {
    ArrayList localArrayList = new ArrayList();
    localArrayList.add(paramJSONObject);
    addData(localArrayList, paramJSONStoreAddOptions);
  }

  public int changeData(List<JSONObject> paramList)
    throws JSONStoreChangeException, JSONStoreDatabaseClosedException, JSONException
  {
    return changeData(paramList, null);
  }

  // ERROR //
  public int changeData(List<JSONObject> paramList, JSONStoreChangeOptions paramJSONStoreChangeOptions)
    throws JSONStoreChangeException, JSONStoreDatabaseClosedException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 236	com/worklight/jsonstore/api/JSONStoreCollection:getUsername	()Ljava/lang/String;
    //   4: aload_0
    //   5: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   8: getstatic 359	com/worklight/jsonstore/util/JSONStoreLogger:OPERATION_CHANGE	Ljava/lang/String;
    //   11: invokestatic 243	com/worklight/jsonstore/util/JSONStoreLogger:startAnalyticsInstance	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance;
    //   14: astore_3
    //   15: aload_0
    //   16: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   19: pop
    //   20: aload_2
    //   21: ifnonnull +15 -> 36
    //   24: new 361	com/worklight/jsonstore/api/JSONStoreChangeOptions
    //   27: dup
    //   28: invokespecial 362	com/worklight/jsonstore/api/JSONStoreChangeOptions:<init>	()V
    //   31: astore 6
    //   33: aload 6
    //   35: astore_2
    //   36: aload_1
    //   37: ifnonnull +9 -> 46
    //   40: aload_3
    //   41: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   44: iconst_0
    //   45: ireturn
    //   46: iconst_0
    //   47: istore 7
    //   49: aload_0
    //   50: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   53: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   56: ifne +27 -> 83
    //   59: aload_0
    //   60: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   63: astore 57
    //   65: aload 57
    //   67: monitorenter
    //   68: aload_0
    //   69: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   72: invokeinterface 150 1 0
    //   77: invokevirtual 257	net/sqlcipher/database/SQLiteDatabase:beginTransaction	()V
    //   80: aload 57
    //   82: monitorexit
    //   83: aload_2
    //   84: invokevirtual 366	com/worklight/jsonstore/api/JSONStoreChangeOptions:getSearchFieldCriteria	()Ljava/util/List;
    //   87: astore 12
    //   89: aload 12
    //   91: ifnull +13 -> 104
    //   94: aload 12
    //   96: invokeinterface 215 1 0
    //   101: ifne +181 -> 282
    //   104: new 204	java/util/LinkedList
    //   107: dup
    //   108: invokespecial 205	java/util/LinkedList:<init>	()V
    //   111: astore 12
    //   113: aload_0
    //   114: invokevirtual 370	com/worklight/jsonstore/api/JSONStoreCollection:getSearchFields	()Ljava/util/Map;
    //   117: invokeinterface 295 1 0
    //   122: invokeinterface 298 1 0
    //   127: astore 13
    //   129: aload 13
    //   131: invokeinterface 78 1 0
    //   136: ifeq +95 -> 231
    //   139: aload 13
    //   141: invokeinterface 82 1 0
    //   146: checkcast 45	java/lang/String
    //   149: astore 55
    //   151: aload 12
    //   153: aload 55
    //   155: invokeinterface 195 2 0
    //   160: pop
    //   161: goto -32 -> 129
    //   164: astore 8
    //   166: aload_0
    //   167: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   170: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   173: ifne +27 -> 200
    //   176: aload_0
    //   177: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   180: astore 10
    //   182: aload 10
    //   184: monitorenter
    //   185: aload_0
    //   186: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   189: invokeinterface 150 1 0
    //   194: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   197: aload 10
    //   199: monitorexit
    //   200: new 351	com/worklight/jsonstore/exceptions/JSONStoreChangeException
    //   203: dup
    //   204: aload 8
    //   206: invokespecial 373	com/worklight/jsonstore/exceptions/JSONStoreChangeException:<init>	(Ljava/lang/Throwable;)V
    //   209: astore 9
    //   211: aload 9
    //   213: athrow
    //   214: astore 4
    //   216: aload_3
    //   217: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   220: aload 4
    //   222: athrow
    //   223: astore 58
    //   225: aload 57
    //   227: monitorexit
    //   228: aload 58
    //   230: athrow
    //   231: aload_0
    //   232: invokevirtual 376	com/worklight/jsonstore/api/JSONStoreCollection:getAdditionalSearchFields	()Ljava/util/Map;
    //   235: invokeinterface 295 1 0
    //   240: invokeinterface 298 1 0
    //   245: astore 14
    //   247: aload 14
    //   249: invokeinterface 78 1 0
    //   254: ifeq +28 -> 282
    //   257: aload 14
    //   259: invokeinterface 82 1 0
    //   264: checkcast 45	java/lang/String
    //   267: astore 53
    //   269: aload 12
    //   271: aload 53
    //   273: invokeinterface 195 2 0
    //   278: pop
    //   279: goto -32 -> 247
    //   282: aload 12
    //   284: invokeinterface 73 1 0
    //   289: astore 15
    //   291: aload 15
    //   293: invokeinterface 78 1 0
    //   298: ifeq +97 -> 395
    //   301: aload 15
    //   303: invokeinterface 82 1 0
    //   308: checkcast 45	java/lang/String
    //   311: astore 50
    //   313: aload_0
    //   314: invokevirtual 370	com/worklight/jsonstore/api/JSONStoreCollection:getSearchFields	()Ljava/util/Map;
    //   317: aload 50
    //   319: invokeinterface 377 2 0
    //   324: ifne -33 -> 291
    //   327: aload_0
    //   328: invokevirtual 376	com/worklight/jsonstore/api/JSONStoreCollection:getAdditionalSearchFields	()Ljava/util/Map;
    //   331: aload 50
    //   333: invokeinterface 377 2 0
    //   338: ifne -47 -> 291
    //   341: new 201	java/lang/StringBuilder
    //   344: dup
    //   345: invokespecial 202	java/lang/StringBuilder:<init>	()V
    //   348: ldc_w 379
    //   351: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   354: aload 50
    //   356: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   359: ldc_w 381
    //   362: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   365: invokevirtual 222	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   368: astore 51
    //   370: new 351	com/worklight/jsonstore/exceptions/JSONStoreChangeException
    //   373: dup
    //   374: aload 51
    //   376: invokespecial 382	com/worklight/jsonstore/exceptions/JSONStoreChangeException:<init>	(Ljava/lang/String;)V
    //   379: astore 52
    //   381: aload_0
    //   382: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   385: aload 51
    //   387: aload 52
    //   389: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   392: aload 52
    //   394: athrow
    //   395: new 204	java/util/LinkedList
    //   398: dup
    //   399: invokespecial 205	java/util/LinkedList:<init>	()V
    //   402: astore 16
    //   404: new 204	java/util/LinkedList
    //   407: dup
    //   408: invokespecial 205	java/util/LinkedList:<init>	()V
    //   411: astore 17
    //   413: aload_1
    //   414: invokeinterface 73 1 0
    //   419: astore 18
    //   421: aload 18
    //   423: invokeinterface 78 1 0
    //   428: ifeq +304 -> 732
    //   431: aload 18
    //   433: invokeinterface 82 1 0
    //   438: checkcast 84	org/json/JSONObject
    //   441: astore 32
    //   443: new 384	com/worklight/jsonstore/api/JSONStoreQueryParts
    //   446: dup
    //   447: invokespecial 385	com/worklight/jsonstore/api/JSONStoreQueryParts:<init>	()V
    //   450: astore 33
    //   452: new 387	com/worklight/jsonstore/api/JSONStoreQueryPart
    //   455: dup
    //   456: invokespecial 388	com/worklight/jsonstore/api/JSONStoreQueryPart:<init>	()V
    //   459: astore 34
    //   461: aload 12
    //   463: invokeinterface 73 1 0
    //   468: astore 35
    //   470: aload 35
    //   472: invokeinterface 78 1 0
    //   477: ifeq +78 -> 555
    //   480: aload 35
    //   482: invokeinterface 82 1 0
    //   487: checkcast 45	java/lang/String
    //   490: astore 47
    //   492: aload 32
    //   494: aload 47
    //   496: invokevirtual 391	org/json/JSONObject:has	(Ljava/lang/String;)Z
    //   499: ifeq -29 -> 470
    //   502: aload 32
    //   504: aload 47
    //   506: invokevirtual 394	org/json/JSONObject:get	(Ljava/lang/String;)Ljava/lang/Object;
    //   509: astore 48
    //   511: aload 48
    //   513: instanceof 188
    //   516: ifeq +24 -> 540
    //   519: aload 48
    //   521: checkcast 188	java/lang/Boolean
    //   524: invokevirtual 305	java/lang/Boolean:booleanValue	()Z
    //   527: ifeq +470 -> 997
    //   530: iconst_1
    //   531: istore 49
    //   533: iload 49
    //   535: invokestatic 96	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   538: astore 48
    //   540: aload 34
    //   542: aload 47
    //   544: aload 48
    //   546: invokevirtual 316	java/lang/Object:toString	()Ljava/lang/String;
    //   549: invokevirtual 397	com/worklight/jsonstore/api/JSONStoreQueryPart:addEqual	(Ljava/lang/String;Ljava/lang/String;)V
    //   552: goto -82 -> 470
    //   555: aload 33
    //   557: aload 34
    //   559: invokevirtual 401	com/worklight/jsonstore/api/JSONStoreQueryParts:addQueryPart	(Lcom/worklight/jsonstore/api/JSONStoreQueryPart;)V
    //   562: new 403	com/worklight/jsonstore/database/QueryBuilderSelect
    //   565: dup
    //   566: aload_0
    //   567: aload 33
    //   569: invokespecial 406	com/worklight/jsonstore/database/QueryBuilderSelect:<init>	(Lcom/worklight/jsonstore/api/JSONStoreCollection;Lcom/worklight/jsonstore/api/JSONStoreQueryParts;)V
    //   572: astore 36
    //   574: aload 36
    //   576: ldc 86
    //   578: iconst_0
    //   579: invokestatic 191	java/lang/Boolean:valueOf	(Z)Ljava/lang/Boolean;
    //   582: invokevirtual 410	com/worklight/jsonstore/database/QueryBuilderSelect:addSelectStatement	(Ljava/lang/String;Ljava/lang/Boolean;)V
    //   585: aload_0
    //   586: aload 36
    //   588: invokespecial 412	com/worklight/jsonstore/api/JSONStoreCollection:runQuery	(Lcom/worklight/jsonstore/database/QueryBuilder;)Landroid/database/Cursor;
    //   591: astore 37
    //   593: aload 37
    //   595: ifnull -174 -> 421
    //   598: aload 37
    //   600: invokeinterface 417 1 0
    //   605: ifgt +23 -> 628
    //   608: aload 17
    //   610: aload 32
    //   612: invokeinterface 195 2 0
    //   617: pop
    //   618: aload 37
    //   620: invokeinterface 420 1 0
    //   625: goto -204 -> 421
    //   628: aload 37
    //   630: invokeinterface 423 1 0
    //   635: pop
    //   636: iconst_0
    //   637: istore 39
    //   639: iload 39
    //   641: aload 37
    //   643: invokeinterface 417 1 0
    //   648: if_icmpge -30 -> 618
    //   651: aload 37
    //   653: invokeinterface 426 1 0
    //   658: ifne -40 -> 618
    //   661: aload 37
    //   663: aload 37
    //   665: ldc 86
    //   667: invokeinterface 429 2 0
    //   672: invokeinterface 432 2 0
    //   677: istore 40
    //   679: new 84	org/json/JSONObject
    //   682: dup
    //   683: invokespecial 433	org/json/JSONObject:<init>	()V
    //   686: astore 41
    //   688: aload 41
    //   690: ldc 175
    //   692: aload 32
    //   694: invokevirtual 436	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   697: pop
    //   698: aload 41
    //   700: ldc 86
    //   702: iload 40
    //   704: invokevirtual 439	org/json/JSONObject:put	(Ljava/lang/String;I)Lorg/json/JSONObject;
    //   707: pop
    //   708: aload 16
    //   710: aload 41
    //   712: invokeinterface 195 2 0
    //   717: pop
    //   718: aload 37
    //   720: invokeinterface 442 1 0
    //   725: pop
    //   726: iinc 39 1
    //   729: goto -90 -> 639
    //   732: new 444	com/worklight/jsonstore/api/JSONStoreReplaceOptions
    //   735: dup
    //   736: invokespecial 445	com/worklight/jsonstore/api/JSONStoreReplaceOptions:<init>	()V
    //   739: astore 19
    //   741: aload 19
    //   743: aload_2
    //   744: invokevirtual 446	com/worklight/jsonstore/api/JSONStoreChangeOptions:isMarkDirty	()Z
    //   747: invokevirtual 450	com/worklight/jsonstore/api/JSONStoreReplaceOptions:setMarkDirty	(Z)V
    //   750: aload 16
    //   752: invokeinterface 73 1 0
    //   757: astore 20
    //   759: aload 20
    //   761: invokeinterface 78 1 0
    //   766: ifeq +61 -> 827
    //   769: aload 20
    //   771: invokeinterface 82 1 0
    //   776: checkcast 84	org/json/JSONObject
    //   779: astore 28
    //   781: aload_0
    //   782: aload 28
    //   784: aload 19
    //   786: invokevirtual 454	com/worklight/jsonstore/api/JSONStoreCollection:replaceDocument	(Lorg/json/JSONObject;Lcom/worklight/jsonstore/api/JSONStoreReplaceOptions;)I
    //   789: pop
    //   790: iinc 7 1
    //   793: goto -34 -> 759
    //   796: astore 29
    //   798: new 351	com/worklight/jsonstore/exceptions/JSONStoreChangeException
    //   801: dup
    //   802: ldc_w 456
    //   805: aload 29
    //   807: invokespecial 457	com/worklight/jsonstore/exceptions/JSONStoreChangeException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   810: astore 30
    //   812: aload_0
    //   813: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   816: ldc_w 456
    //   819: aload 30
    //   821: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   824: aload 30
    //   826: athrow
    //   827: new 245	com/worklight/jsonstore/api/JSONStoreAddOptions
    //   830: dup
    //   831: invokespecial 246	com/worklight/jsonstore/api/JSONStoreAddOptions:<init>	()V
    //   834: astore 21
    //   836: aload 21
    //   838: aload_2
    //   839: invokevirtual 446	com/worklight/jsonstore/api/JSONStoreChangeOptions:isMarkDirty	()Z
    //   842: invokevirtual 458	com/worklight/jsonstore/api/JSONStoreAddOptions:setMarkDirty	(Z)V
    //   845: aload_2
    //   846: invokevirtual 461	com/worklight/jsonstore/api/JSONStoreChangeOptions:isAddNew	()Z
    //   849: ifeq +79 -> 928
    //   852: aload 17
    //   854: invokeinterface 73 1 0
    //   859: astore 24
    //   861: aload 24
    //   863: invokeinterface 78 1 0
    //   868: ifeq +60 -> 928
    //   871: aload 24
    //   873: invokeinterface 82 1 0
    //   878: checkcast 84	org/json/JSONObject
    //   881: astore 25
    //   883: aload_0
    //   884: aload 25
    //   886: aload 21
    //   888: invokevirtual 463	com/worklight/jsonstore/api/JSONStoreCollection:addData	(Lorg/json/JSONObject;Lcom/worklight/jsonstore/api/JSONStoreAddOptions;)V
    //   891: iinc 7 1
    //   894: goto -33 -> 861
    //   897: astore 26
    //   899: new 351	com/worklight/jsonstore/exceptions/JSONStoreChangeException
    //   902: dup
    //   903: ldc_w 465
    //   906: aload 26
    //   908: invokespecial 457	com/worklight/jsonstore/exceptions/JSONStoreChangeException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   911: astore 27
    //   913: aload_0
    //   914: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   917: ldc_w 465
    //   920: aload 27
    //   922: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   925: aload 27
    //   927: athrow
    //   928: aload_0
    //   929: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   932: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   935: ifne +39 -> 974
    //   938: aload_0
    //   939: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   942: astore 22
    //   944: aload 22
    //   946: monitorenter
    //   947: aload_0
    //   948: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   951: invokeinterface 150 1 0
    //   956: invokevirtual 339	net/sqlcipher/database/SQLiteDatabase:setTransactionSuccessful	()V
    //   959: aload_0
    //   960: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   963: invokeinterface 150 1 0
    //   968: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   971: aload 22
    //   973: monitorexit
    //   974: aload_3
    //   975: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   978: iload 7
    //   980: ireturn
    //   981: astore 23
    //   983: aload 22
    //   985: monitorexit
    //   986: aload 23
    //   988: athrow
    //   989: astore 11
    //   991: aload 10
    //   993: monitorexit
    //   994: aload 11
    //   996: athrow
    //   997: iconst_0
    //   998: istore 49
    //   1000: goto -467 -> 533
    //
    // Exception table:
    //   from	to	target	type
    //   49	68	164	java/lang/Throwable
    //   83	89	164	java/lang/Throwable
    //   94	104	164	java/lang/Throwable
    //   104	129	164	java/lang/Throwable
    //   129	161	164	java/lang/Throwable
    //   228	231	164	java/lang/Throwable
    //   231	247	164	java/lang/Throwable
    //   247	279	164	java/lang/Throwable
    //   282	291	164	java/lang/Throwable
    //   291	395	164	java/lang/Throwable
    //   395	421	164	java/lang/Throwable
    //   421	470	164	java/lang/Throwable
    //   470	530	164	java/lang/Throwable
    //   533	540	164	java/lang/Throwable
    //   540	552	164	java/lang/Throwable
    //   555	593	164	java/lang/Throwable
    //   598	618	164	java/lang/Throwable
    //   618	625	164	java/lang/Throwable
    //   628	636	164	java/lang/Throwable
    //   639	726	164	java/lang/Throwable
    //   732	759	164	java/lang/Throwable
    //   759	781	164	java/lang/Throwable
    //   781	790	164	java/lang/Throwable
    //   798	827	164	java/lang/Throwable
    //   827	861	164	java/lang/Throwable
    //   861	883	164	java/lang/Throwable
    //   883	891	164	java/lang/Throwable
    //   899	928	164	java/lang/Throwable
    //   928	947	164	java/lang/Throwable
    //   986	989	164	java/lang/Throwable
    //   15	20	214	finally
    //   24	33	214	finally
    //   49	68	214	finally
    //   83	89	214	finally
    //   94	104	214	finally
    //   104	129	214	finally
    //   129	161	214	finally
    //   166	185	214	finally
    //   200	214	214	finally
    //   228	231	214	finally
    //   231	247	214	finally
    //   247	279	214	finally
    //   282	291	214	finally
    //   291	395	214	finally
    //   395	421	214	finally
    //   421	470	214	finally
    //   470	530	214	finally
    //   533	540	214	finally
    //   540	552	214	finally
    //   555	593	214	finally
    //   598	618	214	finally
    //   618	625	214	finally
    //   628	636	214	finally
    //   639	726	214	finally
    //   732	759	214	finally
    //   759	781	214	finally
    //   781	790	214	finally
    //   798	827	214	finally
    //   827	861	214	finally
    //   861	883	214	finally
    //   883	891	214	finally
    //   899	928	214	finally
    //   928	947	214	finally
    //   986	989	214	finally
    //   994	997	214	finally
    //   68	83	223	finally
    //   225	228	223	finally
    //   781	790	796	com/worklight/jsonstore/exceptions/JSONStoreReplaceException
    //   883	891	897	com/worklight/jsonstore/exceptions/JSONStoreAddException
    //   947	974	981	finally
    //   983	986	981	finally
    //   185	200	989	finally
    //   991	994	989	finally
  }

  public int changeData(JSONObject[] paramArrayOfJSONObject)
    throws JSONStoreChangeException, JSONStoreDatabaseClosedException, JSONException
  {
    return changeData(paramArrayOfJSONObject, null);
  }

  public int changeData(JSONObject[] paramArrayOfJSONObject, JSONStoreChangeOptions paramJSONStoreChangeOptions)
    throws JSONStoreChangeException, JSONStoreDatabaseClosedException, JSONException
  {
    return changeData(JSONStoreUtil.convertJSONObjectArrayToJSONObjectList(paramArrayOfJSONObject), paramJSONStoreChangeOptions);
  }

  public void clearCollection()
    throws JSONStoreDatabaseClosedException
  {
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_CLEAR);
    try
    {
      getAccessor().getRawDatabase().delete(getName(), "1", new String[0]);
      return;
    }
    finally
    {
      localJSONStoreAnalyticsLogInstance.end();
    }
  }

  public int countAllDirtyDocuments()
    throws JSONStoreDatabaseClosedException, JSONStoreCountException
  {
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_COUNT_ALL_DIRTY);
    try
    {
      getAccessor();
      JSONStoreQueryParts localJSONStoreQueryParts = new JSONStoreQueryParts();
      JSONStoreQueryPart localJSONStoreQueryPart = new JSONStoreQueryPart();
      localJSONStoreQueryPart.addGreaterThan("_dirty", Integer.valueOf(0));
      localJSONStoreQueryParts.addQueryPart(localJSONStoreQueryPart);
      JSONStoreCountOptions localJSONStoreCountOptions = new JSONStoreCountOptions();
      localJSONStoreCountOptions.includeDeletedDocuments(true);
      int i = countDocuments(localJSONStoreQueryParts, localJSONStoreCountOptions);
      return i;
    }
    finally
    {
      localJSONStoreAnalyticsLogInstance.end();
    }
  }

  public int countAllDocuments()
    throws JSONStoreCountException, JSONStoreDatabaseClosedException
  {
    return countDocuments(null, null);
  }

  public int countDocuments(JSONStoreQueryParts paramJSONStoreQueryParts)
    throws JSONStoreCountException, JSONStoreDatabaseClosedException
  {
    return countDocuments(paramJSONStoreQueryParts, null);
  }

  // ERROR //
  public int countDocuments(JSONStoreQueryParts paramJSONStoreQueryParts, JSONStoreCountOptions paramJSONStoreCountOptions)
    throws JSONStoreCountException, JSONStoreDatabaseClosedException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 236	com/worklight/jsonstore/api/JSONStoreCollection:getUsername	()Ljava/lang/String;
    //   4: aload_0
    //   5: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   8: getstatic 510	com/worklight/jsonstore/util/JSONStoreLogger:OPERATION_COUNT	Ljava/lang/String;
    //   11: invokestatic 243	com/worklight/jsonstore/util/JSONStoreLogger:startAnalyticsInstance	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance;
    //   14: astore_3
    //   15: aload_0
    //   16: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   19: pop
    //   20: aload_1
    //   21: ifnonnull +11 -> 32
    //   24: new 384	com/worklight/jsonstore/api/JSONStoreQueryParts
    //   27: dup
    //   28: invokespecial 385	com/worklight/jsonstore/api/JSONStoreQueryParts:<init>	()V
    //   31: astore_1
    //   32: aload_2
    //   33: ifnonnull +11 -> 44
    //   36: new 495	com/worklight/jsonstore/api/JSONStoreCountOptions
    //   39: dup
    //   40: invokespecial 496	com/worklight/jsonstore/api/JSONStoreCountOptions:<init>	()V
    //   43: astore_2
    //   44: new 512	com/worklight/jsonstore/api/JSONStoreFindOptions
    //   47: dup
    //   48: invokespecial 513	com/worklight/jsonstore/api/JSONStoreFindOptions:<init>	()V
    //   51: astore 6
    //   53: aload_2
    //   54: invokevirtual 516	com/worklight/jsonstore/api/JSONStoreCountOptions:shouldIncludeDeletedDocuments	()Z
    //   57: ifeq +9 -> 66
    //   60: aload 6
    //   62: iconst_1
    //   63: invokevirtual 517	com/worklight/jsonstore/api/JSONStoreFindOptions:includeDeletedDocuments	(Z)V
    //   66: aload 6
    //   68: ldc_w 519
    //   71: invokevirtual 522	com/worklight/jsonstore/api/JSONStoreFindOptions:addSearchFilterSpecial	(Ljava/lang/String;)V
    //   74: aload_0
    //   75: aload_1
    //   76: aload 6
    //   78: invokevirtual 526	com/worklight/jsonstore/api/JSONStoreCollection:findDocuments	(Lcom/worklight/jsonstore/api/JSONStoreQueryParts;Lcom/worklight/jsonstore/api/JSONStoreFindOptions;)Ljava/util/List;
    //   81: astore 10
    //   83: aload 10
    //   85: ifnull +95 -> 180
    //   88: aload 10
    //   90: invokeinterface 215 1 0
    //   95: iconst_1
    //   96: if_icmpne +84 -> 180
    //   99: aload 10
    //   101: iconst_0
    //   102: invokeinterface 529 2 0
    //   107: checkcast 84	org/json/JSONObject
    //   110: astore 11
    //   112: aload 11
    //   114: ifnull +14 -> 128
    //   117: aload 11
    //   119: ldc_w 519
    //   122: invokevirtual 532	org/json/JSONObject:opt	(Ljava/lang/String;)Ljava/lang/Object;
    //   125: ifnonnull +38 -> 163
    //   128: new 486	com/worklight/jsonstore/exceptions/JSONStoreCountException
    //   131: dup
    //   132: ldc_w 534
    //   135: invokespecial 535	com/worklight/jsonstore/exceptions/JSONStoreCountException:<init>	(Ljava/lang/String;)V
    //   138: athrow
    //   139: astore 9
    //   141: new 486	com/worklight/jsonstore/exceptions/JSONStoreCountException
    //   144: dup
    //   145: ldc_w 537
    //   148: aload 9
    //   150: invokespecial 538	com/worklight/jsonstore/exceptions/JSONStoreCountException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   153: athrow
    //   154: astore 4
    //   156: aload_3
    //   157: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   160: aload 4
    //   162: athrow
    //   163: aload 11
    //   165: ldc_w 519
    //   168: invokevirtual 90	org/json/JSONObject:getInt	(Ljava/lang/String;)I
    //   171: istore 12
    //   173: aload_3
    //   174: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   177: iload 12
    //   179: ireturn
    //   180: new 486	com/worklight/jsonstore/exceptions/JSONStoreCountException
    //   183: dup
    //   184: ldc_w 540
    //   187: invokespecial 535	com/worklight/jsonstore/exceptions/JSONStoreCountException:<init>	(Ljava/lang/String;)V
    //   190: athrow
    //   191: astore 8
    //   193: new 486	com/worklight/jsonstore/exceptions/JSONStoreCountException
    //   196: dup
    //   197: ldc_w 542
    //   200: aload 8
    //   202: invokespecial 538	com/worklight/jsonstore/exceptions/JSONStoreCountException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   205: athrow
    //   206: astore 7
    //   208: new 486	com/worklight/jsonstore/exceptions/JSONStoreCountException
    //   211: dup
    //   212: ldc_w 544
    //   215: aload 7
    //   217: invokespecial 538	com/worklight/jsonstore/exceptions/JSONStoreCountException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   220: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   74	83	139	com/worklight/jsonstore/exceptions/JSONStoreFilterException
    //   88	112	139	com/worklight/jsonstore/exceptions/JSONStoreFilterException
    //   117	128	139	com/worklight/jsonstore/exceptions/JSONStoreFilterException
    //   128	139	139	com/worklight/jsonstore/exceptions/JSONStoreFilterException
    //   163	173	139	com/worklight/jsonstore/exceptions/JSONStoreFilterException
    //   180	191	139	com/worklight/jsonstore/exceptions/JSONStoreFilterException
    //   15	20	154	finally
    //   24	32	154	finally
    //   36	44	154	finally
    //   44	66	154	finally
    //   66	74	154	finally
    //   74	83	154	finally
    //   88	112	154	finally
    //   117	128	154	finally
    //   128	139	154	finally
    //   141	154	154	finally
    //   163	173	154	finally
    //   180	191	154	finally
    //   193	206	154	finally
    //   208	221	154	finally
    //   74	83	191	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   88	112	191	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   117	128	191	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   128	139	191	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   163	173	191	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   180	191	191	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   74	83	206	org/json/JSONException
    //   88	112	206	org/json/JSONException
    //   117	128	206	org/json/JSONException
    //   128	139	206	org/json/JSONException
    //   163	173	206	org/json/JSONException
    //   180	191	206	org/json/JSONException
  }

  void disown()
  {
    this.initializedJSONStoreInstance = null;
  }

  public List<JSONObject> findAllDirtyDocuments()
    throws JSONStoreFindException, JSONStoreDatabaseClosedException
  {
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_FIND_ALL_DIRTY);
    try
    {
      getAccessor();
      JSONStoreQueryParts localJSONStoreQueryParts = new JSONStoreQueryParts();
      JSONStoreQueryPart localJSONStoreQueryPart = new JSONStoreQueryPart();
      localJSONStoreQueryPart.addGreaterThan("_dirty", Integer.valueOf(0));
      localJSONStoreQueryParts.addQueryPart(localJSONStoreQueryPart);
      JSONStoreFindOptions localJSONStoreFindOptions = new JSONStoreFindOptions();
      localJSONStoreFindOptions.addSearchFilter("_id");
      localJSONStoreFindOptions.addSearchFilter("json");
      localJSONStoreFindOptions.addSearchFilter("_operation");
      localJSONStoreFindOptions.addSearchFilter("_dirty");
      localJSONStoreFindOptions.includeDeletedDocuments(true);
      try
      {
        List localList = findDocuments(localJSONStoreQueryParts, localJSONStoreFindOptions);
        return localList;
      }
      catch (JSONStoreFilterException localJSONStoreFilterException)
      {
        throw new JSONStoreFindException("Error occured filtering results", localJSONStoreFilterException);
      }
    }
    finally
    {
      localJSONStoreAnalyticsLogInstance.end();
    }
  }

  public List<JSONObject> findAllDocuments()
    throws JSONStoreFindException, JSONStoreDatabaseClosedException
  {
    return findAllDocuments(null);
  }

  public List<JSONObject> findAllDocuments(JSONStoreFindOptions paramJSONStoreFindOptions)
    throws JSONStoreFindException, JSONStoreDatabaseClosedException
  {
    getAccessor();
    try
    {
      List localList = findDocuments(null, paramJSONStoreFindOptions);
      return localList;
    }
    catch (JSONStoreFilterException localJSONStoreFilterException)
    {
      throw new JSONStoreFindException("Error occured filtering results", localJSONStoreFilterException);
    }
  }

  public JSONObject findDocumentById(int paramInt)
    throws JSONStoreDatabaseClosedException, JSONStoreFindException
  {
    ArrayList localArrayList = new ArrayList(1);
    localArrayList.add(Integer.valueOf(paramInt));
    List localList = findDocumentsById(localArrayList);
    if (localList.size() > 0)
      return (JSONObject)localList.get(0);
    return null;
  }

  public List<JSONObject> findDocuments(JSONStoreQueryParts paramJSONStoreQueryParts)
    throws JSONStoreFindException, JSONStoreFilterException, JSONStoreDatabaseClosedException
  {
    return findDocuments(paramJSONStoreQueryParts, null);
  }

  // ERROR //
  public List<JSONObject> findDocuments(JSONStoreQueryParts paramJSONStoreQueryParts, JSONStoreFindOptions paramJSONStoreFindOptions)
    throws JSONStoreFindException, JSONStoreFilterException, JSONStoreDatabaseClosedException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 236	com/worklight/jsonstore/api/JSONStoreCollection:getUsername	()Ljava/lang/String;
    //   4: aload_0
    //   5: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   8: getstatic 570	com/worklight/jsonstore/util/JSONStoreLogger:OPERATION_FIND	Ljava/lang/String;
    //   11: invokestatic 243	com/worklight/jsonstore/util/JSONStoreLogger:startAnalyticsInstance	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance;
    //   14: astore_3
    //   15: aload_0
    //   16: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   19: pop
    //   20: aload_2
    //   21: ifnonnull +11 -> 32
    //   24: new 512	com/worklight/jsonstore/api/JSONStoreFindOptions
    //   27: dup
    //   28: invokespecial 513	com/worklight/jsonstore/api/JSONStoreFindOptions:<init>	()V
    //   31: astore_2
    //   32: aload_1
    //   33: ifnonnull +11 -> 44
    //   36: new 384	com/worklight/jsonstore/api/JSONStoreQueryParts
    //   39: dup
    //   40: invokespecial 385	com/worklight/jsonstore/api/JSONStoreQueryParts:<init>	()V
    //   43: astore_1
    //   44: new 403	com/worklight/jsonstore/database/QueryBuilderSelect
    //   47: dup
    //   48: aload_0
    //   49: aload_1
    //   50: invokespecial 406	com/worklight/jsonstore/database/QueryBuilderSelect:<init>	(Lcom/worklight/jsonstore/api/JSONStoreCollection;Lcom/worklight/jsonstore/api/JSONStoreQueryParts;)V
    //   53: astore 6
    //   55: aload 6
    //   57: aload_2
    //   58: invokevirtual 574	com/worklight/jsonstore/api/JSONStoreFindOptions:getLimit	()Ljava/lang/Integer;
    //   61: invokevirtual 578	com/worklight/jsonstore/database/QueryBuilderSelect:setLimit	(Ljava/lang/Integer;)V
    //   64: aload 6
    //   66: aload_2
    //   67: invokevirtual 581	com/worklight/jsonstore/api/JSONStoreFindOptions:getOffset	()Ljava/lang/Integer;
    //   70: invokevirtual 584	com/worklight/jsonstore/database/QueryBuilderSelect:setOffset	(Ljava/lang/Integer;)V
    //   73: aload 6
    //   75: aload_2
    //   76: invokevirtual 588	com/worklight/jsonstore/api/JSONStoreFindOptions:getSort	()Ljava/util/LinkedHashMap;
    //   79: invokevirtual 592	com/worklight/jsonstore/database/QueryBuilderSelect:setSort	(Ljava/util/LinkedHashMap;)V
    //   82: aload_2
    //   83: invokevirtual 593	com/worklight/jsonstore/api/JSONStoreFindOptions:shouldIncludeDeletedDocuments	()Z
    //   86: ifeq +8 -> 94
    //   89: aload 6
    //   91: invokevirtual 596	com/worklight/jsonstore/database/QueryBuilderSelect:setSearchIncludeDeleted	()V
    //   94: new 98	java/util/LinkedHashMap
    //   97: dup
    //   98: invokespecial 597	java/util/LinkedHashMap:<init>	()V
    //   101: astore 7
    //   103: new 181	java/util/ArrayList
    //   106: dup
    //   107: invokespecial 182	java/util/ArrayList:<init>	()V
    //   110: astore 8
    //   112: aload_2
    //   113: invokevirtual 600	com/worklight/jsonstore/api/JSONStoreFindOptions:getSearchFilters	()Ljava/util/Map;
    //   116: astore 9
    //   118: aload 9
    //   120: ifnull +86 -> 206
    //   123: aload 9
    //   125: invokeinterface 601 1 0
    //   130: ifle +76 -> 206
    //   133: aload 9
    //   135: invokeinterface 295 1 0
    //   140: invokeinterface 298 1 0
    //   145: astore 30
    //   147: aload 30
    //   149: invokeinterface 78 1 0
    //   154: ifeq +74 -> 228
    //   157: aload 30
    //   159: invokeinterface 82 1 0
    //   164: checkcast 45	java/lang/String
    //   167: astore 31
    //   169: aload 6
    //   171: aload 31
    //   173: aload 9
    //   175: aload 31
    //   177: invokeinterface 302 2 0
    //   182: checkcast 188	java/lang/Boolean
    //   185: invokevirtual 305	java/lang/Boolean:booleanValue	()Z
    //   188: invokestatic 191	java/lang/Boolean:valueOf	(Z)Ljava/lang/Boolean;
    //   191: invokevirtual 410	com/worklight/jsonstore/database/QueryBuilderSelect:addSelectStatement	(Ljava/lang/String;Ljava/lang/Boolean;)V
    //   194: goto -47 -> 147
    //   197: astore 4
    //   199: aload_3
    //   200: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   203: aload 4
    //   205: athrow
    //   206: aload 6
    //   208: ldc 86
    //   210: iconst_0
    //   211: invokestatic 191	java/lang/Boolean:valueOf	(Z)Ljava/lang/Boolean;
    //   214: invokevirtual 410	com/worklight/jsonstore/database/QueryBuilderSelect:addSelectStatement	(Ljava/lang/String;Ljava/lang/Boolean;)V
    //   217: aload 6
    //   219: ldc 175
    //   221: iconst_0
    //   222: invokestatic 191	java/lang/Boolean:valueOf	(Z)Ljava/lang/Boolean;
    //   225: invokevirtual 410	com/worklight/jsonstore/database/QueryBuilderSelect:addSelectStatement	(Ljava/lang/String;Ljava/lang/Boolean;)V
    //   228: aconst_null
    //   229: astore 10
    //   231: aload_0
    //   232: aload 6
    //   234: invokespecial 412	com/worklight/jsonstore/api/JSONStoreCollection:runQuery	(Lcom/worklight/jsonstore/database/QueryBuilder;)Landroid/database/Cursor;
    //   237: astore 10
    //   239: aconst_null
    //   240: astore 14
    //   242: aload 10
    //   244: ifnull +291 -> 535
    //   247: new 204	java/util/LinkedList
    //   250: dup
    //   251: invokespecial 205	java/util/LinkedList:<init>	()V
    //   254: astore 15
    //   256: iconst_0
    //   257: istore 16
    //   259: iload 16
    //   261: aload 10
    //   263: invokeinterface 417 1 0
    //   268: if_icmpge +263 -> 531
    //   271: new 603	com/worklight/jsonstore/jackson/JacksonSerializedJSONObject
    //   274: dup
    //   275: invokespecial 604	com/worklight/jsonstore/jackson/JacksonSerializedJSONObject:<init>	()V
    //   278: astore 17
    //   280: aload 10
    //   282: invokeinterface 442 1 0
    //   287: pop
    //   288: iconst_0
    //   289: istore 19
    //   291: iload 19
    //   293: aload 10
    //   295: invokeinterface 608 1 0
    //   300: arraylength
    //   301: if_icmpge +214 -> 515
    //   304: aload 10
    //   306: iload 19
    //   308: invokeinterface 612 2 0
    //   313: ldc 86
    //   315: invokevirtual 171	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   318: ifeq +30 -> 348
    //   321: aload 17
    //   323: aload 10
    //   325: iload 19
    //   327: invokeinterface 612 2 0
    //   332: aload 10
    //   334: iload 19
    //   336: invokeinterface 432 2 0
    //   341: invokevirtual 439	org/json/JSONObject:put	(Ljava/lang/String;I)Lorg/json/JSONObject;
    //   344: pop
    //   345: goto +309 -> 654
    //   348: aload 10
    //   350: iload 19
    //   352: invokeinterface 612 2 0
    //   357: ldc 175
    //   359: invokevirtual 171	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   362: ifeq +74 -> 436
    //   365: aload 17
    //   367: ldc 175
    //   369: aload 10
    //   371: iload 19
    //   373: invokeinterface 615 2 0
    //   378: invokestatic 621	com/worklight/jsonstore/jackson/JsonOrgModule:deserializeJSONObject	(Ljava/lang/String;)Lorg/json/JSONObject;
    //   381: invokevirtual 436	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   384: pop
    //   385: goto +269 -> 654
    //   388: astore 11
    //   390: new 65	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   393: dup
    //   394: ldc_w 623
    //   397: aload 11
    //   399: invokespecial 110	com/worklight/jsonstore/exceptions/JSONStoreFindException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   402: astore 12
    //   404: aload_0
    //   405: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   408: ldc_w 623
    //   411: aload 12
    //   413: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   416: aload 12
    //   418: athrow
    //   419: astore 13
    //   421: aload 10
    //   423: ifnull +10 -> 433
    //   426: aload 10
    //   428: invokeinterface 420 1 0
    //   433: aload 13
    //   435: athrow
    //   436: aload_0
    //   437: aload 10
    //   439: iload 19
    //   441: invokeinterface 612 2 0
    //   446: invokespecial 625	com/worklight/jsonstore/api/JSONStoreCollection:isJSONCreatedColumn	(Ljava/lang/String;)Z
    //   449: ifeq +30 -> 479
    //   452: aload 17
    //   454: aload 10
    //   456: iload 19
    //   458: invokeinterface 612 2 0
    //   463: aload 10
    //   465: iload 19
    //   467: invokeinterface 615 2 0
    //   472: invokevirtual 436	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   475: pop
    //   476: goto +178 -> 654
    //   479: aload 17
    //   481: aload 10
    //   483: iload 19
    //   485: invokeinterface 612 2 0
    //   490: ldc_w 627
    //   493: ldc_w 629
    //   496: invokevirtual 633	java/lang/String:replace	(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
    //   499: aload 10
    //   501: iload 19
    //   503: invokeinterface 615 2 0
    //   508: invokevirtual 436	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   511: pop
    //   512: goto +142 -> 654
    //   515: aload 15
    //   517: aload 17
    //   519: invokeinterface 195 2 0
    //   524: pop
    //   525: iinc 16 1
    //   528: goto -269 -> 259
    //   531: aload 15
    //   533: astore 14
    //   535: aload 10
    //   537: ifnull +10 -> 547
    //   540: aload 10
    //   542: invokeinterface 420 1 0
    //   547: aload_2
    //   548: invokevirtual 600	com/worklight/jsonstore/api/JSONStoreFindOptions:getSearchFilters	()Ljava/util/Map;
    //   551: ifnull +43 -> 594
    //   554: aload 14
    //   556: invokeinterface 73 1 0
    //   561: astore 28
    //   563: aload 28
    //   565: invokeinterface 78 1 0
    //   570: ifeq +32 -> 602
    //   573: aload 8
    //   575: aload 28
    //   577: invokeinterface 82 1 0
    //   582: checkcast 84	org/json/JSONObject
    //   585: invokeinterface 195 2 0
    //   590: pop
    //   591: goto -28 -> 563
    //   594: aload_0
    //   595: aload 7
    //   597: aload 14
    //   599: invokespecial 635	com/worklight/jsonstore/api/JSONStoreCollection:addNonDuplicates	(Ljava/util/LinkedHashMap;Ljava/util/List;)V
    //   602: aload_2
    //   603: invokevirtual 600	com/worklight/jsonstore/api/JSONStoreFindOptions:getSearchFilters	()Ljava/util/Map;
    //   606: ifnull +22 -> 628
    //   609: aload_0
    //   610: aload 8
    //   612: invokespecial 637	com/worklight/jsonstore/api/JSONStoreCollection:removeFilterDuplicates	(Ljava/util/List;)Ljava/util/List;
    //   615: astore 27
    //   617: aload 27
    //   619: astore 26
    //   621: aload_3
    //   622: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   625: aload 26
    //   627: areturn
    //   628: aload 7
    //   630: invokevirtual 641	java/util/LinkedHashMap:values	()Ljava/util/Collection;
    //   633: astore 25
    //   635: new 181	java/util/ArrayList
    //   638: dup
    //   639: aload 25
    //   641: invokespecial 644	java/util/ArrayList:<init>	(Ljava/util/Collection;)V
    //   644: astore 26
    //   646: goto -25 -> 621
    //   649: astore 11
    //   651: goto -261 -> 390
    //   654: iinc 19 1
    //   657: goto -366 -> 291
    //   660: astore 13
    //   662: goto -241 -> 421
    //
    // Exception table:
    //   from	to	target	type
    //   15	20	197	finally
    //   24	32	197	finally
    //   36	44	197	finally
    //   44	94	197	finally
    //   94	118	197	finally
    //   123	147	197	finally
    //   147	194	197	finally
    //   206	228	197	finally
    //   426	433	197	finally
    //   433	436	197	finally
    //   540	547	197	finally
    //   547	563	197	finally
    //   563	591	197	finally
    //   594	602	197	finally
    //   602	617	197	finally
    //   628	646	197	finally
    //   259	288	388	java/lang/Throwable
    //   291	345	388	java/lang/Throwable
    //   348	385	388	java/lang/Throwable
    //   436	476	388	java/lang/Throwable
    //   479	512	388	java/lang/Throwable
    //   515	525	388	java/lang/Throwable
    //   231	239	419	finally
    //   247	256	419	finally
    //   390	419	419	finally
    //   231	239	649	java/lang/Throwable
    //   247	256	649	java/lang/Throwable
    //   259	288	660	finally
    //   291	345	660	finally
    //   348	385	660	finally
    //   436	476	660	finally
    //   479	512	660	finally
    //   515	525	660	finally
  }

  public List<JSONObject> findDocumentsById(List<Integer> paramList)
    throws JSONStoreDatabaseClosedException, JSONStoreFindException
  {
    getAccessor();
    LinkedList localLinkedList = new LinkedList();
    Iterator localIterator1 = JSONStoreUtil.splitListIntoChunks(paramList, 200).iterator();
    while (localIterator1.hasNext())
    {
      List localList1 = (List)localIterator1.next();
      JSONStoreQueryParts localJSONStoreQueryParts;
      try
      {
        localJSONStoreQueryParts = new JSONStoreQueryParts();
        Iterator localIterator2 = localList1.iterator();
        while (localIterator2.hasNext())
        {
          Integer localInteger2 = (Integer)localIterator2.next();
          JSONStoreQueryPart localJSONStoreQueryPart = new JSONStoreQueryPart();
          localJSONStoreQueryPart.addEqual("_id", localInteger2);
          localJSONStoreQueryParts.addQueryPart(localJSONStoreQueryPart);
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
      continue;
      List localList2 = findDocuments(localJSONStoreQueryParts);
      HashMap localHashMap = new HashMap();
      Iterator localIterator3 = localList2.iterator();
      while (localIterator3.hasNext())
      {
        JSONObject localJSONObject = (JSONObject)localIterator3.next();
        localHashMap.put(Integer.valueOf(localJSONObject.getInt("_id")), localJSONObject);
      }
      Iterator localIterator4 = paramList.iterator();
      while (localIterator4.hasNext())
      {
        Integer localInteger1 = (Integer)localIterator4.next();
        if (localHashMap.containsKey(localInteger1))
          localLinkedList.add(localHashMap.get(localInteger1));
      }
    }
    return localLinkedList;
  }

  public List<JSONObject> findDocumentsById(int[] paramArrayOfInt)
    throws JSONStoreDatabaseClosedException, JSONStoreFindException
  {
    if (paramArrayOfInt == null)
      paramArrayOfInt = new int[0];
    return findDocumentsById(new ArrayList(paramArrayOfInt.length));
  }

  public Map<String, SearchFieldType> getAdditionalSearchFields()
  {
    return this.additionalSearchFields;
  }

  protected Map<String, SearchFieldType> getAllSearchFields()
  {
    HashMap localHashMap = new HashMap();
    Iterator localIterator1 = this.searchFields.entrySet().iterator();
    while (localIterator1.hasNext())
    {
      Map.Entry localEntry2 = (Map.Entry)localIterator1.next();
      localHashMap.put((String)localEntry2.getKey(), (SearchFieldType)localEntry2.getValue());
    }
    if (this.additionalSearchFields != null)
    {
      Iterator localIterator2 = this.additionalSearchFields.entrySet().iterator();
      while (localIterator2.hasNext())
      {
        Map.Entry localEntry1 = (Map.Entry)localIterator2.next();
        localHashMap.put((String)localEntry1.getKey(), (SearchFieldType)localEntry1.getValue());
      }
    }
    return localHashMap;
  }

  public String getName()
  {
    return this.name;
  }

  public Map<String, SearchFieldType> getSearchFields()
  {
    return this.searchFields;
  }

  public boolean hasAdditionalSearchField(String paramString)
  {
    return this.additionalSearchFields.containsKey(paramString);
  }

  public boolean hasSearchField(String paramString)
  {
    if ((paramString.equals("_deleted")) || (paramString.equals("_id")) || (paramString.equals("_dirty")) || (paramString.equals("_operation")))
      return true;
    return this.searchFields.containsKey(paramString);
  }

  void initialize(WLJSONStore paramWLJSONStore, DatabaseSchema paramDatabaseSchema, boolean paramBoolean)
  {
    this.initializedJSONStoreInstance = paramWLJSONStore;
    this.schema = paramDatabaseSchema;
    this.wasReopened = paramBoolean;
  }

  public boolean isDocumentDirty(int paramInt)
    throws JSONStoreDirtyCheckException, JSONStoreDatabaseClosedException
  {
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_IS_DOCUMENT_DIRTY);
    try
    {
      getAccessor();
      JSONStoreQueryParts localJSONStoreQueryParts = new JSONStoreQueryParts();
      JSONStoreQueryPart localJSONStoreQueryPart = new JSONStoreQueryPart();
      localJSONStoreQueryPart.addEqual("_id", Integer.valueOf(paramInt));
      localJSONStoreQueryPart.addGreaterThan("_dirty", Integer.valueOf(0));
      localJSONStoreQueryParts.addQueryPart(localJSONStoreQueryPart);
      try
      {
        List localList = findDocuments(localJSONStoreQueryParts);
        int i = localList.size();
        if (i > 0)
          return true;
      }
      catch (JSONStoreException localJSONStoreException)
      {
        throw new JSONStoreDirtyCheckException("An error occured finding the document", localJSONStoreException);
      }
    }
    finally
    {
      localJSONStoreAnalyticsLogInstance.end();
    }
    localJSONStoreAnalyticsLogInstance.end();
    return false;
  }

  public int markDocumentClean(JSONObject paramJSONObject)
    throws JSONStoreMarkCleanException, JSONStoreDatabaseClosedException
  {
    if (paramJSONObject == null)
      return 0;
    int i;
    String str;
    try
    {
      i = paramJSONObject.getInt("_id");
      str = paramJSONObject.getString("_operation");
      if (str == null)
      {
        JSONStoreMarkCleanException localJSONStoreMarkCleanException2 = new JSONStoreMarkCleanException("Document does not contain the operation to execute.");
        this.logger.logError("Document does not contain the operation to execute.", localJSONStoreMarkCleanException2);
        throw localJSONStoreMarkCleanException2;
      }
    }
    catch (JSONException localJSONException)
    {
      JSONStoreMarkCleanException localJSONStoreMarkCleanException1 = new JSONStoreMarkCleanException("Could not parse the document.", localJSONException);
      this.logger.logError("Could not parse the document.", localJSONStoreMarkCleanException1);
      throw localJSONStoreMarkCleanException1;
    }
    WritableDatabase localWritableDatabase = getAccessor().getWritableDatabase();
    if (str.equals("remove"))
    {
      String[] arrayOfString1 = { "_id" };
      Object[] arrayOfObject1 = new Object[1];
      arrayOfObject1[0] = Integer.valueOf(i);
      localWritableDatabase.delete(arrayOfString1, arrayOfObject1);
    }
    HashMap localHashMap = new HashMap();
    localHashMap.put("_id", Integer.valueOf(i));
    String[] arrayOfString2 = { "_dirty", "_deleted", "_operation" };
    Object[] arrayOfObject2 = new Object[3];
    arrayOfObject2[0] = Integer.valueOf(0);
    arrayOfObject2[1] = Integer.valueOf(0);
    arrayOfObject2[2] = "";
    localWritableDatabase.update(arrayOfString2, arrayOfObject2, localHashMap);
    return 1;
  }

  public int markDocumentsClean(List<JSONObject> paramList)
    throws JSONStoreMarkCleanException, JSONStoreDatabaseClosedException
  {
    int i = 0;
    Iterator localIterator = paramList.iterator();
    while (localIterator.hasNext())
      i += markDocumentClean((JSONObject)localIterator.next());
    return i;
  }

  public int markDocumentsClean(JSONObject[] paramArrayOfJSONObject)
    throws JSONStoreMarkCleanException, JSONStoreDatabaseClosedException
  {
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_MARK_CLEAN);
    try
    {
      int i = markDocumentsClean(JSONStoreUtil.convertJSONObjectArrayToJSONObjectList(paramArrayOfJSONObject));
      return i;
    }
    finally
    {
      localJSONStoreAnalyticsLogInstance.end();
    }
  }

  public void removeCollection()
    throws JSONStoreRemoveCollectionException, JSONStoreDatabaseClosedException, JSONStoreTransactionFailureException
  {
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_REMOVE_COLLECTION);
    DatabaseAccessor localDatabaseAccessor;
    try
    {
      localDatabaseAccessor = getAccessor();
      if (this.initializedJSONStoreInstance.isTransactionInProgress())
        throw new JSONStoreTransactionFailureException("Cannot remove collection during a transaction.");
    }
    finally
    {
      localJSONStoreAnalyticsLogInstance.end();
    }
    localDatabaseAccessor.dropTable();
    this.initializedJSONStoreInstance.removeCollectionReference(this);
    localJSONStoreAnalyticsLogInstance.end();
  }

  public int removeDocumentById(Integer paramInteger)
    throws JSONStoreRemoveException, JSONStoreDatabaseClosedException
  {
    return removeDocumentById(paramInteger, null);
  }

  public int removeDocumentById(Integer paramInteger, JSONStoreRemoveOptions paramJSONStoreRemoveOptions)
    throws JSONStoreRemoveException, JSONStoreDatabaseClosedException
  {
    ArrayList localArrayList = new ArrayList(1);
    localArrayList.add(paramInteger);
    return removeDocumentsById(localArrayList, paramJSONStoreRemoveOptions);
  }

  public int removeDocumentsById(List<Integer> paramList)
    throws JSONStoreRemoveException, JSONStoreDatabaseClosedException
  {
    return removeDocumentsById(paramList, null);
  }

  // ERROR //
  public int removeDocumentsById(List<Integer> paramList, JSONStoreRemoveOptions paramJSONStoreRemoveOptions)
    throws JSONStoreRemoveException, JSONStoreDatabaseClosedException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 236	com/worklight/jsonstore/api/JSONStoreCollection:getUsername	()Ljava/lang/String;
    //   4: aload_0
    //   5: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   8: getstatic 756	com/worklight/jsonstore/util/JSONStoreLogger:OPERATION_REMOVE	Ljava/lang/String;
    //   11: invokestatic 243	com/worklight/jsonstore/util/JSONStoreLogger:startAnalyticsInstance	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance;
    //   14: astore_3
    //   15: aload_0
    //   16: invokespecial 199	com/worklight/jsonstore/api/JSONStoreCollection:getAccessor	()Lcom/worklight/jsonstore/database/DatabaseAccessor;
    //   19: astore 5
    //   21: aload_2
    //   22: ifnonnull +11 -> 33
    //   25: new 758	com/worklight/jsonstore/api/JSONStoreRemoveOptions
    //   28: dup
    //   29: invokespecial 759	com/worklight/jsonstore/api/JSONStoreRemoveOptions:<init>	()V
    //   32: astore_2
    //   33: new 204	java/util/LinkedList
    //   36: dup
    //   37: invokespecial 205	java/util/LinkedList:<init>	()V
    //   40: pop
    //   41: aload_0
    //   42: aload_1
    //   43: invokevirtual 566	com/worklight/jsonstore/api/JSONStoreCollection:findDocumentsById	(Ljava/util/List;)Ljava/util/List;
    //   46: astore 8
    //   48: new 204	java/util/LinkedList
    //   51: dup
    //   52: invokespecial 205	java/util/LinkedList:<init>	()V
    //   55: astore 9
    //   57: iconst_0
    //   58: istore 10
    //   60: aload_0
    //   61: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   64: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   67: istore 11
    //   69: iload 11
    //   71: ifne +13 -> 84
    //   74: aload 5
    //   76: invokeinterface 150 1 0
    //   81: invokevirtual 257	net/sqlcipher/database/SQLiteDatabase:beginTransaction	()V
    //   84: aload 8
    //   86: invokeinterface 73 1 0
    //   91: astore 12
    //   93: aload 12
    //   95: invokeinterface 78 1 0
    //   100: ifeq +188 -> 288
    //   103: aload 12
    //   105: invokeinterface 82 1 0
    //   110: checkcast 84	org/json/JSONObject
    //   113: astore 18
    //   115: aload 18
    //   117: ifnull -24 -> 93
    //   120: aload 5
    //   122: invokeinterface 705 1 0
    //   127: astore 24
    //   129: aload_2
    //   130: invokevirtual 760	com/worklight/jsonstore/api/JSONStoreRemoveOptions:isMarkDirty	()Z
    //   133: ifne +283 -> 416
    //   136: iconst_1
    //   137: istore 25
    //   139: aload 24
    //   141: aload 18
    //   143: iload 25
    //   145: iconst_1
    //   146: invokevirtual 764	com/worklight/jsonstore/database/WritableDatabase:deleteIfRequired	(Lorg/json/JSONObject;ZZ)I
    //   149: istore 26
    //   151: iload 10
    //   153: iload 26
    //   155: iadd
    //   156: istore 10
    //   158: goto -65 -> 93
    //   161: astore 7
    //   163: new 746	com/worklight/jsonstore/exceptions/JSONStoreRemoveException
    //   166: dup
    //   167: ldc_w 766
    //   170: aload 7
    //   172: invokespecial 767	com/worklight/jsonstore/exceptions/JSONStoreRemoveException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   175: athrow
    //   176: astore 4
    //   178: aload_3
    //   179: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   182: aload 4
    //   184: athrow
    //   185: astore 27
    //   187: new 746	com/worklight/jsonstore/exceptions/JSONStoreRemoveException
    //   190: dup
    //   191: aload 27
    //   193: invokespecial 768	com/worklight/jsonstore/exceptions/JSONStoreRemoveException:<init>	(Ljava/lang/Throwable;)V
    //   196: athrow
    //   197: astore 19
    //   199: new 201	java/lang/StringBuilder
    //   202: dup
    //   203: invokespecial 202	java/lang/StringBuilder:<init>	()V
    //   206: ldc_w 770
    //   209: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   212: aload_0
    //   213: invokevirtual 136	com/worklight/jsonstore/api/JSONStoreCollection:getName	()Ljava/lang/String;
    //   216: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   219: ldc_w 772
    //   222: invokevirtual 311	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   225: invokevirtual 222	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   228: astore 20
    //   230: aload_0
    //   231: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   234: aload 20
    //   236: invokevirtual 775	com/worklight/jsonstore/util/JSONStoreLogger:logTrace	(Ljava/lang/String;)V
    //   239: aload 9
    //   241: aload 18
    //   243: invokeinterface 195 2 0
    //   248: pop
    //   249: aload_0
    //   250: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   253: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   256: istore 22
    //   258: iload 22
    //   260: ifeq -167 -> 93
    //   263: aload 5
    //   265: invokeinterface 150 1 0
    //   270: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   273: goto -180 -> 93
    //   276: astore 23
    //   278: new 746	com/worklight/jsonstore/exceptions/JSONStoreRemoveException
    //   281: dup
    //   282: aload 23
    //   284: invokespecial 768	com/worklight/jsonstore/exceptions/JSONStoreRemoveException:<init>	(Ljava/lang/Throwable;)V
    //   287: athrow
    //   288: aload 9
    //   290: invokeinterface 215 1 0
    //   295: ifle +68 -> 363
    //   298: aload_0
    //   299: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   302: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   305: istore 15
    //   307: iload 15
    //   309: ifeq +13 -> 322
    //   312: aload 5
    //   314: invokeinterface 150 1 0
    //   319: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   322: new 746	com/worklight/jsonstore/exceptions/JSONStoreRemoveException
    //   325: dup
    //   326: ldc_w 777
    //   329: aload 9
    //   331: invokespecial 780	com/worklight/jsonstore/exceptions/JSONStoreRemoveException:<init>	(Ljava/lang/String;Ljava/util/List;)V
    //   334: astore 16
    //   336: aload_0
    //   337: getfield 36	com/worklight/jsonstore/api/JSONStoreCollection:logger	Lcom/worklight/jsonstore/util/JSONStoreLogger;
    //   340: ldc_w 777
    //   343: aload 16
    //   345: invokevirtual 59	com/worklight/jsonstore/util/JSONStoreLogger:logError	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   348: aload 16
    //   350: athrow
    //   351: astore 17
    //   353: new 746	com/worklight/jsonstore/exceptions/JSONStoreRemoveException
    //   356: dup
    //   357: aload 17
    //   359: invokespecial 768	com/worklight/jsonstore/exceptions/JSONStoreRemoveException:<init>	(Ljava/lang/Throwable;)V
    //   362: athrow
    //   363: aload_0
    //   364: getfield 118	com/worklight/jsonstore/api/JSONStoreCollection:initializedJSONStoreInstance	Lcom/worklight/jsonstore/api/WLJSONStore;
    //   367: invokevirtual 254	com/worklight/jsonstore/api/WLJSONStore:isTransactionInProgress	()Z
    //   370: istore 13
    //   372: iload 13
    //   374: ifne +23 -> 397
    //   377: aload 5
    //   379: invokeinterface 150 1 0
    //   384: invokevirtual 339	net/sqlcipher/database/SQLiteDatabase:setTransactionSuccessful	()V
    //   387: aload 5
    //   389: invokeinterface 150 1 0
    //   394: invokevirtual 322	net/sqlcipher/database/SQLiteDatabase:endTransaction	()V
    //   397: aload_3
    //   398: invokevirtual 251	com/worklight/jsonstore/util/JSONStoreLogger$JSONStoreAnalyticsLogInstance:end	()V
    //   401: iload 10
    //   403: ireturn
    //   404: astore 14
    //   406: new 746	com/worklight/jsonstore/exceptions/JSONStoreRemoveException
    //   409: dup
    //   410: aload 14
    //   412: invokespecial 768	com/worklight/jsonstore/exceptions/JSONStoreRemoveException:<init>	(Ljava/lang/Throwable;)V
    //   415: athrow
    //   416: iconst_0
    //   417: istore 25
    //   419: goto -280 -> 139
    //
    // Exception table:
    //   from	to	target	type
    //   41	48	161	com/worklight/jsonstore/exceptions/JSONStoreFindException
    //   15	21	176	finally
    //   25	33	176	finally
    //   33	41	176	finally
    //   41	48	176	finally
    //   48	57	176	finally
    //   60	69	176	finally
    //   74	84	176	finally
    //   84	93	176	finally
    //   93	115	176	finally
    //   120	136	176	finally
    //   139	151	176	finally
    //   163	176	176	finally
    //   187	197	176	finally
    //   199	258	176	finally
    //   263	273	176	finally
    //   278	288	176	finally
    //   288	307	176	finally
    //   312	322	176	finally
    //   322	351	176	finally
    //   353	363	176	finally
    //   363	372	176	finally
    //   377	397	176	finally
    //   406	416	176	finally
    //   74	84	185	java/lang/Throwable
    //   120	136	197	java/lang/Throwable
    //   139	151	197	java/lang/Throwable
    //   263	273	276	java/lang/Throwable
    //   312	322	351	java/lang/Throwable
    //   377	397	404	java/lang/Throwable
  }

  public int replaceDocument(JSONObject paramJSONObject)
    throws JSONStoreReplaceException, JSONStoreDatabaseClosedException
  {
    return replaceDocument(paramJSONObject, null);
  }

  public int replaceDocument(JSONObject paramJSONObject, JSONStoreReplaceOptions paramJSONStoreReplaceOptions)
    throws JSONStoreReplaceException, JSONStoreDatabaseClosedException
  {
    if (paramJSONObject == null)
      return 0;
    ArrayList localArrayList = new ArrayList(1);
    localArrayList.add(paramJSONObject);
    return replaceDocuments(localArrayList, paramJSONStoreReplaceOptions);
  }

  public int replaceDocuments(List<JSONObject> paramList)
    throws JSONStoreDatabaseClosedException, JSONStoreReplaceException
  {
    return replaceDocuments(paramList, null);
  }

  public int replaceDocuments(List<JSONObject> paramList, JSONStoreReplaceOptions paramJSONStoreReplaceOptions)
    throws JSONStoreDatabaseClosedException, JSONStoreReplaceException
  {
    int i = 0;
    JSONStoreLogger.JSONStoreAnalyticsLogInstance localJSONStoreAnalyticsLogInstance = JSONStoreLogger.startAnalyticsInstance(getUsername(), getName(), JSONStoreLogger.OPERATION_REPLACE);
    if (paramList == null)
    {
      localJSONStoreAnalyticsLogInstance.end();
      return 0;
    }
    if (paramJSONStoreReplaceOptions == null);
    DatabaseAccessor localDatabaseAccessor;
    LinkedList localLinkedList;
    while (true)
    {
      try
      {
        paramJSONStoreReplaceOptions = new JSONStoreReplaceOptions();
        localDatabaseAccessor = getAccessor();
        localLinkedList = new LinkedList();
        localDatabaseAccessor.getRawDatabase().beginTransaction();
        try
        {
          Iterator localIterator = paramList.iterator();
          if (!localIterator.hasNext())
            break;
          JSONObject localJSONObject = (JSONObject)localIterator.next();
          if (localJSONObject == null)
            continue;
          i++;
          try
          {
            WritableDatabase localWritableDatabase = localDatabaseAccessor.getWritableDatabase();
            if (paramJSONStoreReplaceOptions.isMarkDirty())
              break label224;
            bool = true;
            localWritableDatabase.update(localJSONObject, bool);
          }
          catch (Throwable localThrowable)
          {
            String str = "Error while updating document on collection \"" + this.schema.getName() + "\".";
            this.logger.logTrace(str);
          }
          if (localJSONObject == null)
            continue;
          localLinkedList.add(localJSONObject);
          continue;
        }
        finally
        {
          localDatabaseAccessor.getRawDatabase().endTransaction();
        }
      }
      finally
      {
        localJSONStoreAnalyticsLogInstance.end();
      }
      label224: boolean bool = false;
    }
    if (localLinkedList.size() != 0)
    {
      JSONStoreReplaceException localJSONStoreReplaceException = new JSONStoreReplaceException("At least one document failed to be replaced.", localLinkedList);
      this.logger.logError("At least one document failed to be replaced.", localJSONStoreReplaceException);
      throw localJSONStoreReplaceException;
    }
    localDatabaseAccessor.getRawDatabase().setTransactionSuccessful();
    localDatabaseAccessor.getRawDatabase().endTransaction();
    localJSONStoreAnalyticsLogInstance.end();
    return i;
  }

  public void setAdditionalSearchField(String paramString, SearchFieldType paramSearchFieldType)
  {
    if (paramSearchFieldType != null);
    while (true)
    {
      this.additionalSearchFields.put(paramString, paramSearchFieldType);
      return;
      paramSearchFieldType = SearchFieldType.STRING;
    }
  }

  public void setSearchField(String paramString, SearchFieldType paramSearchFieldType)
  {
    if ((paramString == null) || (paramString.isEmpty()))
      return;
    if (paramSearchFieldType != null);
    while (true)
    {
      this.searchFields.put(paramString, paramSearchFieldType);
      return;
      paramSearchFieldType = SearchFieldType.STRING;
    }
  }

  public boolean wasReopened()
  {
    return this.wasReopened;
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.worklight.jsonstore.api.JSONStoreCollection
 * JD-Core Version:    0.6.2
 */