@@ -0,0 +1,2328 @@
+package com.expidev.gcmapp.support.v4.content;%0A%0Aimport static com.expidev.gcmapp.Constants.ARG_GUID;%0Aimport static com.expidev.gcmapp.Constants.ARG_MCC;%0Aimport static com.expidev.gcmapp.Constants.ARG_MINISTRY_ID;%0Aimport static com.expidev.gcmapp.Constants.ARG_PERIOD;%0Aimport static com.expidev.gcmapp.Constants.ARG_PERMLINK;%0A%0Aimport android.content.Context;%0Aimport android.os.Bundle;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.Nullable;%0A%0Aimport com.expidev.gcmapp.db.GmaDao;%0Aimport com.expidev.gcmapp.model.MeasurementDetails;%0Aimport com.expidev.gcmapp.model.Ministry;%0Aimport com.expidev.gcmapp.model.Ministry.Mcc;%0A%0Aimport org.ccci.gto.android.common.support.v4.content.AsyncTaskBroadcastReceiverLoader;%0Aimport org.ccci.gto.android.common.util.BundleCompat;%0Aimport org.joda.time.YearMonth;%0A%0Apublic class MeasurementDetailsLoader extends AsyncTaskBroadcastReceiverLoader%3CMeasurementDetails%3E %7B%0A    private final GmaDao mDao;%0A%0A    @Nullable%0A    private final String mGuid;%0A    @NonNull%0A    private final String mMinistryId;%0A    @NonNull%0A    private final Mcc mMcc;%0A    @Nullable%0A    private final String mPermLink;%0A    @NonNull%0A    private final YearMonth mPeriod;%0A%0A    public MeasurementDetailsLoader(@NonNull final Context context, @Nullable final Bundle args) %7B%0A        super(context);%0A        mDao = GmaDao.getInstance(context);%0A%0A        if (args != null) %7B%0A            mGuid = args.getString(ARG_GUID);%0A            mMinistryId = BundleCompat.getString(args, ARG_MINISTRY_ID, Ministry.INVALID_ID);%0A            mMcc = Mcc.fromRaw(args.getString(ARG_MCC));%0A            mPermLink = args.getString(ARG_PERMLINK);%0A            final String rawPeriod = args.getString(ARG_PERIOD);%0A            mPeriod = rawPeriod != null ? YearMonth.parse(rawPeriod) : YearMonth.now();%0A        %7D else %7B%0A            mGuid = null;%0A            mMinistryId = Ministry.INVALID_ID;%0A            mMcc = Mcc.UNKNOWN;%0A            mPermLink = null;%0A            mPeriod = YearMonth.now();%0A        %7D%0A    %7D%0A%0A    @Override%0A    public MeasurementDetails loadInBackground() %7B%0A        if (mGuid != null && !Ministry.INVALID_ID.equals(mMinistryId) && mMcc != Mcc.UNKNOWN && mPermLink != null) %7B%0A            return mDao.find(MeasurementDetails.class, mGuid, mMinistryId, mMcc, mPermLink, mPeriod);%0A        %7D%0A        return null;%0A    %7D%0A%7D%0A

implement ContentLoader for MeasurementDetails objects