Android Open Source - SNISI-droid Nutrition Weekly Report Data






From Project

Back to project page SNISI-droid.

License

The source code is released under:

Apache License

If you think the Android project SNISI-droid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.yeleman.nutrition;
/*from  w ww.  j a  v  a2 s.  c om*/
import android.util.Log;

import com.orm.SugarRecord;
import com.orm.query.Select;
import static com.orm.SugarRecord.save;

import com.orm.dsl.Ignore;
import com.orm.dsl.Table;

import com.yeleman.snisidroid.Constants;
import com.yeleman.snisidroid.ReportData;

public class NutritionWeeklyReportData extends ReportData {

    @Ignore
    private final static String TAG = Constants.getLogTag(
            NutritionWeeklyReportData.class.getSimpleName());

    int mam_screening = -1;
    int mam_cases = -1;
    int mam_deaths = -1;

    int sam_screening = -1;
    int sam_cases = -1;
    int sam_deaths = -1;

    int samc_screening = -1;
    int samc_cases = -1;
    int samc_deaths = -1;

    boolean is_complete;

    public NutritionWeeklyReportData() {}

    public static NutritionWeeklyReportData get() {
        NutritionWeeklyReportData report = getUniqueRecord(NutritionWeeklyReportData.class);
        if (report == null) {
            Log.d(TAG, "No Record in DB. Creating.");
            report = new NutritionWeeklyReportData();
            report.safeSave();
        } else {
            Log.d(TAG, "Record exist in Database.");
        }
        return report;
    }

    @Override
    protected String buildName() {
        return "Hebdo NUT";
    }

    protected Boolean isComplete(){
        return is_complete;
    }

    protected Boolean atLeastOneIsComplete(){
        return is_complete;
    }

    protected void resetReportData() {
        this.is_complete = false;
        this.safeSave();
    }

    public String buildSMSText() {
        return Constants.stringFromReport(mam_screening) + Constants.SPACER +
               Constants.stringFromReport(mam_cases) + Constants.SPACER +
               Constants.stringFromReport(mam_deaths) + Constants.SPACER +
               Constants.stringFromReport(sam_screening) + Constants.SPACER +
               Constants.stringFromReport(sam_cases) + Constants.SPACER +
               Constants.stringFromReport(sam_deaths) + Constants.SPACER +
               Constants.stringFromReport(samc_screening) + Constants.SPACER +
               Constants.stringFromReport(samc_cases) + Constants.SPACER +
               Constants.stringFromReport(samc_deaths);
    }
}




Java Source Code List

com.yeleman.nutrition.NutritionHome.java
com.yeleman.nutrition.NutritionInputsReportData.java
com.yeleman.nutrition.NutritionInputsReport.java
com.yeleman.nutrition.NutritionMonthlyHome.java
com.yeleman.nutrition.NutritionMonthlyReportData.java
com.yeleman.nutrition.NutritionSummaryReport.java
com.yeleman.nutrition.NutritionURENAMExsamReport.java
com.yeleman.nutrition.NutritionURENAMO59Report.java
com.yeleman.nutrition.NutritionURENAMPWReport.java
com.yeleman.nutrition.NutritionURENAMReportData.java
com.yeleman.nutrition.NutritionURENAMReport.java
com.yeleman.nutrition.NutritionURENAMU23O6Report.java
com.yeleman.nutrition.NutritionURENAMU59O23Report.java
com.yeleman.nutrition.NutritionURENASO59Report.java
com.yeleman.nutrition.NutritionURENASReportData.java
com.yeleman.nutrition.NutritionURENASReport.java
com.yeleman.nutrition.NutritionURENASU59O6Report.java
com.yeleman.nutrition.NutritionURENFormIface.java
com.yeleman.nutrition.NutritionURENForm.java
com.yeleman.nutrition.NutritionURENIO59Report.java
com.yeleman.nutrition.NutritionURENIReportData.java
com.yeleman.nutrition.NutritionURENIReport.java
com.yeleman.nutrition.NutritionURENIU59O6Report.java
com.yeleman.nutrition.NutritionURENIU6Report.java
com.yeleman.nutrition.NutritionWeeklyReportData.java
com.yeleman.nutrition.NutritionWeeklyReport.java
com.yeleman.projetsnisi.ApplicationTest.java
com.yeleman.smir.Constants.java
com.yeleman.smir.CustomOnItemSelectedListener.java
com.yeleman.smir.SMIRAlert.java
com.yeleman.smir.SMIRHome.java
com.yeleman.smir.SharedChecks.java
com.yeleman.snisidroid.ChangePassword.java
com.yeleman.snisidroid.CheckedFormActivity.java
com.yeleman.snisidroid.Constants.java
com.yeleman.snisidroid.Popups.java
com.yeleman.snisidroid.Preferences.java
com.yeleman.snisidroid.ReportData.java
com.yeleman.snisidroid.SMSDeliveredReceiver.java
com.yeleman.snisidroid.SMSReceiver.java
com.yeleman.snisidroid.SMSSentReceiver.java
com.yeleman.snisidroid.SMSUpdater.java
com.yeleman.snisidroid.SNISIAbout.java
com.yeleman.snisidroid.SNISIApp.java
com.yeleman.snisidroid.SNISIHome.java
com.yeleman.snisidroid.SharedChecks.java