当前位置: 首页>>代码示例>>Java>>正文


Java Delete类代码示例

本文整理汇总了Java中com.raizlabs.android.dbflow.sql.language.Delete的典型用法代码示例。如果您正苦于以下问题:Java Delete类的具体用法?Java Delete怎么用?Java Delete使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Delete类属于com.raizlabs.android.dbflow.sql.language包,在下文中一共展示了Delete类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: wipeDatabase

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
/**
 * Deletes all data from the app database
 */
public static void wipeDatabase() {
    Delete.tables(
            Value.class,
            Score.class,
            Survey.class,
            SurveySchedule.class,
            OrgUnit.class,
            OrgUnitLevel.class,
            OrgUnitProgramRelation.class,
            User.class,
            QuestionOption.class,
            Match.class,
            QuestionRelation.class,
            Question.class,
            CompositeScore.class,
            Option.class,
            Answer.class,
            Header.class,
            Tab.class,
            Program.class,
            ServerMetadata.class,
            Media.class
    );
}
 
开发者ID:EyeSeeTea,项目名称:EDSApp,代码行数:28,代码来源:PopulateDB.java

示例2: cleanDB

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public static void cleanDB(){
    if(!databaseExists()){
        return;
    }
    // Clean DB
    Delete.tables(Question.class, CompositeScore.class, Option.class, Answer.class, Header.class, Tab.class, Program.class, OrgUnit.class, User.class, Value.class, Survey.class);
    /*new Delete().from(Question.class).where(Condition.column(Question$Table.ID).isNotNull()).query();
    new Delete().from(CompositeScore.class).where(Condition.column(CompositeScore$Table.ID).isNotNull()).query();;
    new Delete().from(Option.class).where(Condition.column(Option$Table.ID).isNotNull()).query();;
    new Delete().from(Answer.class).where(Condition.column(Answer$Table.ID).isNotNull()).query();;
    new Delete().from(Header.class).where(Condition.column(Header$Table.ID).isNotNull()).query();;
    new Delete().from(Tab.class).where(Condition.column(Tab$Table.ID).isNotNull()).query();;
    new Delete().from(Program.class).where(Condition.column(Program$Table.ID).isNotNull()).query();;
    new Delete().from(OrgUnit.class).where(Condition.column(OrgUnit$Table.ID).isNotNull()).query();;
    new Delete().from(User.class).where(Condition.column(User$Table.ID).isNotNull()).query();;
    new Delete().from(Value.class).where(Condition.column(Value$Table.ID).isNotNull()).query();;
    new Delete().from(Survey.class).where(Condition.column(Survey$Table.ID).isNotNull()).query();;*/
}
 
开发者ID:EyeSeeTea,项目名称:EDSApp,代码行数:19,代码来源:MalariaEspressoTest.java

示例3: addFun_Part

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public static void addFun_Part(List<Results> results) {
    Delete.table(PartDbBean.class);
    for (Results result : results) {
        PartDbBean partDbBean = new PartDbBean();
        partDbBean.who = result.getWho();
        partDbBean.publishedAt = result.getPublishedAt();
        partDbBean.desc = result.getDesc();
        partDbBean.type = result.getType();
        partDbBean.url = result.getUrl();
        partDbBean.used = result.getUsed();
        partDbBean.objectId = result.get_id();
        partDbBean.createdAt = result.getCreatedAt();
        partDbBean.save();
    }

}
 
开发者ID:hugeterry,项目名称:coderfun,代码行数:17,代码来源:FunDao.java

示例4: addFun_Girly

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public static void addFun_Girly(List<Results> results) {
    Delete.table(GirlyDbBean.class);
    for (Results result : results) {
        GirlyDbBean girlyDbBean = new GirlyDbBean();
        girlyDbBean.who = result.getWho();
        girlyDbBean.publishedAt = result.getPublishedAt();
        girlyDbBean.desc = result.getDesc();
        girlyDbBean.type = result.getType();
        girlyDbBean.url = result.getUrl();
        girlyDbBean.used = result.getUsed();
        girlyDbBean.objectId = result.get_id();
        girlyDbBean.createdAt = result.getCreatedAt();
        girlyDbBean.save();
    }

}
 
开发者ID:hugeterry,项目名称:coderfun,代码行数:17,代码来源:FunDao.java

示例5: addFun_Real

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public static void addFun_Real(List<List<Results>> results) {
    Delete.table(RealDbBean.class);
    for (List<Results> result : results) {
        for (int i = 0; i < result.size(); i++) {
            RealDbBean realDbBean = new RealDbBean();
            realDbBean.who = result.get(i).getWho();
            realDbBean.publishedAt = result.get(i).getPublishedAt();
            realDbBean.desc = result.get(i).getDesc();
            realDbBean.type = result.get(i).getType();
            realDbBean.url = result.get(i).getUrl();
            realDbBean.used = result.get(i).getUsed();
            realDbBean.objectId = result.get(i).get_id();
            realDbBean.createdAt = result.get(i).getCreatedAt();
            realDbBean.save();
        }
    }

}
 
开发者ID:hugeterry,项目名称:coderfun,代码行数:19,代码来源:FunDao.java

示例6: logOut

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public void logOut() {
    LastUpdatedManager.getInstance().delete();
    DateTimeManager.getInstance().delete();
    SessionManager.getInstance().delete();

    // remove data
    Delete.tables(
            Dashboard.class,
            DashboardElement.class,
            DashboardItem.class,
            DashboardItemContent.class,
            Interpretation.class,
            InterpretationComment.class,
            InterpretationElement.class,
            User.class,
            UserAccount.class
    );
}
 
开发者ID:dhis2,项目名称:dhis2-android-dashboard,代码行数:19,代码来源:UserController.java

示例7: wipeDataBase

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
/**
 * Deletes all data from the app database
 */

public static void wipeDataBase() {
    Delete.tables(
            Value.class,
            Score.class,
            Survey.class,
            SurveySchedule.class,
            OrgUnit.class,
            OrgUnitLevel.class,
            OrgUnitProgramRelation.class,
            User.class,
            QuestionOption.class,
            Match.class,
            QuestionRelation.class,
            Question.class,
            CompositeScore.class,
            Option.class,
            Answer.class,
            Header.class,
            Tab.class,
            Program.class,
            ServerMetadata.class,
            Media.class
    );
}
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:29,代码来源:ConversionLocalDataSource.java

示例8: wipeDatabase

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
/**
 * Deletes all data from the app database
 */

public static void wipeDatabase() {
    Delete.tables(
            Value.class,
            Score.class,
            Survey.class,
            SurveySchedule.class,
            OrgUnit.class,
            OrgUnitLevel.class,
            OrgUnitProgramRelation.class,
            User.class,
            QuestionOption.class,
            Match.class,
            QuestionRelation.class,
            Question.class,
            CompositeScore.class,
            org.eyeseetea.malariacare.data.database.model.Option.class,
            Answer.class,
            Header.class,
            Tab.class,
            org.eyeseetea.malariacare.data.database.model.Program.class,
            ServerMetadata.class,
            Media.class
    );
}
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:29,代码来源:PopulateDB.java

示例9: wipeDataBase

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public void wipeDataBase() {

        Delete.tables(
                EventFlow.class,
                TrackedEntityDataValueFlow.class,
                DataElementFlow.class,
                ProgramFlow.class,
                AttributeFlow.class,
                AttributeValueFlow.class,
                ModelLinkFlow.class,
                OptionSetFlow.class,
                OptionFlow.class,
                OrganisationUnitFlow.class,
                OrganisationUnitLevelFlow.class,
                OrganisationUnitToProgramRelationFlow.class,
                ProgramStageDataElementFlow.class,
                ProgramStageSectionFlow.class,
                ProgramStageFlow.class,
                FailedItemFlow.class,
                StateFlow.class,
                FailedItemFlow.class
        );
    }
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:24,代码来源:PullDhisSDKDataSource.java

示例10: onDelete

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
@Test
public void onDelete() {
    save("张三");

    new Delete().from(UserModel.class)
                .where(UserModel_Table.name.eq("张三"))
                .execute();

    Assert.assertEquals(0, new Select(Method.count()).from(UserModel.class).count());
}
 
开发者ID:kkmike999,项目名称:YuiHatano,代码行数:11,代码来源:DbFlowTest.java

示例11: deleteEntityWithId

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
@CheckResult
@NonNull
@Override
public Completable deleteEntityWithId(@NonNull Id entityId) {
  return Completable
      .fromAction(() ->
          new Delete()
              .from(getModelClass())
              .where(getPropertyId().eq(entityId))
              .execute())
      .subscribeOn(Schedulers.io());
}
 
开发者ID:xmartlabs,项目名称:bigbang,代码行数:13,代码来源:DbFlowController.java

示例12: deleteStock

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
public Observable<Stocks> deleteStock(final String symbol) {
    return Observable.defer(new Func0<Observable<Stocks>>() {
        @Override
        public Observable<Stocks> call() {

            Delete.table(Quote.class,
                    Quote_Table.msymbol.eq(symbol));

            return getStocks();
        }
    });
}
 
开发者ID:therajanmaurya,项目名称:Stock-Hawk,代码行数:13,代码来源:DatabaseHelper.java

示例13: onAdded

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
@Override
public void onAdded() {
    ITransaction it = new ITransaction() {
        @Override
        public void execute(DatabaseWrapper databaseWrapper) {
            // List all model tables here to delete.
            Delete.tables(Note.class);
        }
    };
    FlowManager.getDatabase(NoteDB.class).executeTransaction(it);
}
 
开发者ID:clrvynt,项目名称:android-offline,代码行数:12,代码来源:NoteServiceImpl.java

示例14: clearTable

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
@OnClick(R.id.btnClearTable)
public void clearTable()
{
    if (radioGroup.getCheckedRadioButtonId() == R.id.radioUser)
    {
        Delete.table(UserModel.class);
        Snackbar.make(layoutMain, "User Table cleared in Database!", Snackbar.LENGTH_SHORT).show();
    }
    else if (radioGroup.getCheckedRadioButtonId() == R.id.radioCompany)
    {
        Delete.table(CompanyModel.class);
        Snackbar.make(layoutMain, "Company Table Cleared in Database!", Snackbar.LENGTH_SHORT).show();
    }
    updateCountText();
}
 
开发者ID:wajahatkarim3,项目名称:DBFlowManager,代码行数:16,代码来源:MainActivity.java

示例15: wipeSDKData

import com.raizlabs.android.dbflow.sql.language.Delete; //导入依赖的package包/类
/**
 * Deletes all data from the sdk database
 */
public static void wipeSDKData() {
    Delete.tables(
            Event.class,
            DataValue.class,
            FailedItem.class
    );
    DateTimeManager.getInstance().delete();
    Log.d(TAG,"Delete sdk db");
}
 
开发者ID:EyeSeeTea,项目名称:EDSApp,代码行数:13,代码来源:PopulateDB.java


注:本文中的com.raizlabs.android.dbflow.sql.language.Delete类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。