package com.worklight.jsonstore.api;

import com.worklight.jsonstore.exceptions.JSONStoreFindException;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class JSONStoreQueryParts
{
  private List<JSONStoreQueryPart> parts;

  public JSONStoreQueryParts()
  {
    this.parts = new ArrayList();
  }

  public JSONStoreQueryParts(JSONArray paramJSONArray)
    throws JSONStoreFindException
  {
    if (paramJSONArray == null)
    {
      this.parts = new ArrayList();
      return;
    }
    this.parts = new ArrayList(paramJSONArray.length());
    int i = 0;
    while (i < paramJSONArray.length())
      try
      {
        JSONObject localJSONObject = paramJSONArray.getJSONObject(i);
        this.parts.add(new JSONStoreQueryPart(localJSONObject));
        i++;
      }
      catch (JSONException localJSONException)
      {
        throw new JSONStoreFindException("Value in query at index " + i + " is not a JSON Object", localJSONException);
      }
  }

  public void addQueryPart(JSONStoreQueryPart paramJSONStoreQueryPart)
  {
    if (paramJSONStoreQueryPart != null)
      this.parts.add(paramJSONStoreQueryPart);
  }

  public List<JSONStoreQueryPart> getAllQueryParts()
  {
    return this.parts;
  }
}

/* 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.JSONStoreQueryParts
 * JD-Core Version:    0.6.2
 */