package com.example.ismailamrani.comptable.Models;

/**
 * Created by Ismail Amrani on 23/03/2016.
 */
public class ProduitModel {

    int ID;
    String Libelle;
    Double PrixHT;
    Double PrixTTC;
    String CodeBarre;
    String Photo;
    int Qte;
    int Locale_ID;
    String url;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public String getLibelle() {
        return Libelle;
    }

    public void setLibelle(String libelle) {
        Libelle = libelle;
    }

    public Double getPrixHT() {
        return PrixHT;
    }

    public void setPrixHT(Double prixHT) {
        PrixHT = prixHT;
    }

    public Double getPrixTTC() {
        return PrixTTC;
    }

    public void setPrixTTC(Double prixTTC) {
        PrixTTC = prixTTC;
    }

    public String getCodeBarre() {
        return CodeBarre;
    }

    public void setCodeBarre(String codeBarre) {
        CodeBarre = codeBarre;
    }

    public String getPhoto() {
        return Photo;
    }

    public void setPhoto(String photo) {
        Photo = photo;
    }

    public int getQte() {
        return Qte;
    }

    public void setQte(int qte) {
        Qte = qte;
    }

    public int getLocale_ID() {
        return Locale_ID;
    }

    public void setLocale_ID(int locale_ID) {
        Locale_ID = locale_ID;
    }
}

@@ -45,16 +45,76 @@
 odels;%0A%0A
+import org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0A
 /**%0A * C
@@ -345,16 +345,1042 @@
 g url;%0A%0A
+    /**%0A     * Overloaded constructor.%0A     * Creates a new Product model based on the passed-in JSON object%0A     *%0A     * @param object to be parsed.%0A     */%0A    public ProduitModel(JSONObject object) throws JSONException %7B%0A        this(%0A                object.getInt(%22ID%22),%0A                object.getString(%22Libelle%22),%0A                object.getDouble(%22PrixHT%22),%0A                object.getDouble(%22PrixTTC%22),%0A                object.getString(%22CodeBar%22),%0A                object.getString(%22Photo%22),%0A                object.getInt(%22Qte%22),%0A                object.getInt(%22Locale_ID%22),%0A                %22%22%0A        );%0A    %7D%0A%0A    public ProduitModel(int ID, String libelle, Double prixHT, Double prixTTC,%0A                        String codeBarre, String photo, int qte, int locale_ID, String url) %7B%0A        this.ID = ID;%0A        Libelle = libelle;%0A        PrixHT = prixHT;%0A        PrixTTC = prixTTC;%0A        CodeBarre = codeBarre;%0A        Photo = photo;%0A        Qte = qte;%0A        Locale_ID = locale_ID;%0A        this.url = url;%0A    %7D%0A%0A
     publ

Add an overloaded constructor to the Product's model class that creates a new instance extracted from a JSON object.