本文整理汇总了Java中com.raizlabs.android.dbflow.sql.language.Delete.table方法的典型用法代码示例。如果您正苦于以下问题:Java Delete.table方法的具体用法?Java Delete.table怎么用?Java Delete.table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.raizlabs.android.dbflow.sql.language.Delete
的用法示例。
在下文中一共展示了Delete.table方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
}
示例2: 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();
}
}
示例3: 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();
}
}
}
示例4: 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();
}
示例5: dropDb
import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
@Override
public long dropDb() throws SQLException {
long start = System.nanoTime();
Delete.table(Message.class);
Delete.table(User.class);
return System.nanoTime() - start;
}
示例6: indexedStringEntityQueriesRun
import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
private void indexedStringEntityQueriesRun(int count) {
// create entities
List<IndexedStringEntity> entities = new ArrayList<>(count);
String[] fixedRandomStrings = StringGenerator.createFixedRandomStrings(count);
for (int i = 0; i < count; i++) {
IndexedStringEntity entity = new IndexedStringEntity();
entity._id = (long) i;
entity.indexedString = fixedRandomStrings[i];
entities.add(entity);
}
log("Built entities.");
// insert entities
FlowManager.getDatabase(FlowDatabase.class).executeTransaction(insertTransaction(entities, IndexedStringEntity.class));
log("Inserted entities.");
// query for entities by indexed string at random
int[] randomIndices = StringGenerator.getFixedRandomIndices(getQueryCount(), count - 1);
startClock();
for (int i = 0; i < getQueryCount(); i++) {
int nextIndex = randomIndices[i];
//noinspection unused
IndexedStringEntity indexedStringEntity = SQLite.select()
.from(IndexedStringEntity.class)
.where(IndexedStringEntity_Table.indexedString.eq(
fixedRandomStrings[nextIndex]))
.querySingle();
}
stopClock(Benchmark.Type.QUERY_INDEXED);
// delete all entities
Delete.table(IndexedStringEntity.class);
log("Deleted all entities.");
}
示例7: clear
import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
@Override
public void clear() {
Delete.table(Repo.class);
}
示例8: deleteAll
import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
private void deleteAll() {
Delete.table(SimpleEntityNotNull.class);
}
示例9: clearTable
import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
public static void clearTable() {
Delete.table(Produce.class);
}
示例10: clearPendingPlaybackItems
import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
/**
* Clears all {@link PlaybackItem}s from the database. This method should be called when pending
* items have been queued for re-submission.
*/
public void clearPendingPlaybackItems() {
Delete.table(PendingPlaybackItemEntry.class);
}