當前位置: 首頁>>代碼示例>>Java>>正文


Java BaseModel.Action方法代碼示例

本文整理匯總了Java中com.raizlabs.android.dbflow.structure.BaseModel.Action方法的典型用法代碼示例。如果您正苦於以下問題:Java BaseModel.Action方法的具體用法?Java BaseModel.Action怎麽用?Java BaseModel.Action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.raizlabs.android.dbflow.structure.BaseModel的用法示例。


在下文中一共展示了BaseModel.Action方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onModelStateChanged

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public void onModelStateChanged(Class<? extends Model> aClass, BaseModel.Action action) {
    Log.d(TAG, "onModelStateChanged() " + aClass.getSimpleName() + ": " + action);

    if (notifyLoader(action)) {
        mLoader.onContentChanged();
    }
}
 
開發者ID:dhis2,項目名稱:dhis2-android-dashboard,代碼行數:9,代碼來源:ModelChangeObserver.java

示例2: notifyLoader

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
private boolean notifyLoader(BaseModel.Action action) {
    if (mTrackedTable.getActions().isEmpty()) {
        return true;
    }

    for (BaseModel.Action modelAction : mTrackedTable.getActions()) {
        if (modelAction.equals(action)) {
            return true;
        }
    }

    return false;
}
 
開發者ID:dhis2,項目名稱:dhis2-android-dashboard,代碼行數:14,代碼來源:ModelChangeObserver.java

示例3: onCreateLoader

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public Loader<Boolean> onCreateLoader(int id, Bundle args) {
    List<BaseModel.Action> actionsToTrack = Arrays.asList(
            BaseModel.Action.INSERT, BaseModel.Action.DELETE);
    List<DbLoader.TrackedTable> trackedTables = Arrays.asList(
            new DbLoader.TrackedTable(Dashboard.class, actionsToTrack));
    return new DbLoader<>(getActivity().getApplicationContext(),
            trackedTables, new DashboardsQuery());
}
 
開發者ID:dhis2,項目名稱:dhis2-android-dashboard,代碼行數:10,代碼來源:DashboardContainerFragment.java

示例4: onCreateLoader

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public Loader<Boolean> onCreateLoader(int i, Bundle bundle) {
    List<BaseModel.Action> actionsToTrack = Arrays.asList(
            BaseModel.Action.INSERT, BaseModel.Action.DELETE);
    List<DbLoader.TrackedTable> trackedTables = Arrays.asList(
            new DbLoader.TrackedTable(Interpretation.class, actionsToTrack));
    return new DbLoader<>(getActivity().getApplicationContext(),
            trackedTables, new InterpretationsQuery());
}
 
開發者ID:dhis2,項目名稱:dhis2-android-dashboard,代碼行數:10,代碼來源:InterpretationContainerFragment.java

示例5: notifyModelChanged

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public <TModel> void notifyModelChanged(@NonNull TModel model,
                                        @NonNull ModelAdapter<TModel> adapter,
                                        @NonNull BaseModel.Action action) {
    FlowManager.getModelNotifierForTable(adapter.getModelClass())
        .notifyModelChanged(model, adapter, action);
}
 
開發者ID:Raizlabs,項目名稱:DBFlow,代碼行數:8,代碼來源:NotifyDistributor.java

示例6: notifyModelChanged

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public <T> void notifyModelChanged(@NonNull T model, @NonNull ModelAdapter<T> adapter,
                                   @NonNull BaseModel.Action action) {
    final Set<OnModelStateChangedListener> listeners = modelChangedListenerMap.get(adapter.getModelClass());
    if (listeners != null) {
        for (OnModelStateChangedListener listener : listeners) {
            if (listener != null) {
                listener.onModelChanged(model, action);
            }
        }
    }
}
 
開發者ID:Raizlabs,項目名稱:DBFlow,代碼行數:13,代碼來源:DirectModelNotifier.java

示例7: notifyModelChanged

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public <T> void notifyModelChanged(@NonNull T model, @NonNull ModelAdapter<T> adapter,
                                   @NonNull BaseModel.Action action) {
    if (FlowContentObserver.shouldNotify()) {
        FlowManager.getContext().getContentResolver()
                .notifyChange(SqlUtils.getNotificationUri(contentAuthority,
                        adapter.getModelClass(), action,
                        adapter.getPrimaryConditionClause(model).getConditions()), null, true);
    }
}
 
開發者ID:Raizlabs,項目名稱:DBFlow,代碼行數:11,代碼來源:ContentResolverNotifier.java

示例8: notifyTableChanged

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public <T> void notifyTableChanged(@NonNull Class<T> table, @NonNull BaseModel.Action action) {
    if (FlowContentObserver.shouldNotify()) {
        FlowManager.getContext().getContentResolver()
                .notifyChange(SqlUtils.getNotificationUri(contentAuthority,
                        table, action, (SQLOperator[]) null), null, true);
    }
}
 
開發者ID:Raizlabs,項目名稱:DBFlow,代碼行數:9,代碼來源:ContentResolverNotifier.java

示例9: ModelChange

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
public ModelChange(M data, BaseModel.Action action) {
    mData = data;
    mAction = action;
}
 
開發者ID:hyb1996,項目名稱:Auto.js,代碼行數:5,代碼來源:ModelChange.java

示例10: getAction

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
public BaseModel.Action getAction() {
    return mAction;
}
 
開發者ID:hyb1996,項目名稱:Auto.js,代碼行數:4,代碼來源:ModelChange.java

示例11: getPrimaryAction

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public BaseModel.Action getPrimaryAction() {
    return mRealSet.getPrimaryAction();
}
 
開發者ID:roadhouse-dev,項目名稱:RxDbflow,代碼行數:5,代碼來源:RxSet.java

示例12: getPrimaryAction

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public BaseModel.Action getPrimaryAction() {
    return mRealFrom.getPrimaryAction();
}
 
開發者ID:roadhouse-dev,項目名稱:RxDbflow,代碼行數:5,代碼來源:RxFrom.java

示例13: getPrimaryAction

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
@Override
public BaseModel.Action getPrimaryAction() {
    return mRealIndexedBy.getPrimaryAction();
}
 
開發者ID:roadhouse-dev,項目名稱:RxDbflow,代碼行數:5,代碼來源:RxIndexedBy.java

示例14: TrackedTable

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
public TrackedTable(Class<? extends Model> trackedModel,
                    BaseModel.Action action) {
    this(trackedModel, Arrays.asList(action));
}
 
開發者ID:dhis2,項目名稱:dhis2-android-dashboard,代碼行數:5,代碼來源:DbLoader.java

示例15: getActions

import com.raizlabs.android.dbflow.structure.BaseModel; //導入方法依賴的package包/類
public List<BaseModel.Action> getActions() {
    return mActions;
}
 
開發者ID:dhis2,項目名稱:dhis2-android-dashboard,代碼行數:4,代碼來源:DbLoader.java


注:本文中的com.raizlabs.android.dbflow.structure.BaseModel.Action方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。