今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

886 lines
24 KiB

.class public Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
.super Ljava/lang/Object;
.source "VpaiCommunityRecommendPartDataHelpler.java"
# static fields
.field private static final TAG:Ljava/lang/String; = "VpaiCommunityRecommendPartDataHelpler"
.field private static final VpaiDBName:Ljava/lang/String; = "720vpai.db"
.field private static mInstance:Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
# instance fields
.field private mSQLOpenHelper:Lcom/viatech/database/SQLOpenHelper;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 25
const/4 v0, 0x0
sput-object v0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mInstance:Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
return-void
.end method
.method private constructor <init>(Landroid/content/Context;)V
.locals 1
.prologue
.line 34
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 35
new-instance v0, Lcom/viatech/database/SQLOpenHelper;
invoke-direct {v0, p1}, Lcom/viatech/database/SQLOpenHelper;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mSQLOpenHelper:Lcom/viatech/database/SQLOpenHelper;
.line 36
return-void
.end method
.method public static declared-synchronized getInstance(Landroid/content/Context;)Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
.locals 2
.prologue
.line 28
const-class v1, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
monitor-enter v1
:try_start_0
sget-object v0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mInstance:Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
if-nez v0, :cond_0
.line 29
new-instance v0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
invoke-direct {v0, p0}, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;-><init>(Landroid/content/Context;)V
sput-object v0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mInstance:Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
.line 31
:cond_0
sget-object v0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mInstance:Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit v1
return-object v0
.line 28
:catchall_0
move-exception v0
monitor-exit v1
throw v0
.end method
# virtual methods
.method public deleteAllPost()Z
.locals 5
.prologue
.line 134
const/4 v0, 0x1
.line 135
iget-object v1, p0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mSQLOpenHelper:Lcom/viatech/database/SQLOpenHelper;
invoke-virtual {v1}, Lcom/viatech/database/SQLOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;
move-result-object v1
.line 136
invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V
.line 138
:try_start_0
const-string v2, "DELETE FROM communityRecommendPartDatas"
invoke-virtual {v1, v2}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V
.line 139
invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 144
invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
.line 146
:goto_0
invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->close()V
.line 147
return v0
.line 140
:catch_0
move-exception v0
.line 141
:try_start_1
const-string v2, "VpaiCommunityRecommendPartDataHelpler"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "-----Delete fail:"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 142
const/4 v0, 0x0
.line 144
invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
.line 145
throw v0
.end method
.method public getAllPost()Ljava/util/List;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List",
"<",
"Lcom/via/vpaicloud/community/respond/Post;",
">;"
}
.end annotation
.prologue
.line 88
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 90
iget-object v0, p0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mSQLOpenHelper:Lcom/viatech/database/SQLOpenHelper;
invoke-virtual {v0}, Lcom/viatech/database/SQLOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;
move-result-object v2
.line 92
:try_start_0
const-string v0, "select * from communityRecommendPartDatas "
const/4 v3, 0x0
invoke-virtual {v2, v0, v3}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
move-result-object v0
.line 93
:goto_0
invoke-interface {v0}, Landroid/database/Cursor;->moveToNext()Z
move-result v3
if-eqz v3, :cond_0
.line 94
new-instance v3, Lcom/via/vpaicloud/community/respond/Post;
invoke-direct {v3}, Lcom/via/vpaicloud/community/respond/Post;-><init>()V
.line 95
const/4 v4, 0x1
new-array v4, v4, [Lcom/via/vpaicloud/community/respond/Attachment;
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->atts:[Lcom/via/vpaicloud/community/respond/Attachment;
.line 96
iget-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->atts:[Lcom/via/vpaicloud/community/respond/Attachment;
const/4 v5, 0x0
new-instance v6, Lcom/via/vpaicloud/community/respond/Attachment;
invoke-direct {v6}, Lcom/via/vpaicloud/community/respond/Attachment;-><init>()V
aput-object v6, v4, v5
.line 97
const-string v4, "postid"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->postid:J
.line 98
const-string v4, "forumid"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->forumid:J
.line 99
const-string v4, "authorid"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->authorid:J
.line 100
const-string v4, "authoruid"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->authoruid:Ljava/lang/String;
.line 101
const-string v4, "author"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->author:Ljava/lang/String;
.line 102
const-string v4, "authorimg"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->authorimg:Ljava/lang/String;
.line 103
const-string v4, "ipaddr"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->ipaddr:Ljava/lang/String;
.line 104
const-string v4, "thumburl"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->thumburl:Ljava/lang/String;
.line 105
const-string v4, "content"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->content:Ljava/lang/String;
.line 106
const-string v4, "addr"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->addr:Ljava/lang/String;
.line 107
const-string v4, "createtime"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v4
iput-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->createtime:Ljava/lang/String;
.line 108
const-string v4, "rank"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->rank:J
.line 109
const-string v4, "views"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->views:J
.line 110
const-string v4, "favs"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->favs:J
.line 111
const-string v4, "up"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->up:J
.line 112
const-string v4, "down"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->down:J
.line 113
const-string v4, "comments"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
int-to-long v4, v4
iput-wide v4, v3, Lcom/via/vpaicloud/community/respond/Post;->comments:J
.line 114
const-string v4, "isbest"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
iput v4, v3, Lcom/via/vpaicloud/community/respond/Post;->isbest:I
.line 115
const-string v4, "status"
invoke-interface {v0, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v4
invoke-interface {v0, v4}, Landroid/database/Cursor;->getInt(I)I
move-result v4
iput v4, v3, Lcom/via/vpaicloud/community/respond/Post;->status:I
.line 116
iget-object v4, v3, Lcom/via/vpaicloud/community/respond/Post;->atts:[Lcom/via/vpaicloud/community/respond/Attachment;
const/4 v5, 0x0
aget-object v4, v4, v5
const-string v5, "url"
invoke-interface {v0, v5}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
move-result v5
invoke-interface {v0, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v5
iput-object v5, v4, Lcom/via/vpaicloud/community/respond/Attachment;->url:Ljava/lang/String;
.line 117
invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto/16 :goto_0
.line 120
:catch_0
move-exception v0
.line 121
:try_start_1
const-string v3, "VpaiCommunityRecommendPartDataHelpler"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "getAllPost() fail:"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v3, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 125
:goto_1
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->close()V
.line 126
return-object v1
.line 119
:cond_0
:try_start_2
invoke-interface {v0}, Landroid/database/Cursor;->close()V
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto :goto_1
.line 122
:catchall_0
move-exception v0
.line 124
throw v0
.end method
.method public insertPost(Lcom/via/vpaicloud/community/respond/Post;)Z
.locals 8
.prologue
const/4 v1, 0x0
.line 43
const/4 v0, 0x1
.line 44
iget-object v2, p0, Lcom/viatech/database/VpaiCommunityRecommendPartDataHelpler;->mSQLOpenHelper:Lcom/viatech/database/SQLOpenHelper;
invoke-virtual {v2}, Lcom/viatech/database/SQLOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;
move-result-object v2
.line 45
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->beginTransaction()V
.line 47
:try_start_0
new-instance v3, Landroid/content/ContentValues;
invoke-direct {v3}, Landroid/content/ContentValues;-><init>()V
.line 48
const-string v4, "postid"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->postid:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 49
const-string v4, "forumid"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->forumid:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 50
const-string v4, "authorid"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->authorid:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 51
const-string v4, "authoruid"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->authoruid:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 52
const-string v4, "author"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->author:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 53
const-string v4, "authorimg"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->authorimg:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 54
const-string v4, "ipaddr"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->ipaddr:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 55
const-string v4, "thumburl"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->thumburl:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 56
const-string v4, "content"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->content:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 57
const-string v4, "addr"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->addr:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 58
const-string v4, "createtime"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->createtime:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 59
const-string v4, "rank"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->rank:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 60
const-string v4, "views"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->views:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 61
const-string v4, "favs"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->favs:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 62
const-string v4, "up"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->up:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 63
const-string v4, "down"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->down:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 64
const-string v4, "comments"
iget-wide v6, p1, Lcom/via/vpaicloud/community/respond/Post;->comments:J
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
.line 65
const-string v4, "isbest"
iget v5, p1, Lcom/via/vpaicloud/community/respond/Post;->isbest:I
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
.line 66
const-string v4, "status"
iget v5, p1, Lcom/via/vpaicloud/community/respond/Post;->status:I
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
.line 67
const-string v4, "url"
iget-object v5, p1, Lcom/via/vpaicloud/community/respond/Post;->atts:[Lcom/via/vpaicloud/community/respond/Attachment;
const/4 v6, 0x0
aget-object v5, v5, v6
iget-object v5, v5, Lcom/via/vpaicloud/community/respond/Attachment;->url:Ljava/lang/String;
invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 69
const-string v4, "communityRecommendPartDatas"
const/4 v5, 0x0
invoke-virtual {v2, v4, v5, v3}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
.line 70
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->setTransactionSuccessful()V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 76
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
.line 78
:goto_0
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->close()V
.line 80
return v0
.line 72
:catch_0
move-exception v0
.line 73
:try_start_1
const-string v3, "VpaiCommunityRecommendPartDataHelpler"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "insert fail:"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v3, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 76
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
move v0, v1
.line 77
goto :goto_0
.line 76
:catchall_0
move-exception v0
invoke-virtual {v2}, Landroid/database/sqlite/SQLiteDatabase;->endTransaction()V
.line 77
throw v0
.end method