package org.adaptlab.chpir.android.models;

public class ParticipantProperty {

}

@@ -41,42 +41,1921 @@
 s;%0A%0A
-public class ParticipantProperty %7B%0A
+import org.adaptlab.chpir.android.activerecordcloudsync.SendModel;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport android.util.Log;%0A%0Aimport com.activeandroid.annotation.Column;%0Aimport com.activeandroid.annotation.Table;%0A%0A@Table(name = %22ParticipantProperty%22)%0Apublic class ParticipantProperty extends SendModel %7B%0A    private static final String TAG = %22ParticipantProperty%22;%0A    %0A    @Column(name = %22SentToRemote%22)%0A    private boolean mSent;%0A    @Column(name = %22Participant%22)%0A    private Participant mParticipant;%0A    @Column(name = %22Property%22)%0A    private Property mProperty;%0A    @Column(name = %22Value%22)%0A    private String mValue;%0A    %0A    public ParticipantProperty(Participant participant, Property property, String value) %7B%0A        super();%0A        mSent = false;%0A        mParticipant = participant;%0A        mProperty = property;%0A        mValue = value;%0A    %7D%0A%0A    @Override%0A    public JSONObject toJSON() %7B%0A        JSONObject json = new JSONObject();%0A        %0A        try %7B%0A            JSONObject jsonObject = new JSONObject();%0A            // TODO: Change to participant id%0A            jsonObject.put(%22participant_id%22, getParticipant());%0A            jsonObject.put(%22property_id%22, getProperty().getRemoteId());%0A            jsonObject.put(%22value%22, getValue());%0A            %0A            json.put(%22participant_property%22, jsonObject);%0A        %7D catch (JSONException je) %7B%0A            Log.e(TAG, %22JSON exception%22, je);%0A        %7D%0A        return json;%0A    %7D%0A%0A    @Override%0A    public boolean isSent() %7B%0A        return mSent;%0A    %7D%0A%0A    @Override%0A    public boolean readyToSend() %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public void setAsSent() %7B%0A        mSent = true;%0A    %7D%0A    %0A    public Participant getParticipant() %7B%0A        return mParticipant;%0A    %7D%0A    %0A    public Property getProperty() %7B%0A        return mProperty;%0A    %7D%0A    %0A    public String getValue() %7B%0A        return mValue;%0A    %7D
 %0A%7D%0A

Add ParticipantProperty model