本文整理匯總了Java中com.activeandroid.Model.delete方法的典型用法代碼示例。如果您正苦於以下問題:Java Model.delete方法的具體用法?Java Model.delete怎麽用?Java Model.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.activeandroid.Model
的用法示例。
在下文中一共展示了Model.delete方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: deleteAuditObject
import com.activeandroid.Model; //導入方法依賴的package包/類
@Override
public void deleteAuditObject(AuditObject auditObject) {
Timber.v("auditObject delete : %d", auditObject.getId());
ActiveAndroid.beginTransaction();
try {
deleteAllComments(auditObject.getComments());
updateModificationDate(auditObject.getAudit());
Model.delete(AuditObject.class, auditObject.getId());
ActiveAndroid.setTransactionSuccessful();
} finally {
ActiveAndroid.endTransaction();
}
Timber.v("auditObject deleted");
}
示例2: deleteComment
import com.activeandroid.Model; //導入方法依賴的package包/類
@Override
public void deleteComment(Comment comment) {
Timber.v("comment delete : %d", comment.getId());
String attachment = comment.getAttachment();
if (StringUtils.isNotBlank(attachment)) {
File attachementFile = new File(attachment);
FileUtils.deleteQuietly(attachementFile);
}
Audit audit = comment.getAudit();
updateModificationDate(audit);
Model.delete(Comment.class, comment.getId());
Timber.v("comment deleted");
}
示例3: deleteAudit
import com.activeandroid.Model; //導入方法依賴的package包/類
@Override
public void deleteAudit(Long auditId) {
Timber.v("audit delete : %d", auditId);
Model.delete(Audit.class, auditId);
FileUtils.deleteQuietly(getAttachmentDirectory(auditId));
Timber.v("audit deleted");
}
示例4: truncate
import com.activeandroid.Model; //導入方法依賴的package包/類
public static void truncate()
{
Model.delete(Quiz.class);
}
示例5: truncate
import com.activeandroid.Model; //導入方法依賴的package包/類
public static void truncate()
{
Model.delete(Category.class);
}
示例6: truncate
import com.activeandroid.Model; //導入方法依賴的package包/類
public static void truncate()
{
Model.delete(Question.class);
}
示例7: remove
import com.activeandroid.Model; //導入方法依賴的package包/類
public void remove(Long id) {
Ident.begin();
Model.delete(this.tClass, id);
Ident.end();
}