Commit ec1f1cd70296ea458a8b92a65c02bb7182956dcd

Authored by 朱显松
1 parent e0b73d8b

1.test code

Showing 59 changed files with 539 additions and 4258 deletions

Too many changes to show.

To preserve performance only 59 of 82 files are displayed.

app/demo_launch/.gitignore 0 → 100644
  1 +/build
app/demo_launch/build.gradle 0 → 100644
  1 +apply plugin: 'com.android.application'
  2 +
  3 +android {
  4 + compileSdkVersion 29
  5 + buildToolsVersion "29.0.2"
  6 +
  7 +
  8 + defaultConfig {
  9 + applicationId "com.cnlive.module.launch"
  10 + minSdkVersion 21
  11 + targetSdkVersion 29
  12 + versionCode 1
  13 + versionName "1.0"
  14 +
  15 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16 + }
  17 +
  18 + buildTypes {
  19 + release {
  20 + minifyEnabled false
  21 + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  22 + }
  23 + }
  24 +
  25 +}
  26 +
  27 +dependencies {
  28 + implementation fileTree(dir: 'libs', include: ['*.jar'])
  29 +
  30 + implementation 'androidx.appcompat:appcompat:1.1.0'
  31 + implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  32 + testImplementation 'junit:junit:4.12'
  33 + androidTestImplementation 'androidx.test:runner:1.1.1'
  34 + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  35 + compile project(path: ':core:network')
  36 +}
app/demo_launch/proguard-rules.pro 0 → 100644
  1 +# Add project specific ProGuard rules here.
  2 +# You can control the set of applied configuration files using the
  3 +# proguardFiles setting in build.gradle.
  4 +#
  5 +# For more details, see
  6 +# http://developer.android.com/guide/developing/tools/proguard.html
  7 +
  8 +# If your project uses WebView with JS, uncomment the following
  9 +# and specify the fully qualified class name to the JavaScript interface
  10 +# class:
  11 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  12 +# public *;
  13 +#}
  14 +
  15 +# Uncomment this to preserve the line number information for
  16 +# debugging stack traces.
  17 +#-keepattributes SourceFile,LineNumberTable
  18 +
  19 +# If you keep the line number information, uncomment this to
  20 +# hide the original source file name.
  21 +#-renamesourcefileattribute SourceFile
app/demo_launch/src/androidTest/java/com/cnlive/test/launch/ExampleInstrumentedTest.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import androidx.test.platform.app.InstrumentationRegistry;
  6 +import androidx.test.ext.junit.runners.AndroidJUnit4;
  7 +
  8 +import org.junit.Test;
  9 +import org.junit.runner.RunWith;
  10 +
  11 +import static org.junit.Assert.*;
  12 +
  13 +/**
  14 + * Instrumented test, which will execute on an Android device.
  15 + *
  16 + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
  17 + */
  18 +@RunWith(AndroidJUnit4.class)
  19 +public class ExampleInstrumentedTest {
  20 + @Test
  21 + public void useAppContext() {
  22 + // Context of the app under test.
  23 + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
  24 +
  25 + assertEquals("com.cnlive.test.launch", appContext.getPackageName());
  26 + }
  27 +}
app/demo_launch/src/main/AndroidManifest.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3 + package="com.cnlive.test.launch">
  4 +
  5 + <application
  6 + android:allowBackup="true"
  7 + android:icon="@mipmap/ic_launcher"
  8 + android:label="@string/app_name"
  9 + android:roundIcon="@mipmap/ic_launcher_round"
  10 + android:supportsRtl="true"
  11 + android:theme="@style/AppTheme">
  12 + <activity android:name=".MainActivity" />
  13 + <activity
  14 + android:name=".LaunchActivity"
  15 + android:configChanges="keyboardHidden|screenSize|orientation|smallestScreenSize|screenLayout"
  16 + android:launchMode="singleTop"
  17 + android:screenOrientation="portrait"
  18 + android:theme="@style/LaunchTheme"
  19 + android:windowSoftInputMode="stateHidden|adjustPan">
  20 +
  21 + <intent-filter>
  22 + <action android:name="android.intent.action.MAIN" />
  23 + <category android:name="android.intent.category.LAUNCHER" />
  24 + </intent-filter>
  25 +
  26 + <intent-filter>
  27 + <data android:scheme="https://wjjh5.cnlive.com" />
  28 + <action android:name="android.intent.action.VIEW" />
  29 + </intent-filter>
  30 + </activity>
  31 + </application>
  32 +
  33 +</manifest>
0 \ No newline at end of file 34 \ No newline at end of file
app/demo_launch/src/main/java/com/cnlive/test/launch/LaunchActivity.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +
  4 +import com.cnlive.core.libs.base.frame.activity.BaseActivity;
  5 +import com.cnlive.core.libs.base.frame.presenter.BasePresenter;
  6 +import com.cnlive.core.libs.base.frame.view.BaseView;
  7 +
  8 +public class LaunchActivity extends BaseActivity<LaunchView, LaunchPresenter> {
  9 +// @Override
  10 +// protected void onCreate(@Nullable Bundle savedInstanceState) {
  11 +// super.onCreate(savedInstanceState);
  12 +// setContentView(R.layout.activity_launch);
  13 +//
  14 +
  15 +// }
  16 +
  17 + @Override
  18 + protected void initView() {
  19 +
  20 + }
  21 +
  22 + @Override
  23 + protected void initData() {
  24 + getPresenter().loadLaunchData();
  25 + }
  26 +
  27 +
  28 +}
app/demo_launch/src/main/java/com/cnlive/test/launch/LaunchPresenter.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +import com.cnlive.core.libs.base.frame.presenter.BasePresenter;
  4 +import com.cnlive.core.network.HttpConn;
  5 +import com.cnlive.core.network.NetCallBack;
  6 +import com.cnlive.core.network.model.BaseResult;
  7 +import com.cnlive.core.network.request.BaseRequest;
  8 +
  9 +import java.util.concurrent.TimeUnit;
  10 +
  11 +import io.reactivex.Observable;
  12 +import io.reactivex.android.schedulers.AndroidSchedulers;
  13 +import io.reactivex.disposables.Disposable;
  14 +
  15 +class LaunchPresenter extends BasePresenter<LaunchView> {
  16 +
  17 + private Disposable disposableLoadLaunchData;
  18 +
  19 + public void loadLaunchData() {
  20 + Observable<BaseResult<CreateQrInfo>> observable = BaseRequest
  21 + .init()
  22 + .service(ApiServiceQrcode.class)
  23 + .getQrContent(requestData);
  24 + HttpConn.action(observable, new NetCallBack<BaseResult<CreateQrInfo>>() {
  25 + @Override
  26 + public void onRequestState(int state) {
  27 +
  28 + }
  29 +
  30 + @Override
  31 + public void onSuccess(BaseResult<CreateQrInfo> data) {
  32 + String content = data.getData().getQrcode();
  33 + if (content.length() > 0) ifViewAttached(view -> view.creataQr(content));
  34 + }
  35 +
  36 + @Override
  37 + public void onFailure(String errCode, String errMsg, Exception e) {
  38 + ifViewAttached(view -> view.showCreateErr(errMsg));
  39 + }
  40 + }
  41 + );
  42 + disposableLoadLaunchData = io.reactivex.Observable
  43 + .timer(3, TimeUnit.SECONDS)
  44 + .observeOn(AndroidSchedulers.mainThread())
  45 + .subscribe(aLong -> ifViewAttached(view -> view.nextPage("test")));
  46 + }
  47 +
  48 + public void cancelLoad() {
  49 + if (disposableLoadLaunchData != null) disposableLoadLaunchData.dispose();
  50 + }
  51 +
  52 +}
0 \ No newline at end of file 53 \ No newline at end of file
app/demo_launch/src/main/java/com/cnlive/test/launch/LaunchService.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import io.reactivex.Observable;
  6 +import retrofit2.adapter.rxjava2.Result;
  7 +import retrofit2.http.POST;
  8 +import retrofit2.http.QueryMap;
  9 +
  10 +public interface LaunchService {
  11 + /**
  12 + * 版本更新
  13 + *
  14 + * @return
  15 + */
  16 +
  17 + @POST("Daren/common/getNewestVersion.action")
  18 + Observable<Result<BaseInfo<AppVersionInfo>>> getshotTimeVersion(@QueryMap() Map<String, String> map);
  19 +}
app/demo_launch/src/main/java/com/cnlive/test/launch/LaunchView.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +import com.cnlive.core.libs.base.frame.view.BaseView;
  4 +
  5 +class LaunchView extends BaseView {
  6 +
  7 + public void nextPage(String strData) {
  8 +
  9 + }
  10 +}
  11 +
app/demo_launch/src/main/java/com/cnlive/test/launch/MainActivity.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +import androidx.appcompat.app.AppCompatActivity;
  4 +
  5 +import android.os.Bundle;
  6 +
  7 +public class MainActivity extends AppCompatActivity {
  8 +
  9 + @Override
  10 + protected void onCreate(Bundle savedInstanceState) {
  11 + super.onCreate(savedInstanceState);
  12 + setContentView(R.layout.activity_main);
  13 + }
  14 +}
app/demo_launch/src/main/res/drawable-v24/ic_launcher_foreground.xml 0 → 100644
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + xmlns:aapt="http://schemas.android.com/aapt"
  3 + android:width="108dp"
  4 + android:height="108dp"
  5 + android:viewportWidth="108"
  6 + android:viewportHeight="108">
  7 + <path
  8 + android:fillType="evenOdd"
  9 + android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
  10 + android:strokeWidth="1"
  11 + android:strokeColor="#00000000">
  12 + <aapt:attr name="android:fillColor">
  13 + <gradient
  14 + android:endX="78.5885"
  15 + android:endY="90.9159"
  16 + android:startX="48.7653"
  17 + android:startY="61.0927"
  18 + android:type="linear">
  19 + <item
  20 + android:color="#44000000"
  21 + android:offset="0.0" />
  22 + <item
  23 + android:color="#00000000"
  24 + android:offset="1.0" />
  25 + </gradient>
  26 + </aapt:attr>
  27 + </path>
  28 + <path
  29 + android:fillColor="#FFFFFF"
  30 + android:fillType="nonZero"
  31 + android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
  32 + android:strokeWidth="1"
  33 + android:strokeColor="#00000000" />
  34 +</vector>
app/demo_launch/src/main/res/drawable/ic_launcher_background.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:width="108dp"
  4 + android:height="108dp"
  5 + android:viewportWidth="108"
  6 + android:viewportHeight="108">
  7 + <path
  8 + android:fillColor="#008577"
  9 + android:pathData="M0,0h108v108h-108z" />
  10 + <path
  11 + android:fillColor="#00000000"
  12 + android:pathData="M9,0L9,108"
  13 + android:strokeWidth="0.8"
  14 + android:strokeColor="#33FFFFFF" />
  15 + <path
  16 + android:fillColor="#00000000"
  17 + android:pathData="M19,0L19,108"
  18 + android:strokeWidth="0.8"
  19 + android:strokeColor="#33FFFFFF" />
  20 + <path
  21 + android:fillColor="#00000000"
  22 + android:pathData="M29,0L29,108"
  23 + android:strokeWidth="0.8"
  24 + android:strokeColor="#33FFFFFF" />
  25 + <path
  26 + android:fillColor="#00000000"
  27 + android:pathData="M39,0L39,108"
  28 + android:strokeWidth="0.8"
  29 + android:strokeColor="#33FFFFFF" />
  30 + <path
  31 + android:fillColor="#00000000"
  32 + android:pathData="M49,0L49,108"
  33 + android:strokeWidth="0.8"
  34 + android:strokeColor="#33FFFFFF" />
  35 + <path
  36 + android:fillColor="#00000000"
  37 + android:pathData="M59,0L59,108"
  38 + android:strokeWidth="0.8"
  39 + android:strokeColor="#33FFFFFF" />
  40 + <path
  41 + android:fillColor="#00000000"
  42 + android:pathData="M69,0L69,108"
  43 + android:strokeWidth="0.8"
  44 + android:strokeColor="#33FFFFFF" />
  45 + <path
  46 + android:fillColor="#00000000"
  47 + android:pathData="M79,0L79,108"
  48 + android:strokeWidth="0.8"
  49 + android:strokeColor="#33FFFFFF" />
  50 + <path
  51 + android:fillColor="#00000000"
  52 + android:pathData="M89,0L89,108"
  53 + android:strokeWidth="0.8"
  54 + android:strokeColor="#33FFFFFF" />
  55 + <path
  56 + android:fillColor="#00000000"
  57 + android:pathData="M99,0L99,108"
  58 + android:strokeWidth="0.8"
  59 + android:strokeColor="#33FFFFFF" />
  60 + <path
  61 + android:fillColor="#00000000"
  62 + android:pathData="M0,9L108,9"
  63 + android:strokeWidth="0.8"
  64 + android:strokeColor="#33FFFFFF" />
  65 + <path
  66 + android:fillColor="#00000000"
  67 + android:pathData="M0,19L108,19"
  68 + android:strokeWidth="0.8"
  69 + android:strokeColor="#33FFFFFF" />
  70 + <path
  71 + android:fillColor="#00000000"
  72 + android:pathData="M0,29L108,29"
  73 + android:strokeWidth="0.8"
  74 + android:strokeColor="#33FFFFFF" />
  75 + <path
  76 + android:fillColor="#00000000"
  77 + android:pathData="M0,39L108,39"
  78 + android:strokeWidth="0.8"
  79 + android:strokeColor="#33FFFFFF" />
  80 + <path
  81 + android:fillColor="#00000000"
  82 + android:pathData="M0,49L108,49"
  83 + android:strokeWidth="0.8"
  84 + android:strokeColor="#33FFFFFF" />
  85 + <path
  86 + android:fillColor="#00000000"
  87 + android:pathData="M0,59L108,59"
  88 + android:strokeWidth="0.8"
  89 + android:strokeColor="#33FFFFFF" />
  90 + <path
  91 + android:fillColor="#00000000"
  92 + android:pathData="M0,69L108,69"
  93 + android:strokeWidth="0.8"
  94 + android:strokeColor="#33FFFFFF" />
  95 + <path
  96 + android:fillColor="#00000000"
  97 + android:pathData="M0,79L108,79"
  98 + android:strokeWidth="0.8"
  99 + android:strokeColor="#33FFFFFF" />
  100 + <path
  101 + android:fillColor="#00000000"
  102 + android:pathData="M0,89L108,89"
  103 + android:strokeWidth="0.8"
  104 + android:strokeColor="#33FFFFFF" />
  105 + <path
  106 + android:fillColor="#00000000"
  107 + android:pathData="M0,99L108,99"
  108 + android:strokeWidth="0.8"
  109 + android:strokeColor="#33FFFFFF" />
  110 + <path
  111 + android:fillColor="#00000000"
  112 + android:pathData="M19,29L89,29"
  113 + android:strokeWidth="0.8"
  114 + android:strokeColor="#33FFFFFF" />
  115 + <path
  116 + android:fillColor="#00000000"
  117 + android:pathData="M19,39L89,39"
  118 + android:strokeWidth="0.8"
  119 + android:strokeColor="#33FFFFFF" />
  120 + <path
  121 + android:fillColor="#00000000"
  122 + android:pathData="M19,49L89,49"
  123 + android:strokeWidth="0.8"
  124 + android:strokeColor="#33FFFFFF" />
  125 + <path
  126 + android:fillColor="#00000000"
  127 + android:pathData="M19,59L89,59"
  128 + android:strokeWidth="0.8"
  129 + android:strokeColor="#33FFFFFF" />
  130 + <path
  131 + android:fillColor="#00000000"
  132 + android:pathData="M19,69L89,69"
  133 + android:strokeWidth="0.8"
  134 + android:strokeColor="#33FFFFFF" />
  135 + <path
  136 + android:fillColor="#00000000"
  137 + android:pathData="M19,79L89,79"
  138 + android:strokeWidth="0.8"
  139 + android:strokeColor="#33FFFFFF" />
  140 + <path
  141 + android:fillColor="#00000000"
  142 + android:pathData="M29,19L29,89"
  143 + android:strokeWidth="0.8"
  144 + android:strokeColor="#33FFFFFF" />
  145 + <path
  146 + android:fillColor="#00000000"
  147 + android:pathData="M39,19L39,89"
  148 + android:strokeWidth="0.8"
  149 + android:strokeColor="#33FFFFFF" />
  150 + <path
  151 + android:fillColor="#00000000"
  152 + android:pathData="M49,19L49,89"
  153 + android:strokeWidth="0.8"
  154 + android:strokeColor="#33FFFFFF" />
  155 + <path
  156 + android:fillColor="#00000000"
  157 + android:pathData="M59,19L59,89"
  158 + android:strokeWidth="0.8"
  159 + android:strokeColor="#33FFFFFF" />
  160 + <path
  161 + android:fillColor="#00000000"
  162 + android:pathData="M69,19L69,89"
  163 + android:strokeWidth="0.8"
  164 + android:strokeColor="#33FFFFFF" />
  165 + <path
  166 + android:fillColor="#00000000"
  167 + android:pathData="M79,19L79,89"
  168 + android:strokeWidth="0.8"
  169 + android:strokeColor="#33FFFFFF" />
  170 +</vector>
app/demo_launch/src/main/res/layout/activity_launch.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:orientation="vertical" android:layout_width="match_parent"
  4 + android:layout_height="match_parent">
  5 +
  6 +</LinearLayout>
0 \ No newline at end of file 7 \ No newline at end of file
app/demo_launch/src/main/res/layout/activity_main.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:app="http://schemas.android.com/apk/res-auto"
  4 + xmlns:tools="http://schemas.android.com/tools"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="match_parent"
  7 + tools:context=".MainActivity">
  8 +
  9 + <TextView
  10 + android:layout_width="wrap_content"
  11 + android:layout_height="wrap_content"
  12 + android:text="Hello World!"
  13 + app:layout_constraintBottom_toBottomOf="parent"
  14 + app:layout_constraintLeft_toLeftOf="parent"
  15 + app:layout_constraintRight_toRightOf="parent"
  16 + app:layout_constraintTop_toTopOf="parent" />
  17 +
  18 +</androidx.constraintlayout.widget.ConstraintLayout>
0 \ No newline at end of file 19 \ No newline at end of file
app/demo_launch/src/main/res/mipmap-anydpi-v26/ic_launcher.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <background android:drawable="@drawable/ic_launcher_background" />
  4 + <foreground android:drawable="@drawable/ic_launcher_foreground" />
  5 +</adaptive-icon>
0 \ No newline at end of file 6 \ No newline at end of file
app/demo_launch/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <background android:drawable="@drawable/ic_launcher_background" />
  4 + <foreground android:drawable="@drawable/ic_launcher_foreground" />
  5 +</adaptive-icon>
0 \ No newline at end of file 6 \ No newline at end of file
app/demo_launch/src/main/res/mipmap-hdpi/ic_launcher.png 0 → 100644

2.89 KB

app/demo_launch/src/main/res/mipmap-hdpi/ic_launcher_round.png 0 → 100644

4.79 KB

app/demo_launch/src/main/res/mipmap-hdpi/launch_window_bg.9.png 0 → 100644

25 KB

app/demo_launch/src/main/res/mipmap-mdpi/ic_launcher.png 0 → 100644

2.01 KB

app/demo_launch/src/main/res/mipmap-mdpi/ic_launcher_round.png 0 → 100644

2.72 KB

app/demo_launch/src/main/res/mipmap-mdpi/launch_window_bg.png 0 → 100644

21.4 KB

app/demo_launch/src/main/res/mipmap-xhdpi/ic_launcher.png 0 → 100644

4.38 KB

app/demo_launch/src/main/res/mipmap-xhdpi/ic_launcher_round.png 0 → 100644

6.73 KB

app/demo_launch/src/main/res/mipmap-xhdpi/launch_window_bg.9.png 0 → 100644

21.8 KB

app/demo_launch/src/main/res/mipmap-xxhdpi/ic_launcher.png 0 → 100644

6.24 KB

app/demo_launch/src/main/res/mipmap-xxhdpi/ic_launcher_round.png 0 → 100644

10.2 KB

app/demo_launch/src/main/res/mipmap-xxhdpi/launch_window_bg.9.png 0 → 100644

52.1 KB

app/demo_launch/src/main/res/mipmap-xxxhdpi/ic_launcher.png 0 → 100644

8.91 KB

app/demo_launch/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png 0 → 100644

14.8 KB

app/demo_launch/src/main/res/mipmap-xxxhdpi/launch_window_bg.9.png 0 → 100644

54.6 KB

app/demo_launch/src/main/res/values/colors.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <color name="colorPrimary">#008577</color>
  4 + <color name="colorPrimaryDark">#00574B</color>
  5 + <color name="colorAccent">#D81B60</color>
  6 +</resources>
app/demo_launch/src/main/res/values/strings.xml 0 → 100644
  1 +<resources>
  2 + <string name="app_name">demo_launch</string>
  3 +</resources>
app/demo_launch/src/main/res/values/styles.xml 0 → 100644
  1 +<resources>
  2 +
  3 + <!-- Base application theme. -->
  4 + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
  5 + <!-- Customize your theme here. -->
  6 + <item name="colorPrimary">@color/colorPrimary</item>
  7 + <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
  8 + <item name="colorAccent">@color/colorAccent</item>
  9 + </style>
  10 +
  11 + <style name="LaunchTheme" parent="Theme.AppCompat.NoActionBar">
  12 + <item name="android:windowBackground">@mipmap/launch_window_bg</item>
  13 + <item name="android:windowFullscreen">true</item>
  14 + <item name="windowNoTitle">true</item>
  15 + </style>
  16 +</resources>
app/demo_launch/src/test/java/com/cnlive/test/launch/ExampleUnitTest.java 0 → 100644
  1 +package com.cnlive.test.launch;
  2 +
  3 +import org.junit.Test;
  4 +
  5 +import static org.junit.Assert.*;
  6 +
  7 +/**
  8 + * Example local unit test, which will execute on the development machine (host).
  9 + *
  10 + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
  11 + */
  12 +public class ExampleUnitTest {
  13 + @Test
  14 + public void addition_isCorrect() {
  15 + assertEquals(4, 2 + 2);
  16 + }
  17 +}
0 \ No newline at end of file 18 \ No newline at end of file
cloud/third_tool/build.gradle
@@ -59,14 +59,17 @@ static def stringValue(def value) { @@ -59,14 +59,17 @@ static def stringValue(def value) {
59 59
60 dependencies { 60 dependencies {
61 implementation fileTree(include: ['*.jar'], dir: 'libs') 61 implementation fileTree(include: ['*.jar'], dir: 'libs')
62 - //CNLive Encipher  
63 - implementation "com.cnlive.libs:analytics:1.1.2" 62 + //微信
64 implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.3.1' 63 implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.3.1'
  64 + //QQ
65 implementation files('libs/open_sdk_r6008_lite.jar') 65 implementation files('libs/open_sdk_r6008_lite.jar')
66 //微博 66 //微博
67 implementation 'com.sina.weibo.sdk:core:4.4.1:openDefaultRelease@aar' 67 implementation 'com.sina.weibo.sdk:core:4.4.1:openDefaultRelease@aar'
68 68
69 implementation project(':core:network') 69 implementation project(':core:network')
70 implementation project(':core:base') 70 implementation project(':core:base')
71 -// implementation project (':cloud:user') 71 +
  72 + //------------------------
  73 + //统计
  74 + implementation "com.cnlive.libs:analytics:1.1.2"
72 } 75 }
cloud/user/build.gradle
@@ -46,9 +46,11 @@ dependencies { @@ -46,9 +46,11 @@ dependencies {
46 androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 46 androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
47 47
48 implementation project(path: ':core:network') 48 implementation project(path: ':core:network')
  49 + implementation project(path: ':cloud:third_tool')
  50 +
  51 + //表情
49 implementation "com.cnlive.libs:emoj:$rootProject.libEmoj" 52 implementation "com.cnlive.libs:emoj:$rootProject.libEmoj"
50 - //图片选择器 53 + //媒体浏览
51 implementation "com.cnlive.libs:mediapicker:$rootProject.libMediaPicker" 54 implementation "com.cnlive.libs:mediapicker:$rootProject.libMediaPicker"
52 - implementation project(path: ':cloud:third_tool')  
53 55
54 } 56 }
core/app_qr/build.gradle
@@ -25,8 +25,11 @@ android { @@ -25,8 +25,11 @@ android {
25 dependencies { 25 dependencies {
26 implementation fileTree(dir: 'libs', include: ['*.jar']) 26 implementation fileTree(dir: 'libs', include: ['*.jar'])
27 implementation 'cn.bertsir.zbarLibary:zbarlibary:1.3.3' 27 implementation 'cn.bertsir.zbarLibary:zbarlibary:1.3.3'
28 - implementation "com.cnlive.libs:mediapicker:$rootProject.libMediaPicker"  
29 - implementation "com.cnlive.libs:emoj:$rootProject.libEmoj"  
30 implementation project(path: ':cloud:user') 28 implementation project(path: ':cloud:user')
31 implementation project(path: ':core:network') 29 implementation project(path: ':core:network')
  30 +
  31 + //媒体浏览
  32 + implementation "com.cnlive.libs:mediapicker:$rootProject.libMediaPicker"
  33 + //表情
  34 + implementation "com.cnlive.libs:emoj:$rootProject.libEmoj"
32 } 35 }
core/database/build.gradle
@@ -28,9 +28,9 @@ android { @@ -28,9 +28,9 @@ android {
28 greendao { 28 greendao {
29 schemaVersion 1 //数据库版本号 29 schemaVersion 1 //数据库版本号
30 daoPackage 'com.cnlive.database.dao' 30 daoPackage 'com.cnlive.database.dao'
31 - targetGenDir 'src/main/java' 31 +// targetGenDir 'src/main/java'
32 generateTests false //设置为true以自动生成单元测试。 32 generateTests false //设置为true以自动生成单元测试。
33 - targetGenDirTests 'src/main/java' 33 +// targetGenDirTests 'src/main/java'
34 } 34 }
35 35
36 dependencies { 36 dependencies {
core/database/src/main/java/com/cnlive/database/dao/AudioPlayHistoricalRecordDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.AudioPlayHistoricalRecord;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "AUDIO_PLAY_HISTORICAL_RECORD".  
17 -*/  
18 -public class AudioPlayHistoricalRecordDao extends AbstractDao<AudioPlayHistoricalRecord, Long> {  
19 -  
20 - public static final String TABLENAME = "AUDIO_PLAY_HISTORICAL_RECORD";  
21 -  
22 - /**  
23 - * Properties of entity AudioPlayHistoricalRecord.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property ContentId = new Property(0, long.class, "contentId", true, "_id");  
28 - public final static Property ActiveId = new Property(1, String.class, "activeId", false, "ACTIVE_ID");  
29 - public final static Property Aid = new Property(2, String.class, "aid", false, "AID");  
30 - public final static Property Time = new Property(3, Long.class, "time", false, "TIME");  
31 - }  
32 -  
33 -  
34 - public AudioPlayHistoricalRecordDao(DaoConfig config) {  
35 - super(config);  
36 - }  
37 -  
38 - public AudioPlayHistoricalRecordDao(DaoConfig config, DaoSession daoSession) {  
39 - super(config, daoSession);  
40 - }  
41 -  
42 - /** Creates the underlying database table. */  
43 - public static void createTable(Database db, boolean ifNotExists) {  
44 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
45 - db.execSQL("CREATE TABLE " + constraint + "\"AUDIO_PLAY_HISTORICAL_RECORD\" (" + //  
46 - "\"_id\" INTEGER PRIMARY KEY NOT NULL ," + // 0: contentId  
47 - "\"ACTIVE_ID\" TEXT," + // 1: activeId  
48 - "\"AID\" TEXT," + // 2: aid  
49 - "\"TIME\" INTEGER);"); // 3: time  
50 - }  
51 -  
52 - /** Drops the underlying database table. */  
53 - public static void dropTable(Database db, boolean ifExists) {  
54 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"AUDIO_PLAY_HISTORICAL_RECORD\"";  
55 - db.execSQL(sql);  
56 - }  
57 -  
58 - @Override  
59 - protected final void bindValues(DatabaseStatement stmt, AudioPlayHistoricalRecord entity) {  
60 - stmt.clearBindings();  
61 - stmt.bindLong(1, entity.getContentId());  
62 -  
63 - String activeId = entity.getActiveId();  
64 - if (activeId != null) {  
65 - stmt.bindString(2, activeId);  
66 - }  
67 -  
68 - String aid = entity.getAid();  
69 - if (aid != null) {  
70 - stmt.bindString(3, aid);  
71 - }  
72 -  
73 - Long time = entity.getTime();  
74 - if (time != null) {  
75 - stmt.bindLong(4, time);  
76 - }  
77 - }  
78 -  
79 - @Override  
80 - protected final void bindValues(SQLiteStatement stmt, AudioPlayHistoricalRecord entity) {  
81 - stmt.clearBindings();  
82 - stmt.bindLong(1, entity.getContentId());  
83 -  
84 - String activeId = entity.getActiveId();  
85 - if (activeId != null) {  
86 - stmt.bindString(2, activeId);  
87 - }  
88 -  
89 - String aid = entity.getAid();  
90 - if (aid != null) {  
91 - stmt.bindString(3, aid);  
92 - }  
93 -  
94 - Long time = entity.getTime();  
95 - if (time != null) {  
96 - stmt.bindLong(4, time);  
97 - }  
98 - }  
99 -  
100 - @Override  
101 - public Long readKey(Cursor cursor, int offset) {  
102 - return cursor.getLong(offset + 0);  
103 - }  
104 -  
105 - @Override  
106 - public AudioPlayHistoricalRecord readEntity(Cursor cursor, int offset) {  
107 - AudioPlayHistoricalRecord entity = new AudioPlayHistoricalRecord( //  
108 - cursor.getLong(offset + 0), // contentId  
109 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // activeId  
110 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // aid  
111 - cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3) // time  
112 - );  
113 - return entity;  
114 - }  
115 -  
116 - @Override  
117 - public void readEntity(Cursor cursor, AudioPlayHistoricalRecord entity, int offset) {  
118 - entity.setContentId(cursor.getLong(offset + 0));  
119 - entity.setActiveId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
120 - entity.setAid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
121 - entity.setTime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));  
122 - }  
123 -  
124 - @Override  
125 - protected final Long updateKeyAfterInsert(AudioPlayHistoricalRecord entity, long rowId) {  
126 - entity.setContentId(rowId);  
127 - return rowId;  
128 - }  
129 -  
130 - @Override  
131 - public Long getKey(AudioPlayHistoricalRecord entity) {  
132 - if(entity != null) {  
133 - return entity.getContentId();  
134 - } else {  
135 - return null;  
136 - }  
137 - }  
138 -  
139 - @Override  
140 - public boolean hasKey(AudioPlayHistoricalRecord entity) {  
141 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
142 - }  
143 -  
144 - @Override  
145 - protected final boolean isEntityUpdateable() {  
146 - return true;  
147 - }  
148 -  
149 -}  
core/database/src/main/java/com/cnlive/database/dao/AudioPlayLastInfoDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.AudioPlayLastInfo;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "AUDIO_PLAY_LAST_INFO".  
17 -*/  
18 -public class AudioPlayLastInfoDao extends AbstractDao<AudioPlayLastInfo, String> {  
19 -  
20 - public static final String TABLENAME = "AUDIO_PLAY_LAST_INFO";  
21 -  
22 - /**  
23 - * Properties of entity AudioPlayLastInfo.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Sid = new Property(0, String.class, "sid", true, "SID");  
28 - public final static Property ActivityId = new Property(1, String.class, "activityId", false, "ACTIVITY_ID");  
29 - public final static Property CmccId = new Property(2, String.class, "cmccId", false, "CMCC_ID");  
30 - public final static Property Aid = new Property(3, String.class, "aid", false, "AID");  
31 - public final static Property Poster = new Property(4, String.class, "poster", false, "POSTER");  
32 - public final static Property ShareUrl = new Property(5, String.class, "shareUrl", false, "SHARE_URL");  
33 - public final static Property ContentId = new Property(6, String.class, "contentId", false, "CONTENT_ID");  
34 - public final static Property Actor = new Property(7, String.class, "actor", false, "ACTOR");  
35 - public final static Property Title = new Property(8, String.class, "title", false, "TITLE");  
36 - public final static Property ChannelName = new Property(9, String.class, "channelName", false, "CHANNEL_NAME");  
37 - public final static Property AlbumName = new Property(10, String.class, "albumName", false, "ALBUM_NAME");  
38 - public final static Property Schedule = new Property(11, Double.class, "schedule", false, "SCHEDULE");  
39 - public final static Property Counts = new Property(12, Integer.class, "counts", false, "COUNTS");  
40 - public final static Property PlayState = new Property(13, Boolean.class, "playState", false, "PLAY_STATE");  
41 - public final static Property ProductId = new Property(14, String.class, "productId", false, "PRODUCT_ID");  
42 - public final static Property ProductType = new Property(15, String.class, "productType", false, "PRODUCT_TYPE");  
43 - public final static Property AProductId = new Property(16, String.class, "aProductId", false, "A_PRODUCT_ID");  
44 - public final static Property AProductType = new Property(17, String.class, "aProductType", false, "A_PRODUCT_TYPE");  
45 - public final static Property IsPayAlbum = new Property(18, Boolean.class, "isPayAlbum", false, "IS_PAY_ALBUM");  
46 - public final static Property IsPayItem = new Property(19, Boolean.class, "isPayItem", false, "IS_PAY_ITEM");  
47 - public final static Property SiteId = new Property(20, String.class, "siteId", false, "SITE_ID");  
48 - }  
49 -  
50 -  
51 - public AudioPlayLastInfoDao(DaoConfig config) {  
52 - super(config);  
53 - }  
54 -  
55 - public AudioPlayLastInfoDao(DaoConfig config, DaoSession daoSession) {  
56 - super(config, daoSession);  
57 - }  
58 -  
59 - /** Creates the underlying database table. */  
60 - public static void createTable(Database db, boolean ifNotExists) {  
61 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
62 - db.execSQL("CREATE TABLE " + constraint + "\"AUDIO_PLAY_LAST_INFO\" (" + //  
63 - "\"SID\" TEXT PRIMARY KEY NOT NULL ," + // 0: sid  
64 - "\"ACTIVITY_ID\" TEXT," + // 1: activityId  
65 - "\"CMCC_ID\" TEXT," + // 2: cmccId  
66 - "\"AID\" TEXT," + // 3: aid  
67 - "\"POSTER\" TEXT," + // 4: poster  
68 - "\"SHARE_URL\" TEXT," + // 5: shareUrl  
69 - "\"CONTENT_ID\" TEXT," + // 6: contentId  
70 - "\"ACTOR\" TEXT," + // 7: actor  
71 - "\"TITLE\" TEXT," + // 8: title  
72 - "\"CHANNEL_NAME\" TEXT," + // 9: channelName  
73 - "\"ALBUM_NAME\" TEXT," + // 10: albumName  
74 - "\"SCHEDULE\" REAL," + // 11: schedule  
75 - "\"COUNTS\" INTEGER," + // 12: counts  
76 - "\"PLAY_STATE\" INTEGER," + // 13: playState  
77 - "\"PRODUCT_ID\" TEXT," + // 14: productId  
78 - "\"PRODUCT_TYPE\" TEXT," + // 15: productType  
79 - "\"A_PRODUCT_ID\" TEXT," + // 16: aProductId  
80 - "\"A_PRODUCT_TYPE\" TEXT," + // 17: aProductType  
81 - "\"IS_PAY_ALBUM\" INTEGER," + // 18: isPayAlbum  
82 - "\"IS_PAY_ITEM\" INTEGER," + // 19: isPayItem  
83 - "\"SITE_ID\" TEXT);"); // 20: siteId  
84 - }  
85 -  
86 - /** Drops the underlying database table. */  
87 - public static void dropTable(Database db, boolean ifExists) {  
88 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"AUDIO_PLAY_LAST_INFO\"";  
89 - db.execSQL(sql);  
90 - }  
91 -  
92 - @Override  
93 - protected final void bindValues(DatabaseStatement stmt, AudioPlayLastInfo entity) {  
94 - stmt.clearBindings();  
95 - stmt.bindString(1, entity.getSid());  
96 -  
97 - String activityId = entity.getActivityId();  
98 - if (activityId != null) {  
99 - stmt.bindString(2, activityId);  
100 - }  
101 -  
102 - String cmccId = entity.getCmccId();  
103 - if (cmccId != null) {  
104 - stmt.bindString(3, cmccId);  
105 - }  
106 -  
107 - String aid = entity.getAid();  
108 - if (aid != null) {  
109 - stmt.bindString(4, aid);  
110 - }  
111 -  
112 - String poster = entity.getPoster();  
113 - if (poster != null) {  
114 - stmt.bindString(5, poster);  
115 - }  
116 -  
117 - String shareUrl = entity.getShareUrl();  
118 - if (shareUrl != null) {  
119 - stmt.bindString(6, shareUrl);  
120 - }  
121 -  
122 - String contentId = entity.getContentId();  
123 - if (contentId != null) {  
124 - stmt.bindString(7, contentId);  
125 - }  
126 -  
127 - String actor = entity.getActor();  
128 - if (actor != null) {  
129 - stmt.bindString(8, actor);  
130 - }  
131 -  
132 - String title = entity.getTitle();  
133 - if (title != null) {  
134 - stmt.bindString(9, title);  
135 - }  
136 -  
137 - String channelName = entity.getChannelName();  
138 - if (channelName != null) {  
139 - stmt.bindString(10, channelName);  
140 - }  
141 -  
142 - String albumName = entity.getAlbumName();  
143 - if (albumName != null) {  
144 - stmt.bindString(11, albumName);  
145 - }  
146 -  
147 - Double schedule = entity.getSchedule();  
148 - if (schedule != null) {  
149 - stmt.bindDouble(12, schedule);  
150 - }  
151 -  
152 - Integer counts = entity.getCounts();  
153 - if (counts != null) {  
154 - stmt.bindLong(13, counts);  
155 - }  
156 -  
157 - Boolean playState = entity.getPlayState();  
158 - if (playState != null) {  
159 - stmt.bindLong(14, playState ? 1L: 0L);  
160 - }  
161 -  
162 - String productId = entity.getProductId();  
163 - if (productId != null) {  
164 - stmt.bindString(15, productId);  
165 - }  
166 -  
167 - String productType = entity.getProductType();  
168 - if (productType != null) {  
169 - stmt.bindString(16, productType);  
170 - }  
171 -  
172 - String aProductId = entity.getAProductId();  
173 - if (aProductId != null) {  
174 - stmt.bindString(17, aProductId);  
175 - }  
176 -  
177 - String aProductType = entity.getAProductType();  
178 - if (aProductType != null) {  
179 - stmt.bindString(18, aProductType);  
180 - }  
181 -  
182 - Boolean isPayAlbum = entity.getIsPayAlbum();  
183 - if (isPayAlbum != null) {  
184 - stmt.bindLong(19, isPayAlbum ? 1L: 0L);  
185 - }  
186 -  
187 - Boolean isPayItem = entity.getIsPayItem();  
188 - if (isPayItem != null) {  
189 - stmt.bindLong(20, isPayItem ? 1L: 0L);  
190 - }  
191 -  
192 - String siteId = entity.getSiteId();  
193 - if (siteId != null) {  
194 - stmt.bindString(21, siteId);  
195 - }  
196 - }  
197 -  
198 - @Override  
199 - protected final void bindValues(SQLiteStatement stmt, AudioPlayLastInfo entity) {  
200 - stmt.clearBindings();  
201 - stmt.bindString(1, entity.getSid());  
202 -  
203 - String activityId = entity.getActivityId();  
204 - if (activityId != null) {  
205 - stmt.bindString(2, activityId);  
206 - }  
207 -  
208 - String cmccId = entity.getCmccId();  
209 - if (cmccId != null) {  
210 - stmt.bindString(3, cmccId);  
211 - }  
212 -  
213 - String aid = entity.getAid();  
214 - if (aid != null) {  
215 - stmt.bindString(4, aid);  
216 - }  
217 -  
218 - String poster = entity.getPoster();  
219 - if (poster != null) {  
220 - stmt.bindString(5, poster);  
221 - }  
222 -  
223 - String shareUrl = entity.getShareUrl();  
224 - if (shareUrl != null) {  
225 - stmt.bindString(6, shareUrl);  
226 - }  
227 -  
228 - String contentId = entity.getContentId();  
229 - if (contentId != null) {  
230 - stmt.bindString(7, contentId);  
231 - }  
232 -  
233 - String actor = entity.getActor();  
234 - if (actor != null) {  
235 - stmt.bindString(8, actor);  
236 - }  
237 -  
238 - String title = entity.getTitle();  
239 - if (title != null) {  
240 - stmt.bindString(9, title);  
241 - }  
242 -  
243 - String channelName = entity.getChannelName();  
244 - if (channelName != null) {  
245 - stmt.bindString(10, channelName);  
246 - }  
247 -  
248 - String albumName = entity.getAlbumName();  
249 - if (albumName != null) {  
250 - stmt.bindString(11, albumName);  
251 - }  
252 -  
253 - Double schedule = entity.getSchedule();  
254 - if (schedule != null) {  
255 - stmt.bindDouble(12, schedule);  
256 - }  
257 -  
258 - Integer counts = entity.getCounts();  
259 - if (counts != null) {  
260 - stmt.bindLong(13, counts);  
261 - }  
262 -  
263 - Boolean playState = entity.getPlayState();  
264 - if (playState != null) {  
265 - stmt.bindLong(14, playState ? 1L: 0L);  
266 - }  
267 -  
268 - String productId = entity.getProductId();  
269 - if (productId != null) {  
270 - stmt.bindString(15, productId);  
271 - }  
272 -  
273 - String productType = entity.getProductType();  
274 - if (productType != null) {  
275 - stmt.bindString(16, productType);  
276 - }  
277 -  
278 - String aProductId = entity.getAProductId();  
279 - if (aProductId != null) {  
280 - stmt.bindString(17, aProductId);  
281 - }  
282 -  
283 - String aProductType = entity.getAProductType();  
284 - if (aProductType != null) {  
285 - stmt.bindString(18, aProductType);  
286 - }  
287 -  
288 - Boolean isPayAlbum = entity.getIsPayAlbum();  
289 - if (isPayAlbum != null) {  
290 - stmt.bindLong(19, isPayAlbum ? 1L: 0L);  
291 - }  
292 -  
293 - Boolean isPayItem = entity.getIsPayItem();  
294 - if (isPayItem != null) {  
295 - stmt.bindLong(20, isPayItem ? 1L: 0L);  
296 - }  
297 -  
298 - String siteId = entity.getSiteId();  
299 - if (siteId != null) {  
300 - stmt.bindString(21, siteId);  
301 - }  
302 - }  
303 -  
304 - @Override  
305 - public String readKey(Cursor cursor, int offset) {  
306 - return cursor.getString(offset + 0);  
307 - }  
308 -  
309 - @Override  
310 - public AudioPlayLastInfo readEntity(Cursor cursor, int offset) {  
311 - AudioPlayLastInfo entity = new AudioPlayLastInfo( //  
312 - cursor.getString(offset + 0), // sid  
313 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // activityId  
314 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // cmccId  
315 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // aid  
316 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // poster  
317 - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // shareUrl  
318 - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // contentId  
319 - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // actor  
320 - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // title  
321 - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // channelName  
322 - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // albumName  
323 - cursor.isNull(offset + 11) ? null : cursor.getDouble(offset + 11), // schedule  
324 - cursor.isNull(offset + 12) ? null : cursor.getInt(offset + 12), // counts  
325 - cursor.isNull(offset + 13) ? null : cursor.getShort(offset + 13) != 0, // playState  
326 - cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // productId  
327 - cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // productType  
328 - cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // aProductId  
329 - cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // aProductType  
330 - cursor.isNull(offset + 18) ? null : cursor.getShort(offset + 18) != 0, // isPayAlbum  
331 - cursor.isNull(offset + 19) ? null : cursor.getShort(offset + 19) != 0, // isPayItem  
332 - cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // siteId  
333 - );  
334 - return entity;  
335 - }  
336 -  
337 - @Override  
338 - public void readEntity(Cursor cursor, AudioPlayLastInfo entity, int offset) {  
339 - entity.setSid(cursor.getString(offset + 0));  
340 - entity.setActivityId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
341 - entity.setCmccId(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
342 - entity.setAid(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
343 - entity.setPoster(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
344 - entity.setShareUrl(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));  
345 - entity.setContentId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));  
346 - entity.setActor(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));  
347 - entity.setTitle(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));  
348 - entity.setChannelName(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));  
349 - entity.setAlbumName(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));  
350 - entity.setSchedule(cursor.isNull(offset + 11) ? null : cursor.getDouble(offset + 11));  
351 - entity.setCounts(cursor.isNull(offset + 12) ? null : cursor.getInt(offset + 12));  
352 - entity.setPlayState(cursor.isNull(offset + 13) ? null : cursor.getShort(offset + 13) != 0);  
353 - entity.setProductId(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));  
354 - entity.setProductType(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));  
355 - entity.setAProductId(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));  
356 - entity.setAProductType(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));  
357 - entity.setIsPayAlbum(cursor.isNull(offset + 18) ? null : cursor.getShort(offset + 18) != 0);  
358 - entity.setIsPayItem(cursor.isNull(offset + 19) ? null : cursor.getShort(offset + 19) != 0);  
359 - entity.setSiteId(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));  
360 - }  
361 -  
362 - @Override  
363 - protected final String updateKeyAfterInsert(AudioPlayLastInfo entity, long rowId) {  
364 - return entity.getSid();  
365 - }  
366 -  
367 - @Override  
368 - public String getKey(AudioPlayLastInfo entity) {  
369 - if(entity != null) {  
370 - return entity.getSid();  
371 - } else {  
372 - return null;  
373 - }  
374 - }  
375 -  
376 - @Override  
377 - public boolean hasKey(AudioPlayLastInfo entity) {  
378 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
379 - }  
380 -  
381 - @Override  
382 - protected final boolean isEntityUpdateable() {  
383 - return true;  
384 - }  
385 -  
386 -}  
core/database/src/main/java/com/cnlive/database/dao/ChatFileMsgDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ChatFileMsg;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "CHAT_FILE_MSG".  
17 -*/  
18 -public class ChatFileMsgDao extends AbstractDao<ChatFileMsg, Long> {  
19 -  
20 - public static final String TABLENAME = "CHAT_FILE_MSG";  
21 -  
22 - /**  
23 - * Properties of entity ChatFileMsg.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property MsgUniqueId = new Property(0, long.class, "msgUniqueId", true, "_id");  
28 - public final static Property FromUserId = new Property(1, String.class, "fromUserId", false, "FROM_USER_ID");  
29 - public final static Property FromUserNick = new Property(2, String.class, "fromUserNick", false, "FROM_USER_NICK");  
30 - public final static Property FilePath = new Property(3, String.class, "filePath", false, "FILE_PATH");  
31 - public final static Property FileName = new Property(4, String.class, "fileName", false, "FILE_NAME");  
32 - public final static Property FileSize = new Property(5, Long.class, "fileSize", false, "FILE_SIZE");  
33 - public final static Property MsgTime = new Property(6, Long.class, "msgTime", false, "MSG_TIME");  
34 - }  
35 -  
36 -  
37 - public ChatFileMsgDao(DaoConfig config) {  
38 - super(config);  
39 - }  
40 -  
41 - public ChatFileMsgDao(DaoConfig config, DaoSession daoSession) {  
42 - super(config, daoSession);  
43 - }  
44 -  
45 - /** Creates the underlying database table. */  
46 - public static void createTable(Database db, boolean ifNotExists) {  
47 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
48 - db.execSQL("CREATE TABLE " + constraint + "\"CHAT_FILE_MSG\" (" + //  
49 - "\"_id\" INTEGER PRIMARY KEY NOT NULL ," + // 0: msgUniqueId  
50 - "\"FROM_USER_ID\" TEXT," + // 1: fromUserId  
51 - "\"FROM_USER_NICK\" TEXT," + // 2: fromUserNick  
52 - "\"FILE_PATH\" TEXT," + // 3: filePath  
53 - "\"FILE_NAME\" TEXT," + // 4: fileName  
54 - "\"FILE_SIZE\" INTEGER," + // 5: fileSize  
55 - "\"MSG_TIME\" INTEGER);"); // 6: msgTime  
56 - }  
57 -  
58 - /** Drops the underlying database table. */  
59 - public static void dropTable(Database db, boolean ifExists) {  
60 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CHAT_FILE_MSG\"";  
61 - db.execSQL(sql);  
62 - }  
63 -  
64 - @Override  
65 - protected final void bindValues(DatabaseStatement stmt, ChatFileMsg entity) {  
66 - stmt.clearBindings();  
67 - stmt.bindLong(1, entity.getMsgUniqueId());  
68 -  
69 - String fromUserId = entity.getFromUserId();  
70 - if (fromUserId != null) {  
71 - stmt.bindString(2, fromUserId);  
72 - }  
73 -  
74 - String fromUserNick = entity.getFromUserNick();  
75 - if (fromUserNick != null) {  
76 - stmt.bindString(3, fromUserNick);  
77 - }  
78 -  
79 - String filePath = entity.getFilePath();  
80 - if (filePath != null) {  
81 - stmt.bindString(4, filePath);  
82 - }  
83 -  
84 - String fileName = entity.getFileName();  
85 - if (fileName != null) {  
86 - stmt.bindString(5, fileName);  
87 - }  
88 -  
89 - Long fileSize = entity.getFileSize();  
90 - if (fileSize != null) {  
91 - stmt.bindLong(6, fileSize);  
92 - }  
93 -  
94 - Long msgTime = entity.getMsgTime();  
95 - if (msgTime != null) {  
96 - stmt.bindLong(7, msgTime);  
97 - }  
98 - }  
99 -  
100 - @Override  
101 - protected final void bindValues(SQLiteStatement stmt, ChatFileMsg entity) {  
102 - stmt.clearBindings();  
103 - stmt.bindLong(1, entity.getMsgUniqueId());  
104 -  
105 - String fromUserId = entity.getFromUserId();  
106 - if (fromUserId != null) {  
107 - stmt.bindString(2, fromUserId);  
108 - }  
109 -  
110 - String fromUserNick = entity.getFromUserNick();  
111 - if (fromUserNick != null) {  
112 - stmt.bindString(3, fromUserNick);  
113 - }  
114 -  
115 - String filePath = entity.getFilePath();  
116 - if (filePath != null) {  
117 - stmt.bindString(4, filePath);  
118 - }  
119 -  
120 - String fileName = entity.getFileName();  
121 - if (fileName != null) {  
122 - stmt.bindString(5, fileName);  
123 - }  
124 -  
125 - Long fileSize = entity.getFileSize();  
126 - if (fileSize != null) {  
127 - stmt.bindLong(6, fileSize);  
128 - }  
129 -  
130 - Long msgTime = entity.getMsgTime();  
131 - if (msgTime != null) {  
132 - stmt.bindLong(7, msgTime);  
133 - }  
134 - }  
135 -  
136 - @Override  
137 - public Long readKey(Cursor cursor, int offset) {  
138 - return cursor.getLong(offset + 0);  
139 - }  
140 -  
141 - @Override  
142 - public ChatFileMsg readEntity(Cursor cursor, int offset) {  
143 - ChatFileMsg entity = new ChatFileMsg( //  
144 - cursor.getLong(offset + 0), // msgUniqueId  
145 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // fromUserId  
146 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // fromUserNick  
147 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // filePath  
148 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // fileName  
149 - cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5), // fileSize  
150 - cursor.isNull(offset + 6) ? null : cursor.getLong(offset + 6) // msgTime  
151 - );  
152 - return entity;  
153 - }  
154 -  
155 - @Override  
156 - public void readEntity(Cursor cursor, ChatFileMsg entity, int offset) {  
157 - entity.setMsgUniqueId(cursor.getLong(offset + 0));  
158 - entity.setFromUserId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
159 - entity.setFromUserNick(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
160 - entity.setFilePath(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
161 - entity.setFileName(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
162 - entity.setFileSize(cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5));  
163 - entity.setMsgTime(cursor.isNull(offset + 6) ? null : cursor.getLong(offset + 6));  
164 - }  
165 -  
166 - @Override  
167 - protected final Long updateKeyAfterInsert(ChatFileMsg entity, long rowId) {  
168 - entity.setMsgUniqueId(rowId);  
169 - return rowId;  
170 - }  
171 -  
172 - @Override  
173 - public Long getKey(ChatFileMsg entity) {  
174 - if(entity != null) {  
175 - return entity.getMsgUniqueId();  
176 - } else {  
177 - return null;  
178 - }  
179 - }  
180 -  
181 - @Override  
182 - public boolean hasKey(ChatFileMsg entity) {  
183 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
184 - }  
185 -  
186 - @Override  
187 - protected final boolean isEntityUpdateable() {  
188 - return true;  
189 - }  
190 -  
191 -}  
core/database/src/main/java/com/cnlive/database/dao/ChatImageAndVideoMsgDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ChatImageAndVideoMsg;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "CHAT_IMAGE_AND_VIDEO_MSG".  
17 -*/  
18 -public class ChatImageAndVideoMsgDao extends AbstractDao<ChatImageAndVideoMsg, String> {  
19 -  
20 - public static final String TABLENAME = "CHAT_IMAGE_AND_VIDEO_MSG";  
21 -  
22 - /**  
23 - * Properties of entity ChatImageAndVideoMsg.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Sid = new Property(0, String.class, "sid", false, "SID");  
28 - public final static Property ConversationType = new Property(1, String.class, "conversationType", false, "CONVERSATION_TYPE");  
29 - public final static Property TargetId = new Property(2, String.class, "targetId", false, "TARGET_ID");  
30 - public final static Property SendState = new Property(3, String.class, "sendState", false, "SEND_STATE");  
31 - public final static Property SendTime = new Property(4, Long.class, "sendTime", false, "SEND_TIME");  
32 - public final static Property MsgUniqueId = new Property(5, String.class, "msgUniqueId", true, "MSG_UNIQUE_ID");  
33 - public final static Property MessageLocator = new Property(6, String.class, "messageLocator", false, "MESSAGE_LOCATOR");  
34 - public final static Property MsgType = new Property(7, String.class, "msgType", false, "MSG_TYPE");  
35 - public final static Property ServerTime = new Property(8, Long.class, "serverTime", false, "SERVER_TIME");  
36 - public final static Property IsNewMessage = new Property(9, Boolean.class, "isNewMessage", false, "IS_NEW_MESSAGE");  
37 - }  
38 -  
39 -  
40 - public ChatImageAndVideoMsgDao(DaoConfig config) {  
41 - super(config);  
42 - }  
43 -  
44 - public ChatImageAndVideoMsgDao(DaoConfig config, DaoSession daoSession) {  
45 - super(config, daoSession);  
46 - }  
47 -  
48 - /** Creates the underlying database table. */  
49 - public static void createTable(Database db, boolean ifNotExists) {  
50 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
51 - db.execSQL("CREATE TABLE " + constraint + "\"CHAT_IMAGE_AND_VIDEO_MSG\" (" + //  
52 - "\"SID\" TEXT NOT NULL ," + // 0: sid  
53 - "\"CONVERSATION_TYPE\" TEXT," + // 1: conversationType  
54 - "\"TARGET_ID\" TEXT NOT NULL ," + // 2: targetId  
55 - "\"SEND_STATE\" TEXT," + // 3: sendState  
56 - "\"SEND_TIME\" INTEGER," + // 4: sendTime  
57 - "\"MSG_UNIQUE_ID\" TEXT PRIMARY KEY NOT NULL ," + // 5: msgUniqueId  
58 - "\"MESSAGE_LOCATOR\" TEXT," + // 6: messageLocator  
59 - "\"MSG_TYPE\" TEXT," + // 7: msgType  
60 - "\"SERVER_TIME\" INTEGER," + // 8: serverTime  
61 - "\"IS_NEW_MESSAGE\" INTEGER);"); // 9: isNewMessage  
62 - }  
63 -  
64 - /** Drops the underlying database table. */  
65 - public static void dropTable(Database db, boolean ifExists) {  
66 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CHAT_IMAGE_AND_VIDEO_MSG\"";  
67 - db.execSQL(sql);  
68 - }  
69 -  
70 - @Override  
71 - protected final void bindValues(DatabaseStatement stmt, ChatImageAndVideoMsg entity) {  
72 - stmt.clearBindings();  
73 - stmt.bindString(1, entity.getSid());  
74 -  
75 - String conversationType = entity.getConversationType();  
76 - if (conversationType != null) {  
77 - stmt.bindString(2, conversationType);  
78 - }  
79 - stmt.bindString(3, entity.getTargetId());  
80 -  
81 - String sendState = entity.getSendState();  
82 - if (sendState != null) {  
83 - stmt.bindString(4, sendState);  
84 - }  
85 -  
86 - Long sendTime = entity.getSendTime();  
87 - if (sendTime != null) {  
88 - stmt.bindLong(5, sendTime);  
89 - }  
90 - stmt.bindString(6, entity.getMsgUniqueId());  
91 -  
92 - String messageLocator = entity.getMessageLocator();  
93 - if (messageLocator != null) {  
94 - stmt.bindString(7, messageLocator);  
95 - }  
96 -  
97 - String msgType = entity.getMsgType();  
98 - if (msgType != null) {  
99 - stmt.bindString(8, msgType);  
100 - }  
101 -  
102 - Long serverTime = entity.getServerTime();  
103 - if (serverTime != null) {  
104 - stmt.bindLong(9, serverTime);  
105 - }  
106 -  
107 - Boolean isNewMessage = entity.getIsNewMessage();  
108 - if (isNewMessage != null) {  
109 - stmt.bindLong(10, isNewMessage ? 1L: 0L);  
110 - }  
111 - }  
112 -  
113 - @Override  
114 - protected final void bindValues(SQLiteStatement stmt, ChatImageAndVideoMsg entity) {  
115 - stmt.clearBindings();  
116 - stmt.bindString(1, entity.getSid());  
117 -  
118 - String conversationType = entity.getConversationType();  
119 - if (conversationType != null) {  
120 - stmt.bindString(2, conversationType);  
121 - }  
122 - stmt.bindString(3, entity.getTargetId());  
123 -  
124 - String sendState = entity.getSendState();  
125 - if (sendState != null) {  
126 - stmt.bindString(4, sendState);  
127 - }  
128 -  
129 - Long sendTime = entity.getSendTime();  
130 - if (sendTime != null) {  
131 - stmt.bindLong(5, sendTime);  
132 - }  
133 - stmt.bindString(6, entity.getMsgUniqueId());  
134 -  
135 - String messageLocator = entity.getMessageLocator();  
136 - if (messageLocator != null) {  
137 - stmt.bindString(7, messageLocator);  
138 - }  
139 -  
140 - String msgType = entity.getMsgType();  
141 - if (msgType != null) {  
142 - stmt.bindString(8, msgType);  
143 - }  
144 -  
145 - Long serverTime = entity.getServerTime();  
146 - if (serverTime != null) {  
147 - stmt.bindLong(9, serverTime);  
148 - }  
149 -  
150 - Boolean isNewMessage = entity.getIsNewMessage();  
151 - if (isNewMessage != null) {  
152 - stmt.bindLong(10, isNewMessage ? 1L: 0L);  
153 - }  
154 - }  
155 -  
156 - @Override  
157 - public String readKey(Cursor cursor, int offset) {  
158 - return cursor.getString(offset + 5);  
159 - }  
160 -  
161 - @Override  
162 - public ChatImageAndVideoMsg readEntity(Cursor cursor, int offset) {  
163 - ChatImageAndVideoMsg entity = new ChatImageAndVideoMsg( //  
164 - cursor.getString(offset + 0), // sid  
165 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // conversationType  
166 - cursor.getString(offset + 2), // targetId  
167 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // sendState  
168 - cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4), // sendTime  
169 - cursor.getString(offset + 5), // msgUniqueId  
170 - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // messageLocator  
171 - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // msgType  
172 - cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8), // serverTime  
173 - cursor.isNull(offset + 9) ? null : cursor.getShort(offset + 9) != 0 // isNewMessage  
174 - );  
175 - return entity;  
176 - }  
177 -  
178 - @Override  
179 - public void readEntity(Cursor cursor, ChatImageAndVideoMsg entity, int offset) {  
180 - entity.setSid(cursor.getString(offset + 0));  
181 - entity.setConversationType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
182 - entity.setTargetId(cursor.getString(offset + 2));  
183 - entity.setSendState(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
184 - entity.setSendTime(cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4));  
185 - entity.setMsgUniqueId(cursor.getString(offset + 5));  
186 - entity.setMessageLocator(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));  
187 - entity.setMsgType(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));  
188 - entity.setServerTime(cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8));  
189 - entity.setIsNewMessage(cursor.isNull(offset + 9) ? null : cursor.getShort(offset + 9) != 0);  
190 - }  
191 -  
192 - @Override  
193 - protected final String updateKeyAfterInsert(ChatImageAndVideoMsg entity, long rowId) {  
194 - return entity.getMsgUniqueId();  
195 - }  
196 -  
197 - @Override  
198 - public String getKey(ChatImageAndVideoMsg entity) {  
199 - if(entity != null) {  
200 - return entity.getMsgUniqueId();  
201 - } else {  
202 - return null;  
203 - }  
204 - }  
205 -  
206 - @Override  
207 - public boolean hasKey(ChatImageAndVideoMsg entity) {  
208 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
209 - }  
210 -  
211 - @Override  
212 - protected final boolean isEntityUpdateable() {  
213 - return true;  
214 - }  
215 -  
216 -}  
core/database/src/main/java/com/cnlive/database/dao/ChatMediaDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ChatMedia;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "CHAT_MEDIA".  
17 -*/  
18 -public class ChatMediaDao extends AbstractDao<ChatMedia, String> {  
19 -  
20 - public static final String TABLENAME = "CHAT_MEDIA";  
21 -  
22 - /**  
23 - * Properties of entity ChatMedia.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property CachePath = new Property(0, String.class, "cachePath", true, "CACHE_PATH");  
28 - public final static Property ConversationId = new Property(1, String.class, "conversationId", false, "CONVERSATION_ID");  
29 - public final static Property MediaType = new Property(2, String.class, "mediaType", false, "MEDIA_TYPE");  
30 - public final static Property ThumbPath = new Property(3, String.class, "thumbPath", false, "THUMB_PATH");  
31 - public final static Property VideoDur = new Property(4, String.class, "videoDur", false, "VIDEO_DUR");  
32 - public final static Property CacheTime = new Property(5, Long.class, "cacheTime", false, "CACHE_TIME");  
33 - }  
34 -  
35 -  
36 - public ChatMediaDao(DaoConfig config) {  
37 - super(config);  
38 - }  
39 -  
40 - public ChatMediaDao(DaoConfig config, DaoSession daoSession) {  
41 - super(config, daoSession);  
42 - }  
43 -  
44 - /** Creates the underlying database table. */  
45 - public static void createTable(Database db, boolean ifNotExists) {  
46 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
47 - db.execSQL("CREATE TABLE " + constraint + "\"CHAT_MEDIA\" (" + //  
48 - "\"CACHE_PATH\" TEXT PRIMARY KEY NOT NULL ," + // 0: cachePath  
49 - "\"CONVERSATION_ID\" TEXT," + // 1: conversationId  
50 - "\"MEDIA_TYPE\" TEXT," + // 2: mediaType  
51 - "\"THUMB_PATH\" TEXT," + // 3: thumbPath  
52 - "\"VIDEO_DUR\" TEXT," + // 4: videoDur  
53 - "\"CACHE_TIME\" INTEGER);"); // 5: cacheTime  
54 - }  
55 -  
56 - /** Drops the underlying database table. */  
57 - public static void dropTable(Database db, boolean ifExists) {  
58 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CHAT_MEDIA\"";  
59 - db.execSQL(sql);  
60 - }  
61 -  
62 - @Override  
63 - protected final void bindValues(DatabaseStatement stmt, ChatMedia entity) {  
64 - stmt.clearBindings();  
65 - stmt.bindString(1, entity.getCachePath());  
66 -  
67 - String conversationId = entity.getConversationId();  
68 - if (conversationId != null) {  
69 - stmt.bindString(2, conversationId);  
70 - }  
71 -  
72 - String mediaType = entity.getMediaType();  
73 - if (mediaType != null) {  
74 - stmt.bindString(3, mediaType);  
75 - }  
76 -  
77 - String thumbPath = entity.getThumbPath();  
78 - if (thumbPath != null) {  
79 - stmt.bindString(4, thumbPath);  
80 - }  
81 -  
82 - String videoDur = entity.getVideoDur();  
83 - if (videoDur != null) {  
84 - stmt.bindString(5, videoDur);  
85 - }  
86 -  
87 - Long cacheTime = entity.getCacheTime();  
88 - if (cacheTime != null) {  
89 - stmt.bindLong(6, cacheTime);  
90 - }  
91 - }  
92 -  
93 - @Override  
94 - protected final void bindValues(SQLiteStatement stmt, ChatMedia entity) {  
95 - stmt.clearBindings();  
96 - stmt.bindString(1, entity.getCachePath());  
97 -  
98 - String conversationId = entity.getConversationId();  
99 - if (conversationId != null) {  
100 - stmt.bindString(2, conversationId);  
101 - }  
102 -  
103 - String mediaType = entity.getMediaType();  
104 - if (mediaType != null) {  
105 - stmt.bindString(3, mediaType);  
106 - }  
107 -  
108 - String thumbPath = entity.getThumbPath();  
109 - if (thumbPath != null) {  
110 - stmt.bindString(4, thumbPath);  
111 - }  
112 -  
113 - String videoDur = entity.getVideoDur();  
114 - if (videoDur != null) {  
115 - stmt.bindString(5, videoDur);  
116 - }  
117 -  
118 - Long cacheTime = entity.getCacheTime();  
119 - if (cacheTime != null) {  
120 - stmt.bindLong(6, cacheTime);  
121 - }  
122 - }  
123 -  
124 - @Override  
125 - public String readKey(Cursor cursor, int offset) {  
126 - return cursor.getString(offset + 0);  
127 - }  
128 -  
129 - @Override  
130 - public ChatMedia readEntity(Cursor cursor, int offset) {  
131 - ChatMedia entity = new ChatMedia( //  
132 - cursor.getString(offset + 0), // cachePath  
133 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // conversationId  
134 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // mediaType  
135 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // thumbPath  
136 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // videoDur  
137 - cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5) // cacheTime  
138 - );  
139 - return entity;  
140 - }  
141 -  
142 - @Override  
143 - public void readEntity(Cursor cursor, ChatMedia entity, int offset) {  
144 - entity.setCachePath(cursor.getString(offset + 0));  
145 - entity.setConversationId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
146 - entity.setMediaType(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
147 - entity.setThumbPath(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
148 - entity.setVideoDur(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
149 - entity.setCacheTime(cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5));  
150 - }  
151 -  
152 - @Override  
153 - protected final String updateKeyAfterInsert(ChatMedia entity, long rowId) {  
154 - return entity.getCachePath();  
155 - }  
156 -  
157 - @Override  
158 - public String getKey(ChatMedia entity) {  
159 - if(entity != null) {  
160 - return entity.getCachePath();  
161 - } else {  
162 - return null;  
163 - }  
164 - }  
165 -  
166 - @Override  
167 - public boolean hasKey(ChatMedia entity) {  
168 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
169 - }  
170 -  
171 - @Override  
172 - protected final boolean isEntityUpdateable() {  
173 - return true;  
174 - }  
175 -  
176 -}  
core/database/src/main/java/com/cnlive/database/dao/ContactListDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ContactList;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "CONTACT_LIST".  
17 -*/  
18 -public class ContactListDao extends AbstractDao<ContactList, String> {  
19 -  
20 - public static final String TABLENAME = "CONTACT_LIST";  
21 -  
22 - /**  
23 - * Properties of entity ContactList.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property FriendId = new Property(0, String.class, "friendId", true, "FRIEND_ID");  
28 - public final static Property FriendFaceUrl = new Property(1, String.class, "friendFaceUrl", false, "FRIEND_FACE_URL");  
29 - public final static Property FriendNickName = new Property(2, String.class, "friendNickName", false, "FRIEND_NICK_NAME");  
30 - public final static Property FriendRemark = new Property(3, String.class, "friendRemark", false, "FRIEND_REMARK");  
31 - public final static Property FriendCustomInfoJson = new Property(4, String.class, "friendCustomInfoJson", false, "FRIEND_CUSTOM_INFO_JSON");  
32 - }  
33 -  
34 -  
35 - public ContactListDao(DaoConfig config) {  
36 - super(config);  
37 - }  
38 -  
39 - public ContactListDao(DaoConfig config, DaoSession daoSession) {  
40 - super(config, daoSession);  
41 - }  
42 -  
43 - /** Creates the underlying database table. */  
44 - public static void createTable(Database db, boolean ifNotExists) {  
45 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
46 - db.execSQL("CREATE TABLE " + constraint + "\"CONTACT_LIST\" (" + //  
47 - "\"FRIEND_ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: friendId  
48 - "\"FRIEND_FACE_URL\" TEXT," + // 1: friendFaceUrl  
49 - "\"FRIEND_NICK_NAME\" TEXT," + // 2: friendNickName  
50 - "\"FRIEND_REMARK\" TEXT," + // 3: friendRemark  
51 - "\"FRIEND_CUSTOM_INFO_JSON\" TEXT);"); // 4: friendCustomInfoJson  
52 - }  
53 -  
54 - /** Drops the underlying database table. */  
55 - public static void dropTable(Database db, boolean ifExists) {  
56 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CONTACT_LIST\"";  
57 - db.execSQL(sql);  
58 - }  
59 -  
60 - @Override  
61 - protected final void bindValues(DatabaseStatement stmt, ContactList entity) {  
62 - stmt.clearBindings();  
63 - stmt.bindString(1, entity.getFriendId());  
64 -  
65 - String friendFaceUrl = entity.getFriendFaceUrl();  
66 - if (friendFaceUrl != null) {  
67 - stmt.bindString(2, friendFaceUrl);  
68 - }  
69 -  
70 - String friendNickName = entity.getFriendNickName();  
71 - if (friendNickName != null) {  
72 - stmt.bindString(3, friendNickName);  
73 - }  
74 -  
75 - String friendRemark = entity.getFriendRemark();  
76 - if (friendRemark != null) {  
77 - stmt.bindString(4, friendRemark);  
78 - }  
79 -  
80 - String friendCustomInfoJson = entity.getFriendCustomInfoJson();  
81 - if (friendCustomInfoJson != null) {  
82 - stmt.bindString(5, friendCustomInfoJson);  
83 - }  
84 - }  
85 -  
86 - @Override  
87 - protected final void bindValues(SQLiteStatement stmt, ContactList entity) {  
88 - stmt.clearBindings();  
89 - stmt.bindString(1, entity.getFriendId());  
90 -  
91 - String friendFaceUrl = entity.getFriendFaceUrl();  
92 - if (friendFaceUrl != null) {  
93 - stmt.bindString(2, friendFaceUrl);  
94 - }  
95 -  
96 - String friendNickName = entity.getFriendNickName();  
97 - if (friendNickName != null) {  
98 - stmt.bindString(3, friendNickName);  
99 - }  
100 -  
101 - String friendRemark = entity.getFriendRemark();  
102 - if (friendRemark != null) {  
103 - stmt.bindString(4, friendRemark);  
104 - }  
105 -  
106 - String friendCustomInfoJson = entity.getFriendCustomInfoJson();  
107 - if (friendCustomInfoJson != null) {  
108 - stmt.bindString(5, friendCustomInfoJson);  
109 - }  
110 - }  
111 -  
112 - @Override  
113 - public String readKey(Cursor cursor, int offset) {  
114 - return cursor.getString(offset + 0);  
115 - }  
116 -  
117 - @Override  
118 - public ContactList readEntity(Cursor cursor, int offset) {  
119 - ContactList entity = new ContactList( //  
120 - cursor.getString(offset + 0), // friendId  
121 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // friendFaceUrl  
122 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // friendNickName  
123 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // friendRemark  
124 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4) // friendCustomInfoJson  
125 - );  
126 - return entity;  
127 - }  
128 -  
129 - @Override  
130 - public void readEntity(Cursor cursor, ContactList entity, int offset) {  
131 - entity.setFriendId(cursor.getString(offset + 0));  
132 - entity.setFriendFaceUrl(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
133 - entity.setFriendNickName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
134 - entity.setFriendRemark(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
135 - entity.setFriendCustomInfoJson(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
136 - }  
137 -  
138 - @Override  
139 - protected final String updateKeyAfterInsert(ContactList entity, long rowId) {  
140 - return entity.getFriendId();  
141 - }  
142 -  
143 - @Override  
144 - public String getKey(ContactList entity) {  
145 - if(entity != null) {  
146 - return entity.getFriendId();  
147 - } else {  
148 - return null;  
149 - }  
150 - }  
151 -  
152 - @Override  
153 - public boolean hasKey(ContactList entity) {  
154 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
155 - }  
156 -  
157 - @Override  
158 - protected final boolean isEntityUpdateable() {  
159 - return true;  
160 - }  
161 -  
162 -}  
core/database/src/main/java/com/cnlive/database/dao/ContanctDaRenEntityDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ContanctDaRenEntity;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "CONTANCT_DA_REN_ENTITY".  
17 -*/  
18 -public class ContanctDaRenEntityDao extends AbstractDao<ContanctDaRenEntity, String> {  
19 -  
20 - public static final String TABLENAME = "CONTANCT_DA_REN_ENTITY";  
21 -  
22 - /**  
23 - * Properties of entity ContanctDaRenEntity.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Uid = new Property(0, String.class, "uid", true, "UID");  
28 - public final static Property CacheData = new Property(1, String.class, "cacheData", false, "CACHE_DATA");  
29 - }  
30 -  
31 -  
32 - public ContanctDaRenEntityDao(DaoConfig config) {  
33 - super(config);  
34 - }  
35 -  
36 - public ContanctDaRenEntityDao(DaoConfig config, DaoSession daoSession) {  
37 - super(config, daoSession);  
38 - }  
39 -  
40 - /** Creates the underlying database table. */  
41 - public static void createTable(Database db, boolean ifNotExists) {  
42 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
43 - db.execSQL("CREATE TABLE " + constraint + "\"CONTANCT_DA_REN_ENTITY\" (" + //  
44 - "\"UID\" TEXT PRIMARY KEY NOT NULL ," + // 0: uid  
45 - "\"CACHE_DATA\" TEXT);"); // 1: cacheData  
46 - }  
47 -  
48 - /** Drops the underlying database table. */  
49 - public static void dropTable(Database db, boolean ifExists) {  
50 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CONTANCT_DA_REN_ENTITY\"";  
51 - db.execSQL(sql);  
52 - }  
53 -  
54 - @Override  
55 - protected final void bindValues(DatabaseStatement stmt, ContanctDaRenEntity entity) {  
56 - stmt.clearBindings();  
57 -  
58 - String uid = entity.getUid();  
59 - if (uid != null) {  
60 - stmt.bindString(1, uid);  
61 - }  
62 -  
63 - String cacheData = entity.getCacheData();  
64 - if (cacheData != null) {  
65 - stmt.bindString(2, cacheData);  
66 - }  
67 - }  
68 -  
69 - @Override  
70 - protected final void bindValues(SQLiteStatement stmt, ContanctDaRenEntity entity) {  
71 - stmt.clearBindings();  
72 -  
73 - String uid = entity.getUid();  
74 - if (uid != null) {  
75 - stmt.bindString(1, uid);  
76 - }  
77 -  
78 - String cacheData = entity.getCacheData();  
79 - if (cacheData != null) {  
80 - stmt.bindString(2, cacheData);  
81 - }  
82 - }  
83 -  
84 - @Override  
85 - public String readKey(Cursor cursor, int offset) {  
86 - return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);  
87 - }  
88 -  
89 - @Override  
90 - public ContanctDaRenEntity readEntity(Cursor cursor, int offset) {  
91 - ContanctDaRenEntity entity = new ContanctDaRenEntity( //  
92 - cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // uid  
93 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1) // cacheData  
94 - );  
95 - return entity;  
96 - }  
97 -  
98 - @Override  
99 - public void readEntity(Cursor cursor, ContanctDaRenEntity entity, int offset) {  
100 - entity.setUid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));  
101 - entity.setCacheData(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
102 - }  
103 -  
104 - @Override  
105 - protected final String updateKeyAfterInsert(ContanctDaRenEntity entity, long rowId) {  
106 - return entity.getUid();  
107 - }  
108 -  
109 - @Override  
110 - public String getKey(ContanctDaRenEntity entity) {  
111 - if(entity != null) {  
112 - return entity.getUid();  
113 - } else {  
114 - return null;  
115 - }  
116 - }  
117 -  
118 - @Override  
119 - public boolean hasKey(ContanctDaRenEntity entity) {  
120 - return entity.getUid() != null;  
121 - }  
122 -  
123 - @Override  
124 - protected final boolean isEntityUpdateable() {  
125 - return true;  
126 - }  
127 -  
128 -}  
core/database/src/main/java/com/cnlive/database/dao/ContanctGroupChatEntityDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ContanctGroupChatEntity;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "CONTANCT_GROUP_CHAT_ENTITY".  
17 -*/  
18 -public class ContanctGroupChatEntityDao extends AbstractDao<ContanctGroupChatEntity, String> {  
19 -  
20 - public static final String TABLENAME = "CONTANCT_GROUP_CHAT_ENTITY";  
21 -  
22 - /**  
23 - * Properties of entity ContanctGroupChatEntity.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Uid = new Property(0, String.class, "uid", true, "UID");  
28 - public final static Property CacheGroupListData = new Property(1, String.class, "cacheGroupListData", false, "CACHE_GROUP_LIST_DATA");  
29 - public final static Property CacheRequestNetData = new Property(2, String.class, "cacheRequestNetData", false, "CACHE_REQUEST_NET_DATA");  
30 - }  
31 -  
32 -  
33 - public ContanctGroupChatEntityDao(DaoConfig config) {  
34 - super(config);  
35 - }  
36 -  
37 - public ContanctGroupChatEntityDao(DaoConfig config, DaoSession daoSession) {  
38 - super(config, daoSession);  
39 - }  
40 -  
41 - /** Creates the underlying database table. */  
42 - public static void createTable(Database db, boolean ifNotExists) {  
43 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
44 - db.execSQL("CREATE TABLE " + constraint + "\"CONTANCT_GROUP_CHAT_ENTITY\" (" + //  
45 - "\"UID\" TEXT PRIMARY KEY NOT NULL ," + // 0: uid  
46 - "\"CACHE_GROUP_LIST_DATA\" TEXT," + // 1: cacheGroupListData  
47 - "\"CACHE_REQUEST_NET_DATA\" TEXT);"); // 2: cacheRequestNetData  
48 - }  
49 -  
50 - /** Drops the underlying database table. */  
51 - public static void dropTable(Database db, boolean ifExists) {  
52 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CONTANCT_GROUP_CHAT_ENTITY\"";  
53 - db.execSQL(sql);  
54 - }  
55 -  
56 - @Override  
57 - protected final void bindValues(DatabaseStatement stmt, ContanctGroupChatEntity entity) {  
58 - stmt.clearBindings();  
59 -  
60 - String uid = entity.getUid();  
61 - if (uid != null) {  
62 - stmt.bindString(1, uid);  
63 - }  
64 -  
65 - String cacheGroupListData = entity.getCacheGroupListData();  
66 - if (cacheGroupListData != null) {  
67 - stmt.bindString(2, cacheGroupListData);  
68 - }  
69 -  
70 - String cacheRequestNetData = entity.getCacheRequestNetData();  
71 - if (cacheRequestNetData != null) {  
72 - stmt.bindString(3, cacheRequestNetData);  
73 - }  
74 - }  
75 -  
76 - @Override  
77 - protected final void bindValues(SQLiteStatement stmt, ContanctGroupChatEntity entity) {  
78 - stmt.clearBindings();  
79 -  
80 - String uid = entity.getUid();  
81 - if (uid != null) {  
82 - stmt.bindString(1, uid);  
83 - }  
84 -  
85 - String cacheGroupListData = entity.getCacheGroupListData();  
86 - if (cacheGroupListData != null) {  
87 - stmt.bindString(2, cacheGroupListData);  
88 - }  
89 -  
90 - String cacheRequestNetData = entity.getCacheRequestNetData();  
91 - if (cacheRequestNetData != null) {  
92 - stmt.bindString(3, cacheRequestNetData);  
93 - }  
94 - }  
95 -  
96 - @Override  
97 - public String readKey(Cursor cursor, int offset) {  
98 - return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);  
99 - }  
100 -  
101 - @Override  
102 - public ContanctGroupChatEntity readEntity(Cursor cursor, int offset) {  
103 - ContanctGroupChatEntity entity = new ContanctGroupChatEntity( //  
104 - cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // uid  
105 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // cacheGroupListData  
106 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2) // cacheRequestNetData  
107 - );  
108 - return entity;  
109 - }  
110 -  
111 - @Override  
112 - public void readEntity(Cursor cursor, ContanctGroupChatEntity entity, int offset) {  
113 - entity.setUid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));  
114 - entity.setCacheGroupListData(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
115 - entity.setCacheRequestNetData(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
116 - }  
117 -  
118 - @Override  
119 - protected final String updateKeyAfterInsert(ContanctGroupChatEntity entity, long rowId) {  
120 - return entity.getUid();  
121 - }  
122 -  
123 - @Override  
124 - public String getKey(ContanctGroupChatEntity entity) {  
125 - if(entity != null) {  
126 - return entity.getUid();  
127 - } else {  
128 - return null;  
129 - }  
130 - }  
131 -  
132 - @Override  
133 - public boolean hasKey(ContanctGroupChatEntity entity) {  
134 - return entity.getUid() != null;  
135 - }  
136 -  
137 - @Override  
138 - protected final boolean isEntityUpdateable() {  
139 - return true;  
140 - }  
141 -  
142 -}  
core/database/src/main/java/com/cnlive/database/dao/DBFriendCircleMessageDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.DBFriendCircleMessage;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "DBFRIEND_CIRCLE_MESSAGE".  
17 -*/  
18 -public class DBFriendCircleMessageDao extends AbstractDao<DBFriendCircleMessage, String> {  
19 -  
20 - public static final String TABLENAME = "DBFRIEND_CIRCLE_MESSAGE";  
21 -  
22 - /**  
23 - * Properties of entity DBFriendCircleMessage.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Time = new Property(0, String.class, "time", true, "TIME");  
28 - public final static Property Sid = new Property(1, String.class, "sid", false, "SID");  
29 - public final static Property MomentId = new Property(2, String.class, "momentId", false, "MOMENT_ID");  
30 - public final static Property UserIcon = new Property(3, String.class, "userIcon", false, "USER_ICON");  
31 - public final static Property UserName = new Property(4, String.class, "userName", false, "USER_NAME");  
32 - public final static Property Message = new Property(5, String.class, "message", false, "MESSAGE");  
33 - public final static Property ContentImage = new Property(6, String.class, "contentImage", false, "CONTENT_IMAGE");  
34 - public final static Property ContentType = new Property(7, String.class, "contentType", false, "CONTENT_TYPE");  
35 - public final static Property ContentTitle = new Property(8, String.class, "contentTitle", false, "CONTENT_TITLE");  
36 - }  
37 -  
38 -  
39 - public DBFriendCircleMessageDao(DaoConfig config) {  
40 - super(config);  
41 - }  
42 -  
43 - public DBFriendCircleMessageDao(DaoConfig config, DaoSession daoSession) {  
44 - super(config, daoSession);  
45 - }  
46 -  
47 - /** Creates the underlying database table. */  
48 - public static void createTable(Database db, boolean ifNotExists) {  
49 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
50 - db.execSQL("CREATE TABLE " + constraint + "\"DBFRIEND_CIRCLE_MESSAGE\" (" + //  
51 - "\"TIME\" TEXT PRIMARY KEY NOT NULL ," + // 0: time  
52 - "\"SID\" TEXT," + // 1: sid  
53 - "\"MOMENT_ID\" TEXT," + // 2: momentId  
54 - "\"USER_ICON\" TEXT," + // 3: userIcon  
55 - "\"USER_NAME\" TEXT," + // 4: userName  
56 - "\"MESSAGE\" TEXT," + // 5: message  
57 - "\"CONTENT_IMAGE\" TEXT," + // 6: contentImage  
58 - "\"CONTENT_TYPE\" TEXT," + // 7: contentType  
59 - "\"CONTENT_TITLE\" TEXT);"); // 8: contentTitle  
60 - }  
61 -  
62 - /** Drops the underlying database table. */  
63 - public static void dropTable(Database db, boolean ifExists) {  
64 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DBFRIEND_CIRCLE_MESSAGE\"";  
65 - db.execSQL(sql);  
66 - }  
67 -  
68 - @Override  
69 - protected final void bindValues(DatabaseStatement stmt, DBFriendCircleMessage entity) {  
70 - stmt.clearBindings();  
71 - stmt.bindString(1, entity.getTime());  
72 -  
73 - String sid = entity.getSid();  
74 - if (sid != null) {  
75 - stmt.bindString(2, sid);  
76 - }  
77 -  
78 - String momentId = entity.getMomentId();  
79 - if (momentId != null) {  
80 - stmt.bindString(3, momentId);  
81 - }  
82 -  
83 - String userIcon = entity.getUserIcon();  
84 - if (userIcon != null) {  
85 - stmt.bindString(4, userIcon);  
86 - }  
87 -  
88 - String userName = entity.getUserName();  
89 - if (userName != null) {  
90 - stmt.bindString(5, userName);  
91 - }  
92 -  
93 - String message = entity.getMessage();  
94 - if (message != null) {  
95 - stmt.bindString(6, message);  
96 - }  
97 -  
98 - String contentImage = entity.getContentImage();  
99 - if (contentImage != null) {  
100 - stmt.bindString(7, contentImage);  
101 - }  
102 -  
103 - String contentType = entity.getContentType();  
104 - if (contentType != null) {  
105 - stmt.bindString(8, contentType);  
106 - }  
107 -  
108 - String contentTitle = entity.getContentTitle();  
109 - if (contentTitle != null) {  
110 - stmt.bindString(9, contentTitle);  
111 - }  
112 - }  
113 -  
114 - @Override  
115 - protected final void bindValues(SQLiteStatement stmt, DBFriendCircleMessage entity) {  
116 - stmt.clearBindings();  
117 - stmt.bindString(1, entity.getTime());  
118 -  
119 - String sid = entity.getSid();  
120 - if (sid != null) {  
121 - stmt.bindString(2, sid);  
122 - }  
123 -  
124 - String momentId = entity.getMomentId();  
125 - if (momentId != null) {  
126 - stmt.bindString(3, momentId);  
127 - }  
128 -  
129 - String userIcon = entity.getUserIcon();  
130 - if (userIcon != null) {  
131 - stmt.bindString(4, userIcon);  
132 - }  
133 -  
134 - String userName = entity.getUserName();  
135 - if (userName != null) {  
136 - stmt.bindString(5, userName);  
137 - }  
138 -  
139 - String message = entity.getMessage();  
140 - if (message != null) {  
141 - stmt.bindString(6, message);  
142 - }  
143 -  
144 - String contentImage = entity.getContentImage();  
145 - if (contentImage != null) {  
146 - stmt.bindString(7, contentImage);  
147 - }  
148 -  
149 - String contentType = entity.getContentType();  
150 - if (contentType != null) {  
151 - stmt.bindString(8, contentType);  
152 - }  
153 -  
154 - String contentTitle = entity.getContentTitle();  
155 - if (contentTitle != null) {  
156 - stmt.bindString(9, contentTitle);  
157 - }  
158 - }  
159 -  
160 - @Override  
161 - public String readKey(Cursor cursor, int offset) {  
162 - return cursor.getString(offset + 0);  
163 - }  
164 -  
165 - @Override  
166 - public DBFriendCircleMessage readEntity(Cursor cursor, int offset) {  
167 - DBFriendCircleMessage entity = new DBFriendCircleMessage( //  
168 - cursor.getString(offset + 0), // time  
169 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // sid  
170 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // momentId  
171 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // userIcon  
172 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // userName  
173 - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // message  
174 - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // contentImage  
175 - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // contentType  
176 - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // contentTitle  
177 - );  
178 - return entity;  
179 - }  
180 -  
181 - @Override  
182 - public void readEntity(Cursor cursor, DBFriendCircleMessage entity, int offset) {  
183 - entity.setTime(cursor.getString(offset + 0));  
184 - entity.setSid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
185 - entity.setMomentId(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
186 - entity.setUserIcon(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
187 - entity.setUserName(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
188 - entity.setMessage(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));  
189 - entity.setContentImage(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));  
190 - entity.setContentType(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));  
191 - entity.setContentTitle(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));  
192 - }  
193 -  
194 - @Override  
195 - protected final String updateKeyAfterInsert(DBFriendCircleMessage entity, long rowId) {  
196 - return entity.getTime();  
197 - }  
198 -  
199 - @Override  
200 - public String getKey(DBFriendCircleMessage entity) {  
201 - if(entity != null) {  
202 - return entity.getTime();  
203 - } else {  
204 - return null;  
205 - }  
206 - }  
207 -  
208 - @Override  
209 - public boolean hasKey(DBFriendCircleMessage entity) {  
210 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
211 - }  
212 -  
213 - @Override  
214 - protected final boolean isEntityUpdateable() {  
215 - return true;  
216 - }  
217 -  
218 -}  
core/database/src/main/java/com/cnlive/database/dao/DBMomentDetailDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.DBMomentDetail;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "DBMOMENT_DETAIL".  
17 -*/  
18 -public class DBMomentDetailDao extends AbstractDao<DBMomentDetail, String> {  
19 -  
20 - public static final String TABLENAME = "DBMOMENT_DETAIL";  
21 -  
22 - /**  
23 - * Properties of entity DBMomentDetail.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Sid = new Property(0, String.class, "sid", true, "SID");  
28 - public final static Property Type = new Property(1, int.class, "type", false, "TYPE");  
29 - public final static Property UserIcon = new Property(2, String.class, "userIcon", false, "USER_ICON");  
30 - public final static Property UserName = new Property(3, String.class, "userName", false, "USER_NAME");  
31 - public final static Property Signature = new Property(4, String.class, "signature", false, "SIGNATURE");  
32 - }  
33 -  
34 - private DaoSession daoSession;  
35 -  
36 -  
37 - public DBMomentDetailDao(DaoConfig config) {  
38 - super(config);  
39 - }  
40 -  
41 - public DBMomentDetailDao(DaoConfig config, DaoSession daoSession) {  
42 - super(config, daoSession);  
43 - this.daoSession = daoSession;  
44 - }  
45 -  
46 - /** Creates the underlying database table. */  
47 - public static void createTable(Database db, boolean ifNotExists) {  
48 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
49 - db.execSQL("CREATE TABLE " + constraint + "\"DBMOMENT_DETAIL\" (" + //  
50 - "\"SID\" TEXT PRIMARY KEY NOT NULL ," + // 0: sid  
51 - "\"TYPE\" INTEGER NOT NULL ," + // 1: type  
52 - "\"USER_ICON\" TEXT NOT NULL ," + // 2: userIcon  
53 - "\"USER_NAME\" TEXT NOT NULL ," + // 3: userName  
54 - "\"SIGNATURE\" TEXT NOT NULL );"); // 4: signature  
55 - }  
56 -  
57 - /** Drops the underlying database table. */  
58 - public static void dropTable(Database db, boolean ifExists) {  
59 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DBMOMENT_DETAIL\"";  
60 - db.execSQL(sql);  
61 - }  
62 -  
63 - @Override  
64 - protected final void bindValues(DatabaseStatement stmt, DBMomentDetail entity) {  
65 - stmt.clearBindings();  
66 -  
67 - String sid = entity.getSid();  
68 - if (sid != null) {  
69 - stmt.bindString(1, sid);  
70 - }  
71 - stmt.bindLong(2, entity.getType());  
72 - stmt.bindString(3, entity.getUserIcon());  
73 - stmt.bindString(4, entity.getUserName());  
74 - stmt.bindString(5, entity.getSignature());  
75 - }  
76 -  
77 - @Override  
78 - protected final void bindValues(SQLiteStatement stmt, DBMomentDetail entity) {  
79 - stmt.clearBindings();  
80 -  
81 - String sid = entity.getSid();  
82 - if (sid != null) {  
83 - stmt.bindString(1, sid);  
84 - }  
85 - stmt.bindLong(2, entity.getType());  
86 - stmt.bindString(3, entity.getUserIcon());  
87 - stmt.bindString(4, entity.getUserName());  
88 - stmt.bindString(5, entity.getSignature());  
89 - }  
90 -  
91 - @Override  
92 - protected final void attachEntity(DBMomentDetail entity) {  
93 - super.attachEntity(entity);  
94 - entity.__setDaoSession(daoSession);  
95 - }  
96 -  
97 - @Override  
98 - public String readKey(Cursor cursor, int offset) {  
99 - return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);  
100 - }  
101 -  
102 - @Override  
103 - public DBMomentDetail readEntity(Cursor cursor, int offset) {  
104 - DBMomentDetail entity = new DBMomentDetail( //  
105 - cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // sid  
106 - cursor.getInt(offset + 1), // type  
107 - cursor.getString(offset + 2), // userIcon  
108 - cursor.getString(offset + 3), // userName  
109 - cursor.getString(offset + 4) // signature  
110 - );  
111 - return entity;  
112 - }  
113 -  
114 - @Override  
115 - public void readEntity(Cursor cursor, DBMomentDetail entity, int offset) {  
116 - entity.setSid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));  
117 - entity.setType(cursor.getInt(offset + 1));  
118 - entity.setUserIcon(cursor.getString(offset + 2));  
119 - entity.setUserName(cursor.getString(offset + 3));  
120 - entity.setSignature(cursor.getString(offset + 4));  
121 - }  
122 -  
123 - @Override  
124 - protected final String updateKeyAfterInsert(DBMomentDetail entity, long rowId) {  
125 - return entity.getSid();  
126 - }  
127 -  
128 - @Override  
129 - public String getKey(DBMomentDetail entity) {  
130 - if(entity != null) {  
131 - return entity.getSid();  
132 - } else {  
133 - return null;  
134 - }  
135 - }  
136 -  
137 - @Override  
138 - public boolean hasKey(DBMomentDetail entity) {  
139 - return entity.getSid() != null;  
140 - }  
141 -  
142 - @Override  
143 - protected final boolean isEntityUpdateable() {  
144 - return true;  
145 - }  
146 -  
147 -}  
core/database/src/main/java/com/cnlive/database/dao/DBMomentItemDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import java.util.List;  
4 -import java.util.ArrayList;  
5 -import android.database.Cursor;  
6 -import android.database.sqlite.SQLiteStatement;  
7 -  
8 -import org.greenrobot.greendao.AbstractDao;  
9 -import org.greenrobot.greendao.Property;  
10 -import org.greenrobot.greendao.internal.SqlUtils;  
11 -import org.greenrobot.greendao.internal.DaoConfig;  
12 -import org.greenrobot.greendao.database.Database;  
13 -import org.greenrobot.greendao.database.DatabaseStatement;  
14 -import org.greenrobot.greendao.query.Query;  
15 -import org.greenrobot.greendao.query.QueryBuilder;  
16 -  
17 -import com.cnlive.database.bean.DBMomentDetail;  
18 -  
19 -import com.cnlive.database.bean.DBMomentItem;  
20 -  
21 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
22 -/**  
23 - * DAO for table "DBMOMENT_ITEM".  
24 -*/  
25 -public class DBMomentItemDao extends AbstractDao<DBMomentItem, String> {  
26 -  
27 - public static final String TABLENAME = "DBMOMENT_ITEM";  
28 -  
29 - /**  
30 - * Properties of entity DBMomentItem.<br/>  
31 - * Can be used for QueryBuilder and for referencing column names.  
32 - */  
33 - public static class Properties {  
34 - public final static Property Id = new Property(0, String.class, "id", true, "ID");  
35 - public final static Property ItemId = new Property(1, String.class, "itemId", false, "ITEM_ID");  
36 - public final static Property MomentItemDetail = new Property(2, String.class, "momentItemDetail", false, "MOMENT_ITEM_DETAIL");  
37 - public final static Property Sid = new Property(3, String.class, "sid", false, "SID");  
38 - }  
39 -  
40 - private DaoSession daoSession;  
41 -  
42 - private Query<DBMomentItem> dBMomentDetail_MomentItemsQuery;  
43 -  
44 - public DBMomentItemDao(DaoConfig config) {  
45 - super(config);  
46 - }  
47 -  
48 - public DBMomentItemDao(DaoConfig config, DaoSession daoSession) {  
49 - super(config, daoSession);  
50 - this.daoSession = daoSession;  
51 - }  
52 -  
53 - /** Creates the underlying database table. */  
54 - public static void createTable(Database db, boolean ifNotExists) {  
55 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
56 - db.execSQL("CREATE TABLE " + constraint + "\"DBMOMENT_ITEM\" (" + //  
57 - "\"ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: id  
58 - "\"ITEM_ID\" TEXT," + // 1: itemId  
59 - "\"MOMENT_ITEM_DETAIL\" TEXT NOT NULL ," + // 2: momentItemDetail  
60 - "\"SID\" TEXT);"); // 3: sid  
61 - }  
62 -  
63 - /** Drops the underlying database table. */  
64 - public static void dropTable(Database db, boolean ifExists) {  
65 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DBMOMENT_ITEM\"";  
66 - db.execSQL(sql);  
67 - }  
68 -  
69 - @Override  
70 - protected final void bindValues(DatabaseStatement stmt, DBMomentItem entity) {  
71 - stmt.clearBindings();  
72 -  
73 - String id = entity.getId();  
74 - if (id != null) {  
75 - stmt.bindString(1, id);  
76 - }  
77 -  
78 - String itemId = entity.getItemId();  
79 - if (itemId != null) {  
80 - stmt.bindString(2, itemId);  
81 - }  
82 - stmt.bindString(3, entity.getMomentItemDetail());  
83 -  
84 - String sid = entity.getSid();  
85 - if (sid != null) {  
86 - stmt.bindString(4, sid);  
87 - }  
88 - }  
89 -  
90 - @Override  
91 - protected final void bindValues(SQLiteStatement stmt, DBMomentItem entity) {  
92 - stmt.clearBindings();  
93 -  
94 - String id = entity.getId();  
95 - if (id != null) {  
96 - stmt.bindString(1, id);  
97 - }  
98 -  
99 - String itemId = entity.getItemId();  
100 - if (itemId != null) {  
101 - stmt.bindString(2, itemId);  
102 - }  
103 - stmt.bindString(3, entity.getMomentItemDetail());  
104 -  
105 - String sid = entity.getSid();  
106 - if (sid != null) {  
107 - stmt.bindString(4, sid);  
108 - }  
109 - }  
110 -  
111 - @Override  
112 - protected final void attachEntity(DBMomentItem entity) {  
113 - super.attachEntity(entity);  
114 - entity.__setDaoSession(daoSession);  
115 - }  
116 -  
117 - @Override  
118 - public String readKey(Cursor cursor, int offset) {  
119 - return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);  
120 - }  
121 -  
122 - @Override  
123 - public DBMomentItem readEntity(Cursor cursor, int offset) {  
124 - DBMomentItem entity = new DBMomentItem( //  
125 - cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // id  
126 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // itemId  
127 - cursor.getString(offset + 2), // momentItemDetail  
128 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3) // sid  
129 - );  
130 - return entity;  
131 - }  
132 -  
133 - @Override  
134 - public void readEntity(Cursor cursor, DBMomentItem entity, int offset) {  
135 - entity.setId(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));  
136 - entity.setItemId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
137 - entity.setMomentItemDetail(cursor.getString(offset + 2));  
138 - entity.setSid(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
139 - }  
140 -  
141 - @Override  
142 - protected final String updateKeyAfterInsert(DBMomentItem entity, long rowId) {  
143 - return entity.getId();  
144 - }  
145 -  
146 - @Override  
147 - public String getKey(DBMomentItem entity) {  
148 - if(entity != null) {  
149 - return entity.getId();  
150 - } else {  
151 - return null;  
152 - }  
153 - }  
154 -  
155 - @Override  
156 - public boolean hasKey(DBMomentItem entity) {  
157 - return entity.getId() != null;  
158 - }  
159 -  
160 - @Override  
161 - protected final boolean isEntityUpdateable() {  
162 - return true;  
163 - }  
164 -  
165 - /** Internal query to resolve the "momentItems" to-many relationship of DBMomentDetail. */  
166 - public List<DBMomentItem> _queryDBMomentDetail_MomentItems(String sid) {  
167 - synchronized (this) {  
168 - if (dBMomentDetail_MomentItemsQuery == null) {  
169 - QueryBuilder<DBMomentItem> queryBuilder = queryBuilder();  
170 - queryBuilder.where(Properties.Sid.eq(null));  
171 - dBMomentDetail_MomentItemsQuery = queryBuilder.build();  
172 - }  
173 - }  
174 - Query<DBMomentItem> query = dBMomentDetail_MomentItemsQuery.forCurrentThread();  
175 - query.setParameter(0, sid);  
176 - return query.list();  
177 - }  
178 -  
179 - private String selectDeep;  
180 -  
181 - protected String getSelectDeep() {  
182 - if (selectDeep == null) {  
183 - StringBuilder builder = new StringBuilder("SELECT ");  
184 - SqlUtils.appendColumns(builder, "T", getAllColumns());  
185 - builder.append(',');  
186 - SqlUtils.appendColumns(builder, "T0", daoSession.getDBMomentDetailDao().getAllColumns());  
187 - builder.append(" FROM DBMOMENT_ITEM T");  
188 - builder.append(" LEFT JOIN DBMOMENT_DETAIL T0 ON T.\"SID\"=T0.\"SID\"");  
189 - builder.append(' ');  
190 - selectDeep = builder.toString();  
191 - }  
192 - return selectDeep;  
193 - }  
194 -  
195 - protected DBMomentItem loadCurrentDeep(Cursor cursor, boolean lock) {  
196 - DBMomentItem entity = loadCurrent(cursor, 0, lock);  
197 - int offset = getAllColumns().length;  
198 -  
199 - DBMomentDetail dBMomentDetail = loadCurrentOther(daoSession.getDBMomentDetailDao(), cursor, offset);  
200 - entity.setDBMomentDetail(dBMomentDetail);  
201 -  
202 - return entity;  
203 - }  
204 -  
205 - public DBMomentItem loadDeep(Long key) {  
206 - assertSinglePk();  
207 - if (key == null) {  
208 - return null;  
209 - }  
210 -  
211 - StringBuilder builder = new StringBuilder(getSelectDeep());  
212 - builder.append("WHERE ");  
213 - SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());  
214 - String sql = builder.toString();  
215 -  
216 - String[] keyArray = new String[] { key.toString() };  
217 - Cursor cursor = db.rawQuery(sql, keyArray);  
218 -  
219 - try {  
220 - boolean available = cursor.moveToFirst();  
221 - if (!available) {  
222 - return null;  
223 - } else if (!cursor.isLast()) {  
224 - throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());  
225 - }  
226 - return loadCurrentDeep(cursor, true);  
227 - } finally {  
228 - cursor.close();  
229 - }  
230 - }  
231 -  
232 - /** Reads all available rows from the given cursor and returns a list of new ImageTO objects. */  
233 - public List<DBMomentItem> loadAllDeepFromCursor(Cursor cursor) {  
234 - int count = cursor.getCount();  
235 - List<DBMomentItem> list = new ArrayList<DBMomentItem>(count);  
236 -  
237 - if (cursor.moveToFirst()) {  
238 - if (identityScope != null) {  
239 - identityScope.lock();  
240 - identityScope.reserveRoom(count);  
241 - }  
242 - try {  
243 - do {  
244 - list.add(loadCurrentDeep(cursor, false));  
245 - } while (cursor.moveToNext());  
246 - } finally {  
247 - if (identityScope != null) {  
248 - identityScope.unlock();  
249 - }  
250 - }  
251 - }  
252 - return list;  
253 - }  
254 -  
255 - protected List<DBMomentItem> loadDeepAllAndCloseCursor(Cursor cursor) {  
256 - try {  
257 - return loadAllDeepFromCursor(cursor);  
258 - } finally {  
259 - cursor.close();  
260 - }  
261 - }  
262 -  
263 -  
264 - /** A raw-style query where you can pass any WHERE clause and arguments. */  
265 - public List<DBMomentItem> queryDeep(String where, String... selectionArg) {  
266 - Cursor cursor = db.rawQuery(getSelectDeep() + where, selectionArg);  
267 - return loadDeepAllAndCloseCursor(cursor);  
268 - }  
269 -  
270 -}  
core/database/src/main/java/com/cnlive/database/dao/DaoMaster.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.content.Context;  
4 -import android.database.sqlite.SQLiteDatabase;  
5 -import android.database.sqlite.SQLiteDatabase.CursorFactory;  
6 -import android.util.Log;  
7 -  
8 -import org.greenrobot.greendao.AbstractDaoMaster;  
9 -import org.greenrobot.greendao.database.StandardDatabase;  
10 -import org.greenrobot.greendao.database.Database;  
11 -import org.greenrobot.greendao.database.DatabaseOpenHelper;  
12 -import org.greenrobot.greendao.identityscope.IdentityScopeType;  
13 -  
14 -  
15 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
16 -/**  
17 - * Master of DAO (schema version 1): knows all DAOs.  
18 - */  
19 -public class DaoMaster extends AbstractDaoMaster {  
20 - public static final int SCHEMA_VERSION = 1;  
21 -  
22 - /** Creates underlying database table using DAOs. */  
23 - public static void createAllTables(Database db, boolean ifNotExists) {  
24 - AudioPlayHistoricalRecordDao.createTable(db, ifNotExists);  
25 - AudioPlayLastInfoDao.createTable(db, ifNotExists);  
26 - ChatFileMsgDao.createTable(db, ifNotExists);  
27 - ChatImageAndVideoMsgDao.createTable(db, ifNotExists);  
28 - ChatMediaDao.createTable(db, ifNotExists);  
29 - ContactListDao.createTable(db, ifNotExists);  
30 - ContanctDaRenEntityDao.createTable(db, ifNotExists);  
31 - ContanctGroupChatEntityDao.createTable(db, ifNotExists);  
32 - DBFriendCircleMessageDao.createTable(db, ifNotExists);  
33 - DarenDetailMsgDao.createTable(db, ifNotExists);  
34 - DarenListMsgDao.createTable(db, ifNotExists);  
35 - DownloadInfoDao.createTable(db, ifNotExists);  
36 - ExceptionInfoDao.createTable(db, ifNotExists);  
37 - HolidayThemeInfoDao.createTable(db, ifNotExists);  
38 - IMConversationInfoDao.createTable(db, ifNotExists);  
39 - IMGroupFaceMemberIdsDao.createTable(db, ifNotExists);  
40 - IMGroupMembersDao.createTable(db, ifNotExists);  
41 - IMGroupMembersListDao.createTable(db, ifNotExists);  
42 - IMGroupMembersManagerListDao.createTable(db, ifNotExists);  
43 - IMUserInfoDao.createTable(db, ifNotExists);  
44 - LaunchAdInfoDao.createTable(db, ifNotExists);  
45 - NewContactFriendEntityDao.createTable(db, ifNotExists);  
46 - NewPhoneContactEntityDao.createTable(db, ifNotExists);  
47 - NewsNumberDao.createTable(db, ifNotExists);  
48 - SearchContentDao.createTable(db, ifNotExists);  
49 - SearchHistoryDao.createTable(db, ifNotExists);  
50 - SysNumReadableDao.createTable(db, ifNotExists);  
51 - WitnessDao.createTable(db, ifNotExists);  
52 - DBMomentDetailDao.createTable(db, ifNotExists);  
53 - DBMomentItemDao.createTable(db, ifNotExists);  
54 - TestInfoDao.createTable(db, ifNotExists);  
55 - }  
56 -  
57 - /** Drops underlying database table using DAOs. */  
58 - public static void dropAllTables(Database db, boolean ifExists) {  
59 - AudioPlayHistoricalRecordDao.dropTable(db, ifExists);  
60 - AudioPlayLastInfoDao.dropTable(db, ifExists);  
61 - ChatFileMsgDao.dropTable(db, ifExists);  
62 - ChatImageAndVideoMsgDao.dropTable(db, ifExists);  
63 - ChatMediaDao.dropTable(db, ifExists);  
64 - ContactListDao.dropTable(db, ifExists);  
65 - ContanctDaRenEntityDao.dropTable(db, ifExists);  
66 - ContanctGroupChatEntityDao.dropTable(db, ifExists);  
67 - DBFriendCircleMessageDao.dropTable(db, ifExists);  
68 - DarenDetailMsgDao.dropTable(db, ifExists);  
69 - DarenListMsgDao.dropTable(db, ifExists);  
70 - DownloadInfoDao.dropTable(db, ifExists);  
71 - ExceptionInfoDao.dropTable(db, ifExists);  
72 - HolidayThemeInfoDao.dropTable(db, ifExists);  
73 - IMConversationInfoDao.dropTable(db, ifExists);  
74 - IMGroupFaceMemberIdsDao.dropTable(db, ifExists);  
75 - IMGroupMembersDao.dropTable(db, ifExists);  
76 - IMGroupMembersListDao.dropTable(db, ifExists);  
77 - IMGroupMembersManagerListDao.dropTable(db, ifExists);  
78 - IMUserInfoDao.dropTable(db, ifExists);  
79 - LaunchAdInfoDao.dropTable(db, ifExists);  
80 - NewContactFriendEntityDao.dropTable(db, ifExists);  
81 - NewPhoneContactEntityDao.dropTable(db, ifExists);  
82 - NewsNumberDao.dropTable(db, ifExists);  
83 - SearchContentDao.dropTable(db, ifExists);  
84 - SearchHistoryDao.dropTable(db, ifExists);  
85 - SysNumReadableDao.dropTable(db, ifExists);  
86 - WitnessDao.dropTable(db, ifExists);  
87 - DBMomentDetailDao.dropTable(db, ifExists);  
88 - DBMomentItemDao.dropTable(db, ifExists);  
89 - TestInfoDao.dropTable(db, ifExists);  
90 - }  
91 -  
92 - /**  
93 - * WARNING: Drops all table on Upgrade! Use only during development.  
94 - * Convenience method using a {@link DevOpenHelper}.  
95 - */  
96 - public static DaoSession newDevSession(Context context, String name) {  
97 - Database db = new DevOpenHelper(context, name).getWritableDb();  
98 - DaoMaster daoMaster = new DaoMaster(db);  
99 - return daoMaster.newSession();  
100 - }  
101 -  
102 - public DaoMaster(SQLiteDatabase db) {  
103 - this(new StandardDatabase(db));  
104 - }  
105 -  
106 - public DaoMaster(Database db) {  
107 - super(db, SCHEMA_VERSION);  
108 - registerDaoClass(AudioPlayHistoricalRecordDao.class);  
109 - registerDaoClass(AudioPlayLastInfoDao.class);  
110 - registerDaoClass(ChatFileMsgDao.class);  
111 - registerDaoClass(ChatImageAndVideoMsgDao.class);  
112 - registerDaoClass(ChatMediaDao.class);  
113 - registerDaoClass(ContactListDao.class);  
114 - registerDaoClass(ContanctDaRenEntityDao.class);  
115 - registerDaoClass(ContanctGroupChatEntityDao.class);  
116 - registerDaoClass(DBFriendCircleMessageDao.class);  
117 - registerDaoClass(DarenDetailMsgDao.class);  
118 - registerDaoClass(DarenListMsgDao.class);  
119 - registerDaoClass(DownloadInfoDao.class);  
120 - registerDaoClass(ExceptionInfoDao.class);  
121 - registerDaoClass(HolidayThemeInfoDao.class);  
122 - registerDaoClass(IMConversationInfoDao.class);  
123 - registerDaoClass(IMGroupFaceMemberIdsDao.class);  
124 - registerDaoClass(IMGroupMembersDao.class);  
125 - registerDaoClass(IMGroupMembersListDao.class);  
126 - registerDaoClass(IMGroupMembersManagerListDao.class);  
127 - registerDaoClass(IMUserInfoDao.class);  
128 - registerDaoClass(LaunchAdInfoDao.class);  
129 - registerDaoClass(NewContactFriendEntityDao.class);  
130 - registerDaoClass(NewPhoneContactEntityDao.class);  
131 - registerDaoClass(NewsNumberDao.class);  
132 - registerDaoClass(SearchContentDao.class);  
133 - registerDaoClass(SearchHistoryDao.class);  
134 - registerDaoClass(SysNumReadableDao.class);  
135 - registerDaoClass(WitnessDao.class);  
136 - registerDaoClass(DBMomentDetailDao.class);  
137 - registerDaoClass(DBMomentItemDao.class);  
138 - registerDaoClass(TestInfoDao.class);  
139 - }  
140 -  
141 - public DaoSession newSession() {  
142 - return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);  
143 - }  
144 -  
145 - public DaoSession newSession(IdentityScopeType type) {  
146 - return new DaoSession(db, type, daoConfigMap);  
147 - }  
148 -  
149 - /**  
150 - * Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -  
151 - */  
152 - public static abstract class OpenHelper extends DatabaseOpenHelper {  
153 - public OpenHelper(Context context, String name) {  
154 - super(context, name, SCHEMA_VERSION);  
155 - }  
156 -  
157 - public OpenHelper(Context context, String name, CursorFactory factory) {  
158 - super(context, name, factory, SCHEMA_VERSION);  
159 - }  
160 -  
161 - @Override  
162 - public void onCreate(Database db) {  
163 - Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION);  
164 - createAllTables(db, false);  
165 - }  
166 - }  
167 -  
168 - /** WARNING: Drops all table on Upgrade! Use only during development. */  
169 - public static class DevOpenHelper extends OpenHelper {  
170 - public DevOpenHelper(Context context, String name) {  
171 - super(context, name);  
172 - }  
173 -  
174 - public DevOpenHelper(Context context, String name, CursorFactory factory) {  
175 - super(context, name, factory);  
176 - }  
177 -  
178 - @Override  
179 - public void onUpgrade(Database db, int oldVersion, int newVersion) {  
180 - Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables");  
181 - dropAllTables(db, true);  
182 - onCreate(db);  
183 - }  
184 - }  
185 -  
186 -}  
core/database/src/main/java/com/cnlive/database/dao/DaoSession.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import java.util.Map;  
4 -  
5 -import org.greenrobot.greendao.AbstractDao;  
6 -import org.greenrobot.greendao.AbstractDaoSession;  
7 -import org.greenrobot.greendao.database.Database;  
8 -import org.greenrobot.greendao.identityscope.IdentityScopeType;  
9 -import org.greenrobot.greendao.internal.DaoConfig;  
10 -  
11 -import com.cnlive.database.bean.AudioPlayHistoricalRecord;  
12 -import com.cnlive.database.bean.AudioPlayLastInfo;  
13 -import com.cnlive.database.bean.ChatFileMsg;  
14 -import com.cnlive.database.bean.ChatImageAndVideoMsg;  
15 -import com.cnlive.database.bean.ChatMedia;  
16 -import com.cnlive.database.bean.ContactList;  
17 -import com.cnlive.database.bean.ContanctDaRenEntity;  
18 -import com.cnlive.database.bean.ContanctGroupChatEntity;  
19 -import com.cnlive.database.bean.DBFriendCircleMessage;  
20 -import com.cnlive.database.bean.DarenDetailMsg;  
21 -import com.cnlive.database.bean.DarenListMsg;  
22 -import com.cnlive.database.bean.DownloadInfo;  
23 -import com.cnlive.database.bean.ExceptionInfo;  
24 -import com.cnlive.database.bean.HolidayThemeInfo;  
25 -import com.cnlive.database.bean.IMConversationInfo;  
26 -import com.cnlive.database.bean.IMGroupFaceMemberIds;  
27 -import com.cnlive.database.bean.IMGroupMembers;  
28 -import com.cnlive.database.bean.IMGroupMembersList;  
29 -import com.cnlive.database.bean.IMGroupMembersManagerList;  
30 -import com.cnlive.database.bean.IMUserInfo;  
31 -import com.cnlive.database.bean.LaunchAdInfo;  
32 -import com.cnlive.database.bean.NewContactFriendEntity;  
33 -import com.cnlive.database.bean.NewPhoneContactEntity;  
34 -import com.cnlive.database.bean.NewsNumber;  
35 -import com.cnlive.database.bean.SearchContent;  
36 -import com.cnlive.database.bean.SearchHistory;  
37 -import com.cnlive.database.bean.SysNumReadable;  
38 -import com.cnlive.database.bean.Witness;  
39 -import com.cnlive.database.bean.DBMomentDetail;  
40 -import com.cnlive.database.bean.DBMomentItem;  
41 -  
42 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
43 -  
44 -/**  
45 - * {@inheritDoc}  
46 - *  
47 - * @see org.greenrobot.greendao.AbstractDaoSession  
48 - */  
49 -public class DaoSession extends AbstractDaoSession {  
50 -  
51 - private final DaoConfig audioPlayHistoricalRecordDaoConfig;  
52 - private final DaoConfig audioPlayLastInfoDaoConfig;  
53 - private final DaoConfig chatFileMsgDaoConfig;  
54 - private final DaoConfig chatImageAndVideoMsgDaoConfig;  
55 - private final DaoConfig chatMediaDaoConfig;  
56 - private final DaoConfig contactListDaoConfig;  
57 - private final DaoConfig contanctDaRenEntityDaoConfig;  
58 - private final DaoConfig contanctGroupChatEntityDaoConfig;  
59 - private final DaoConfig dBFriendCircleMessageDaoConfig;  
60 - private final DaoConfig darenDetailMsgDaoConfig;  
61 - private final DaoConfig darenListMsgDaoConfig;  
62 - private final DaoConfig downloadInfoDaoConfig;  
63 - private final DaoConfig exceptionInfoDaoConfig;  
64 - private final DaoConfig holidayThemeInfoDaoConfig;  
65 - private final DaoConfig iMConversationInfoDaoConfig;  
66 - private final DaoConfig iMGroupFaceMemberIdsDaoConfig;  
67 - private final DaoConfig iMGroupMembersDaoConfig;  
68 - private final DaoConfig iMGroupMembersListDaoConfig;  
69 - private final DaoConfig iMGroupMembersManagerListDaoConfig;  
70 - private final DaoConfig iMUserInfoDaoConfig;  
71 - private final DaoConfig launchAdInfoDaoConfig;  
72 - private final DaoConfig newContactFriendEntityDaoConfig;  
73 - private final DaoConfig newPhoneContactEntityDaoConfig;  
74 - private final DaoConfig newsNumberDaoConfig;  
75 - private final DaoConfig searchContentDaoConfig;  
76 - private final DaoConfig searchHistoryDaoConfig;  
77 - private final DaoConfig sysNumReadableDaoConfig;  
78 - private final DaoConfig witnessDaoConfig;  
79 - private final DaoConfig dBMomentDetailDaoConfig;  
80 - private final DaoConfig dBMomentItemDaoConfig;  
81 - private final DaoConfig testInfoDaoConfig;  
82 -  
83 - private final AudioPlayHistoricalRecordDao audioPlayHistoricalRecordDao;  
84 - private final AudioPlayLastInfoDao audioPlayLastInfoDao;  
85 - private final ChatFileMsgDao chatFileMsgDao;  
86 - private final ChatImageAndVideoMsgDao chatImageAndVideoMsgDao;  
87 - private final ChatMediaDao chatMediaDao;  
88 - private final ContactListDao contactListDao;  
89 - private final ContanctDaRenEntityDao contanctDaRenEntityDao;  
90 - private final ContanctGroupChatEntityDao contanctGroupChatEntityDao;  
91 - private final DBFriendCircleMessageDao dBFriendCircleMessageDao;  
92 - private final DarenDetailMsgDao darenDetailMsgDao;  
93 - private final DarenListMsgDao darenListMsgDao;  
94 - private final DownloadInfoDao downloadInfoDao;  
95 - private final ExceptionInfoDao exceptionInfoDao;  
96 - private final HolidayThemeInfoDao holidayThemeInfoDao;  
97 - private final IMConversationInfoDao iMConversationInfoDao;  
98 - private final IMGroupFaceMemberIdsDao iMGroupFaceMemberIdsDao;  
99 - private final IMGroupMembersDao iMGroupMembersDao;  
100 - private final IMGroupMembersListDao iMGroupMembersListDao;  
101 - private final IMGroupMembersManagerListDao iMGroupMembersManagerListDao;  
102 - private final IMUserInfoDao iMUserInfoDao;  
103 - private final LaunchAdInfoDao launchAdInfoDao;  
104 - private final NewContactFriendEntityDao newContactFriendEntityDao;  
105 - private final NewPhoneContactEntityDao newPhoneContactEntityDao;  
106 - private final NewsNumberDao newsNumberDao;  
107 - private final SearchContentDao searchContentDao;  
108 - private final SearchHistoryDao searchHistoryDao;  
109 - private final SysNumReadableDao sysNumReadableDao;  
110 - private final WitnessDao witnessDao;  
111 - private final DBMomentDetailDao dBMomentDetailDao;  
112 - private final DBMomentItemDao dBMomentItemDao;  
113 - private final TestInfoDao testInfoDao;  
114 -  
115 - public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>  
116 - daoConfigMap) {  
117 - super(db);  
118 -  
119 - audioPlayHistoricalRecordDaoConfig = daoConfigMap.get(AudioPlayHistoricalRecordDao.class).clone();  
120 - audioPlayHistoricalRecordDaoConfig.initIdentityScope(type);  
121 -  
122 - audioPlayLastInfoDaoConfig = daoConfigMap.get(AudioPlayLastInfoDao.class).clone();  
123 - audioPlayLastInfoDaoConfig.initIdentityScope(type);  
124 -  
125 - chatFileMsgDaoConfig = daoConfigMap.get(ChatFileMsgDao.class).clone();  
126 - chatFileMsgDaoConfig.initIdentityScope(type);  
127 -  
128 - chatImageAndVideoMsgDaoConfig = daoConfigMap.get(ChatImageAndVideoMsgDao.class).clone();  
129 - chatImageAndVideoMsgDaoConfig.initIdentityScope(type);  
130 -  
131 - chatMediaDaoConfig = daoConfigMap.get(ChatMediaDao.class).clone();  
132 - chatMediaDaoConfig.initIdentityScope(type);  
133 -  
134 - contactListDaoConfig = daoConfigMap.get(ContactListDao.class).clone();  
135 - contactListDaoConfig.initIdentityScope(type);  
136 -  
137 - contanctDaRenEntityDaoConfig = daoConfigMap.get(ContanctDaRenEntityDao.class).clone();  
138 - contanctDaRenEntityDaoConfig.initIdentityScope(type);  
139 -  
140 - contanctGroupChatEntityDaoConfig = daoConfigMap.get(ContanctGroupChatEntityDao.class).clone();  
141 - contanctGroupChatEntityDaoConfig.initIdentityScope(type);  
142 -  
143 - dBFriendCircleMessageDaoConfig = daoConfigMap.get(DBFriendCircleMessageDao.class).clone();  
144 - dBFriendCircleMessageDaoConfig.initIdentityScope(type);  
145 -  
146 - darenDetailMsgDaoConfig = daoConfigMap.get(DarenDetailMsgDao.class).clone();  
147 - darenDetailMsgDaoConfig.initIdentityScope(type);  
148 -  
149 - darenListMsgDaoConfig = daoConfigMap.get(DarenListMsgDao.class).clone();  
150 - darenListMsgDaoConfig.initIdentityScope(type);  
151 -  
152 - downloadInfoDaoConfig = daoConfigMap.get(DownloadInfoDao.class).clone();  
153 - downloadInfoDaoConfig.initIdentityScope(type);  
154 -  
155 - exceptionInfoDaoConfig = daoConfigMap.get(ExceptionInfoDao.class).clone();  
156 - exceptionInfoDaoConfig.initIdentityScope(type);  
157 -  
158 - holidayThemeInfoDaoConfig = daoConfigMap.get(HolidayThemeInfoDao.class).clone();  
159 - holidayThemeInfoDaoConfig.initIdentityScope(type);  
160 -  
161 - iMConversationInfoDaoConfig = daoConfigMap.get(IMConversationInfoDao.class).clone();  
162 - iMConversationInfoDaoConfig.initIdentityScope(type);  
163 -  
164 - iMGroupFaceMemberIdsDaoConfig = daoConfigMap.get(IMGroupFaceMemberIdsDao.class).clone();  
165 - iMGroupFaceMemberIdsDaoConfig.initIdentityScope(type);  
166 -  
167 - iMGroupMembersDaoConfig = daoConfigMap.get(IMGroupMembersDao.class).clone();  
168 - iMGroupMembersDaoConfig.initIdentityScope(type);  
169 -  
170 - iMGroupMembersListDaoConfig = daoConfigMap.get(IMGroupMembersListDao.class).clone();  
171 - iMGroupMembersListDaoConfig.initIdentityScope(type);  
172 -  
173 - iMGroupMembersManagerListDaoConfig = daoConfigMap.get(IMGroupMembersManagerListDao.class).clone();  
174 - iMGroupMembersManagerListDaoConfig.initIdentityScope(type);  
175 -  
176 - iMUserInfoDaoConfig = daoConfigMap.get(IMUserInfoDao.class).clone();  
177 - iMUserInfoDaoConfig.initIdentityScope(type);  
178 -  
179 - launchAdInfoDaoConfig = daoConfigMap.get(LaunchAdInfoDao.class).clone();  
180 - launchAdInfoDaoConfig.initIdentityScope(type);  
181 -  
182 - newContactFriendEntityDaoConfig = daoConfigMap.get(NewContactFriendEntityDao.class).clone();  
183 - newContactFriendEntityDaoConfig.initIdentityScope(type);  
184 -  
185 - newPhoneContactEntityDaoConfig = daoConfigMap.get(NewPhoneContactEntityDao.class).clone();  
186 - newPhoneContactEntityDaoConfig.initIdentityScope(type);  
187 -  
188 - newsNumberDaoConfig = daoConfigMap.get(NewsNumberDao.class).clone();  
189 - newsNumberDaoConfig.initIdentityScope(type);  
190 -  
191 - searchContentDaoConfig = daoConfigMap.get(SearchContentDao.class).clone();  
192 - searchContentDaoConfig.initIdentityScope(type);  
193 -  
194 - searchHistoryDaoConfig = daoConfigMap.get(SearchHistoryDao.class).clone();  
195 - searchHistoryDaoConfig.initIdentityScope(type);  
196 -  
197 - sysNumReadableDaoConfig = daoConfigMap.get(SysNumReadableDao.class).clone();  
198 - sysNumReadableDaoConfig.initIdentityScope(type);  
199 -  
200 - witnessDaoConfig = daoConfigMap.get(WitnessDao.class).clone();  
201 - witnessDaoConfig.initIdentityScope(type);  
202 -  
203 - dBMomentDetailDaoConfig = daoConfigMap.get(DBMomentDetailDao.class).clone();  
204 - dBMomentDetailDaoConfig.initIdentityScope(type);  
205 -  
206 - dBMomentItemDaoConfig = daoConfigMap.get(DBMomentItemDao.class).clone();  
207 - dBMomentItemDaoConfig.initIdentityScope(type);  
208 -  
209 - testInfoDaoConfig = daoConfigMap.get(TestInfoDao.class).clone();  
210 - testInfoDaoConfig.initIdentityScope(type);  
211 -  
212 - audioPlayHistoricalRecordDao = new AudioPlayHistoricalRecordDao(audioPlayHistoricalRecordDaoConfig, this);  
213 - audioPlayLastInfoDao = new AudioPlayLastInfoDao(audioPlayLastInfoDaoConfig, this);  
214 - chatFileMsgDao = new ChatFileMsgDao(chatFileMsgDaoConfig, this);  
215 - chatImageAndVideoMsgDao = new ChatImageAndVideoMsgDao(chatImageAndVideoMsgDaoConfig, this);  
216 - chatMediaDao = new ChatMediaDao(chatMediaDaoConfig, this);  
217 - contactListDao = new ContactListDao(contactListDaoConfig, this);  
218 - contanctDaRenEntityDao = new ContanctDaRenEntityDao(contanctDaRenEntityDaoConfig, this);  
219 - contanctGroupChatEntityDao = new ContanctGroupChatEntityDao(contanctGroupChatEntityDaoConfig, this);  
220 - dBFriendCircleMessageDao = new DBFriendCircleMessageDao(dBFriendCircleMessageDaoConfig, this);  
221 - darenDetailMsgDao = new DarenDetailMsgDao(darenDetailMsgDaoConfig, this);  
222 - darenListMsgDao = new DarenListMsgDao(darenListMsgDaoConfig, this);  
223 - downloadInfoDao = new DownloadInfoDao(downloadInfoDaoConfig, this);  
224 - exceptionInfoDao = new ExceptionInfoDao(exceptionInfoDaoConfig, this);  
225 - holidayThemeInfoDao = new HolidayThemeInfoDao(holidayThemeInfoDaoConfig, this);  
226 - iMConversationInfoDao = new IMConversationInfoDao(iMConversationInfoDaoConfig, this);  
227 - iMGroupFaceMemberIdsDao = new IMGroupFaceMemberIdsDao(iMGroupFaceMemberIdsDaoConfig, this);  
228 - iMGroupMembersDao = new IMGroupMembersDao(iMGroupMembersDaoConfig, this);  
229 - iMGroupMembersListDao = new IMGroupMembersListDao(iMGroupMembersListDaoConfig, this);  
230 - iMGroupMembersManagerListDao = new IMGroupMembersManagerListDao(iMGroupMembersManagerListDaoConfig, this);  
231 - iMUserInfoDao = new IMUserInfoDao(iMUserInfoDaoConfig, this);  
232 - launchAdInfoDao = new LaunchAdInfoDao(launchAdInfoDaoConfig, this);  
233 - newContactFriendEntityDao = new NewContactFriendEntityDao(newContactFriendEntityDaoConfig, this);  
234 - newPhoneContactEntityDao = new NewPhoneContactEntityDao(newPhoneContactEntityDaoConfig, this);  
235 - newsNumberDao = new NewsNumberDao(newsNumberDaoConfig, this);  
236 - searchContentDao = new SearchContentDao(searchContentDaoConfig, this);  
237 - searchHistoryDao = new SearchHistoryDao(searchHistoryDaoConfig, this);  
238 - sysNumReadableDao = new SysNumReadableDao(sysNumReadableDaoConfig, this);  
239 - witnessDao = new WitnessDao(witnessDaoConfig, this);  
240 - dBMomentDetailDao = new DBMomentDetailDao(dBMomentDetailDaoConfig, this);  
241 - dBMomentItemDao = new DBMomentItemDao(dBMomentItemDaoConfig, this);  
242 - testInfoDao = new TestInfoDao(testInfoDaoConfig, this);  
243 -  
244 - registerDao(AudioPlayHistoricalRecord.class, audioPlayHistoricalRecordDao);  
245 - registerDao(AudioPlayLastInfo.class, audioPlayLastInfoDao);  
246 - registerDao(ChatFileMsg.class, chatFileMsgDao);  
247 - registerDao(ChatImageAndVideoMsg.class, chatImageAndVideoMsgDao);  
248 - registerDao(ChatMedia.class, chatMediaDao);  
249 - registerDao(ContactList.class, contactListDao);  
250 - registerDao(ContanctDaRenEntity.class, contanctDaRenEntityDao);  
251 - registerDao(ContanctGroupChatEntity.class, contanctGroupChatEntityDao);  
252 - registerDao(DBFriendCircleMessage.class, dBFriendCircleMessageDao);  
253 - registerDao(DarenDetailMsg.class, darenDetailMsgDao);  
254 - registerDao(DarenListMsg.class, darenListMsgDao);  
255 - registerDao(DownloadInfo.class, downloadInfoDao);  
256 - registerDao(ExceptionInfo.class, exceptionInfoDao);  
257 - registerDao(HolidayThemeInfo.class, holidayThemeInfoDao);  
258 - registerDao(IMConversationInfo.class, iMConversationInfoDao);  
259 - registerDao(IMGroupFaceMemberIds.class, iMGroupFaceMemberIdsDao);  
260 - registerDao(IMGroupMembers.class, iMGroupMembersDao);  
261 - registerDao(IMGroupMembersList.class, iMGroupMembersListDao);  
262 - registerDao(IMGroupMembersManagerList.class, iMGroupMembersManagerListDao);  
263 - registerDao(IMUserInfo.class, iMUserInfoDao);  
264 - registerDao(LaunchAdInfo.class, launchAdInfoDao);  
265 - registerDao(NewContactFriendEntity.class, newContactFriendEntityDao);  
266 - registerDao(NewPhoneContactEntity.class, newPhoneContactEntityDao);  
267 - registerDao(NewsNumber.class, newsNumberDao);  
268 - registerDao(SearchContent.class, searchContentDao);  
269 - registerDao(SearchHistory.class, searchHistoryDao);  
270 - registerDao(SysNumReadable.class, sysNumReadableDao);  
271 - registerDao(Witness.class, witnessDao);  
272 - registerDao(DBMomentDetail.class, dBMomentDetailDao);  
273 - registerDao(DBMomentItem.class, dBMomentItemDao);  
274 - registerDao(TestInfo.class, testInfoDao);  
275 - }  
276 -  
277 - public void clear() {  
278 - audioPlayHistoricalRecordDaoConfig.clearIdentityScope();  
279 - audioPlayLastInfoDaoConfig.clearIdentityScope();  
280 - chatFileMsgDaoConfig.clearIdentityScope();  
281 - chatImageAndVideoMsgDaoConfig.clearIdentityScope();  
282 - chatMediaDaoConfig.clearIdentityScope();  
283 - contactListDaoConfig.clearIdentityScope();  
284 - contanctDaRenEntityDaoConfig.clearIdentityScope();  
285 - contanctGroupChatEntityDaoConfig.clearIdentityScope();  
286 - dBFriendCircleMessageDaoConfig.clearIdentityScope();  
287 - darenDetailMsgDaoConfig.clearIdentityScope();  
288 - darenListMsgDaoConfig.clearIdentityScope();  
289 - downloadInfoDaoConfig.clearIdentityScope();  
290 - exceptionInfoDaoConfig.clearIdentityScope();  
291 - holidayThemeInfoDaoConfig.clearIdentityScope();  
292 - iMConversationInfoDaoConfig.clearIdentityScope();  
293 - iMGroupFaceMemberIdsDaoConfig.clearIdentityScope();  
294 - iMGroupMembersDaoConfig.clearIdentityScope();  
295 - iMGroupMembersListDaoConfig.clearIdentityScope();  
296 - iMGroupMembersManagerListDaoConfig.clearIdentityScope();  
297 - iMUserInfoDaoConfig.clearIdentityScope();  
298 - launchAdInfoDaoConfig.clearIdentityScope();  
299 - newContactFriendEntityDaoConfig.clearIdentityScope();  
300 - newPhoneContactEntityDaoConfig.clearIdentityScope();  
301 - newsNumberDaoConfig.clearIdentityScope();  
302 - searchContentDaoConfig.clearIdentityScope();  
303 - searchHistoryDaoConfig.clearIdentityScope();  
304 - sysNumReadableDaoConfig.clearIdentityScope();  
305 - witnessDaoConfig.clearIdentityScope();  
306 - dBMomentDetailDaoConfig.clearIdentityScope();  
307 - dBMomentItemDaoConfig.clearIdentityScope();  
308 - testInfoDaoConfig.clearIdentityScope();  
309 - }  
310 -  
311 - public AudioPlayHistoricalRecordDao getAudioPlayHistoricalRecordDao() {  
312 - return audioPlayHistoricalRecordDao;  
313 - }  
314 -  
315 - public AudioPlayLastInfoDao getAudioPlayLastInfoDao() {  
316 - return audioPlayLastInfoDao;  
317 - }  
318 -  
319 - public ChatFileMsgDao getChatFileMsgDao() {  
320 - return chatFileMsgDao;  
321 - }  
322 -  
323 - public ChatImageAndVideoMsgDao getChatImageAndVideoMsgDao() {  
324 - return chatImageAndVideoMsgDao;  
325 - }  
326 -  
327 - public ChatMediaDao getChatMediaDao() {  
328 - return chatMediaDao;  
329 - }  
330 -  
331 - public ContactListDao getContactListDao() {  
332 - return contactListDao;  
333 - }  
334 -  
335 - public ContanctDaRenEntityDao getContanctDaRenEntityDao() {  
336 - return contanctDaRenEntityDao;  
337 - }  
338 -  
339 - public ContanctGroupChatEntityDao getContanctGroupChatEntityDao() {  
340 - return contanctGroupChatEntityDao;  
341 - }  
342 -  
343 - public DBFriendCircleMessageDao getDBFriendCircleMessageDao() {  
344 - return dBFriendCircleMessageDao;  
345 - }  
346 -  
347 - public DarenDetailMsgDao getDarenDetailMsgDao() {  
348 - return darenDetailMsgDao;  
349 - }  
350 -  
351 - public DarenListMsgDao getDarenListMsgDao() {  
352 - return darenListMsgDao;  
353 - }  
354 -  
355 - public DownloadInfoDao getDownloadInfoDao() {  
356 - return downloadInfoDao;  
357 - }  
358 -  
359 - public ExceptionInfoDao getExceptionInfoDao() {  
360 - return exceptionInfoDao;  
361 - }  
362 -  
363 - public HolidayThemeInfoDao getHolidayThemeInfoDao() {  
364 - return holidayThemeInfoDao;  
365 - }  
366 -  
367 - public IMConversationInfoDao getIMConversationInfoDao() {  
368 - return iMConversationInfoDao;  
369 - }  
370 -  
371 - public IMGroupFaceMemberIdsDao getIMGroupFaceMemberIdsDao() {  
372 - return iMGroupFaceMemberIdsDao;  
373 - }  
374 -  
375 - public IMGroupMembersDao getIMGroupMembersDao() {  
376 - return iMGroupMembersDao;  
377 - }  
378 -  
379 - public IMGroupMembersListDao getIMGroupMembersListDao() {  
380 - return iMGroupMembersListDao;  
381 - }  
382 -  
383 - public IMGroupMembersManagerListDao getIMGroupMembersManagerListDao() {  
384 - return iMGroupMembersManagerListDao;  
385 - }  
386 -  
387 - public IMUserInfoDao getIMUserInfoDao() {  
388 - return iMUserInfoDao;  
389 - }  
390 -  
391 - public LaunchAdInfoDao getLaunchAdInfoDao() {  
392 - return launchAdInfoDao;  
393 - }  
394 -  
395 - public NewContactFriendEntityDao getNewContactFriendEntityDao() {  
396 - return newContactFriendEntityDao;  
397 - }  
398 -  
399 - public NewPhoneContactEntityDao getNewPhoneContactEntityDao() {  
400 - return newPhoneContactEntityDao;  
401 - }  
402 -  
403 - public NewsNumberDao getNewsNumberDao() {  
404 - return newsNumberDao;  
405 - }  
406 -  
407 - public SearchContentDao getSearchContentDao() {  
408 - return searchContentDao;  
409 - }  
410 -  
411 - public SearchHistoryDao getSearchHistoryDao() {  
412 - return searchHistoryDao;  
413 - }  
414 -  
415 - public SysNumReadableDao getSysNumReadableDao() {  
416 - return sysNumReadableDao;  
417 - }  
418 -  
419 - public WitnessDao getWitnessDao() {  
420 - return witnessDao;  
421 - }  
422 -  
423 - public DBMomentDetailDao getDBMomentDetailDao() {  
424 - return dBMomentDetailDao;  
425 - }  
426 -  
427 - public DBMomentItemDao getDBMomentItemDao() {  
428 - return dBMomentItemDao;  
429 - }  
430 -  
431 - public TestInfoDao getTestInfoDao() {  
432 - return testInfoDao;  
433 - }  
434 -  
435 -}  
core/database/src/main/java/com/cnlive/database/dao/DarenDetailMsgDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.DarenDetailMsg;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "DAREN_DETAIL_MSG".  
17 -*/  
18 -public class DarenDetailMsgDao extends AbstractDao<DarenDetailMsg, String> {  
19 -  
20 - public static final String TABLENAME = "DAREN_DETAIL_MSG";  
21 -  
22 - /**  
23 - * Properties of entity DarenDetailMsg.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property DarenId = new Property(0, String.class, "darenId", true, "DAREN_ID");  
28 - public final static Property Image = new Property(1, String.class, "image", false, "IMAGE");  
29 - public final static Property CustSign = new Property(2, String.class, "custSign", false, "CUST_SIGN");  
30 - public final static Property FansNum = new Property(3, String.class, "fansNum", false, "FANS_NUM");  
31 - public final static Property Fan = new Property(4, Boolean.class, "fan", false, "FAN");  
32 - public final static Property Sid = new Property(5, String.class, "sid", false, "SID");  
33 - public final static Property Address = new Property(6, String.class, "address", false, "ADDRESS");  
34 - public final static Property ShopName = new Property(7, String.class, "shopName", false, "SHOP_NAME");  
35 - public final static Property Grade = new Property(8, Float.class, "grade", false, "GRADE");  
36 - public final static Property Online = new Property(9, Boolean.class, "online", false, "ONLINE");  
37 - public final static Property OrderCount = new Property(10, String.class, "orderCount", false, "ORDER_COUNT");  
38 - public final static Property CommentCount = new Property(11, String.class, "commentCount", false, "COMMENT_COUNT");  
39 - public final static Property Propagandas = new Property(12, String.class, "propagandas", false, "PROPAGANDAS");  
40 - public final static Property Content = new Property(13, String.class, "content", false, "CONTENT");  
41 - public final static Property Category = new Property(14, String.class, "category", false, "CATEGORY");  
42 - }  
43 -  
44 -  
45 - public DarenDetailMsgDao(DaoConfig config) {  
46 - super(config);  
47 - }  
48 -  
49 - public DarenDetailMsgDao(DaoConfig config, DaoSession daoSession) {  
50 - super(config, daoSession);  
51 - }  
52 -  
53 - /** Creates the underlying database table. */  
54 - public static void createTable(Database db, boolean ifNotExists) {  
55 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
56 - db.execSQL("CREATE TABLE " + constraint + "\"DAREN_DETAIL_MSG\" (" + //  
57 - "\"DAREN_ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: darenId  
58 - "\"IMAGE\" TEXT," + // 1: image  
59 - "\"CUST_SIGN\" TEXT," + // 2: custSign  
60 - "\"FANS_NUM\" TEXT," + // 3: fansNum  
61 - "\"FAN\" INTEGER," + // 4: fan  
62 - "\"SID\" TEXT," + // 5: sid  
63 - "\"ADDRESS\" TEXT," + // 6: address  
64 - "\"SHOP_NAME\" TEXT," + // 7: shopName  
65 - "\"GRADE\" REAL," + // 8: grade  
66 - "\"ONLINE\" INTEGER," + // 9: online  
67 - "\"ORDER_COUNT\" TEXT," + // 10: orderCount  
68 - "\"COMMENT_COUNT\" TEXT," + // 11: commentCount  
69 - "\"PROPAGANDAS\" TEXT," + // 12: propagandas  
70 - "\"CONTENT\" TEXT," + // 13: content  
71 - "\"CATEGORY\" TEXT);"); // 14: category  
72 - }  
73 -  
74 - /** Drops the underlying database table. */  
75 - public static void dropTable(Database db, boolean ifExists) {  
76 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DAREN_DETAIL_MSG\"";  
77 - db.execSQL(sql);  
78 - }  
79 -  
80 - @Override  
81 - protected final void bindValues(DatabaseStatement stmt, DarenDetailMsg entity) {  
82 - stmt.clearBindings();  
83 -  
84 - String darenId = entity.getDarenId();  
85 - if (darenId != null) {  
86 - stmt.bindString(1, darenId);  
87 - }  
88 -  
89 - String image = entity.getImage();  
90 - if (image != null) {  
91 - stmt.bindString(2, image);  
92 - }  
93 -  
94 - String custSign = entity.getCustSign();  
95 - if (custSign != null) {  
96 - stmt.bindString(3, custSign);  
97 - }  
98 -  
99 - String fansNum = entity.getFansNum();  
100 - if (fansNum != null) {  
101 - stmt.bindString(4, fansNum);  
102 - }  
103 -  
104 - Boolean fan = entity.getFan();  
105 - if (fan != null) {  
106 - stmt.bindLong(5, fan ? 1L: 0L);  
107 - }  
108 -  
109 - String sid = entity.getSid();  
110 - if (sid != null) {  
111 - stmt.bindString(6, sid);  
112 - }  
113 -  
114 - String address = entity.getAddress();  
115 - if (address != null) {  
116 - stmt.bindString(7, address);  
117 - }  
118 -  
119 - String shopName = entity.getShopName();  
120 - if (shopName != null) {  
121 - stmt.bindString(8, shopName);  
122 - }  
123 -  
124 - Float grade = entity.getGrade();  
125 - if (grade != null) {  
126 - stmt.bindDouble(9, grade);  
127 - }  
128 -  
129 - Boolean online = entity.getOnline();  
130 - if (online != null) {  
131 - stmt.bindLong(10, online ? 1L: 0L);  
132 - }  
133 -  
134 - String orderCount = entity.getOrderCount();  
135 - if (orderCount != null) {  
136 - stmt.bindString(11, orderCount);  
137 - }  
138 -  
139 - String commentCount = entity.getCommentCount();  
140 - if (commentCount != null) {  
141 - stmt.bindString(12, commentCount);  
142 - }  
143 -  
144 - String propagandas = entity.getPropagandas();  
145 - if (propagandas != null) {  
146 - stmt.bindString(13, propagandas);  
147 - }  
148 -  
149 - String content = entity.getContent();  
150 - if (content != null) {  
151 - stmt.bindString(14, content);  
152 - }  
153 -  
154 - String category = entity.getCategory();  
155 - if (category != null) {  
156 - stmt.bindString(15, category);  
157 - }  
158 - }  
159 -  
160 - @Override  
161 - protected final void bindValues(SQLiteStatement stmt, DarenDetailMsg entity) {  
162 - stmt.clearBindings();  
163 -  
164 - String darenId = entity.getDarenId();  
165 - if (darenId != null) {  
166 - stmt.bindString(1, darenId);  
167 - }  
168 -  
169 - String image = entity.getImage();  
170 - if (image != null) {  
171 - stmt.bindString(2, image);  
172 - }  
173 -  
174 - String custSign = entity.getCustSign();  
175 - if (custSign != null) {  
176 - stmt.bindString(3, custSign);  
177 - }  
178 -  
179 - String fansNum = entity.getFansNum();  
180 - if (fansNum != null) {  
181 - stmt.bindString(4, fansNum);  
182 - }  
183 -  
184 - Boolean fan = entity.getFan();  
185 - if (fan != null) {  
186 - stmt.bindLong(5, fan ? 1L: 0L);  
187 - }  
188 -  
189 - String sid = entity.getSid();  
190 - if (sid != null) {  
191 - stmt.bindString(6, sid);  
192 - }  
193 -  
194 - String address = entity.getAddress();  
195 - if (address != null) {  
196 - stmt.bindString(7, address);  
197 - }  
198 -  
199 - String shopName = entity.getShopName();  
200 - if (shopName != null) {  
201 - stmt.bindString(8, shopName);  
202 - }  
203 -  
204 - Float grade = entity.getGrade();  
205 - if (grade != null) {  
206 - stmt.bindDouble(9, grade);  
207 - }  
208 -  
209 - Boolean online = entity.getOnline();  
210 - if (online != null) {  
211 - stmt.bindLong(10, online ? 1L: 0L);  
212 - }  
213 -  
214 - String orderCount = entity.getOrderCount();  
215 - if (orderCount != null) {  
216 - stmt.bindString(11, orderCount);  
217 - }  
218 -  
219 - String commentCount = entity.getCommentCount();  
220 - if (commentCount != null) {  
221 - stmt.bindString(12, commentCount);  
222 - }  
223 -  
224 - String propagandas = entity.getPropagandas();  
225 - if (propagandas != null) {  
226 - stmt.bindString(13, propagandas);  
227 - }  
228 -  
229 - String content = entity.getContent();  
230 - if (content != null) {  
231 - stmt.bindString(14, content);  
232 - }  
233 -  
234 - String category = entity.getCategory();  
235 - if (category != null) {  
236 - stmt.bindString(15, category);  
237 - }  
238 - }  
239 -  
240 - @Override  
241 - public String readKey(Cursor cursor, int offset) {  
242 - return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);  
243 - }  
244 -  
245 - @Override  
246 - public DarenDetailMsg readEntity(Cursor cursor, int offset) {  
247 - DarenDetailMsg entity = new DarenDetailMsg( //  
248 - cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // darenId  
249 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // image  
250 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // custSign  
251 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // fansNum  
252 - cursor.isNull(offset + 4) ? null : cursor.getShort(offset + 4) != 0, // fan  
253 - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // sid  
254 - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // address  
255 - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // shopName  
256 - cursor.isNull(offset + 8) ? null : cursor.getFloat(offset + 8), // grade  
257 - cursor.isNull(offset + 9) ? null : cursor.getShort(offset + 9) != 0, // online  
258 - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // orderCount  
259 - cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // commentCount  
260 - cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // propagandas  
261 - cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // content  
262 - cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14) // category  
263 - );  
264 - return entity;  
265 - }  
266 -  
267 - @Override  
268 - public void readEntity(Cursor cursor, DarenDetailMsg entity, int offset) {  
269 - entity.setDarenId(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));  
270 - entity.setImage(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
271 - entity.setCustSign(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
272 - entity.setFansNum(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
273 - entity.setFan(cursor.isNull(offset + 4) ? null : cursor.getShort(offset + 4) != 0);  
274 - entity.setSid(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));  
275 - entity.setAddress(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));  
276 - entity.setShopName(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));  
277 - entity.setGrade(cursor.isNull(offset + 8) ? null : cursor.getFloat(offset + 8));  
278 - entity.setOnline(cursor.isNull(offset + 9) ? null : cursor.getShort(offset + 9) != 0);  
279 - entity.setOrderCount(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));  
280 - entity.setCommentCount(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));  
281 - entity.setPropagandas(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));  
282 - entity.setContent(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));  
283 - entity.setCategory(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));  
284 - }  
285 -  
286 - @Override  
287 - protected final String updateKeyAfterInsert(DarenDetailMsg entity, long rowId) {  
288 - return entity.getDarenId();  
289 - }  
290 -  
291 - @Override  
292 - public String getKey(DarenDetailMsg entity) {  
293 - if(entity != null) {  
294 - return entity.getDarenId();  
295 - } else {  
296 - return null;  
297 - }  
298 - }  
299 -  
300 - @Override  
301 - public boolean hasKey(DarenDetailMsg entity) {  
302 - return entity.getDarenId() != null;  
303 - }  
304 -  
305 - @Override  
306 - protected final boolean isEntityUpdateable() {  
307 - return true;  
308 - }  
309 -  
310 -}  
core/database/src/main/java/com/cnlive/database/dao/DarenListMsgDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.DarenListMsg;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "DAREN_LIST_MSG".  
17 -*/  
18 -public class DarenListMsgDao extends AbstractDao<DarenListMsg, String> {  
19 -  
20 - public static final String TABLENAME = "DAREN_LIST_MSG";  
21 -  
22 - /**  
23 - * Properties of entity DarenListMsg.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Sid = new Property(0, String.class, "sid", true, "SID");  
28 - public final static Property DarenList = new Property(1, String.class, "darenList", false, "DAREN_LIST");  
29 - }  
30 -  
31 -  
32 - public DarenListMsgDao(DaoConfig config) {  
33 - super(config);  
34 - }  
35 -  
36 - public DarenListMsgDao(DaoConfig config, DaoSession daoSession) {  
37 - super(config, daoSession);  
38 - }  
39 -  
40 - /** Creates the underlying database table. */  
41 - public static void createTable(Database db, boolean ifNotExists) {  
42 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
43 - db.execSQL("CREATE TABLE " + constraint + "\"DAREN_LIST_MSG\" (" + //  
44 - "\"SID\" TEXT PRIMARY KEY NOT NULL ," + // 0: sid  
45 - "\"DAREN_LIST\" TEXT);"); // 1: darenList  
46 - }  
47 -  
48 - /** Drops the underlying database table. */  
49 - public static void dropTable(Database db, boolean ifExists) {  
50 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DAREN_LIST_MSG\"";  
51 - db.execSQL(sql);  
52 - }  
53 -  
54 - @Override  
55 - protected final void bindValues(DatabaseStatement stmt, DarenListMsg entity) {  
56 - stmt.clearBindings();  
57 - stmt.bindString(1, entity.getSid());  
58 -  
59 - String darenList = entity.getDarenList();  
60 - if (darenList != null) {  
61 - stmt.bindString(2, darenList);  
62 - }  
63 - }  
64 -  
65 - @Override  
66 - protected final void bindValues(SQLiteStatement stmt, DarenListMsg entity) {  
67 - stmt.clearBindings();  
68 - stmt.bindString(1, entity.getSid());  
69 -  
70 - String darenList = entity.getDarenList();  
71 - if (darenList != null) {  
72 - stmt.bindString(2, darenList);  
73 - }  
74 - }  
75 -  
76 - @Override  
77 - public String readKey(Cursor cursor, int offset) {  
78 - return cursor.getString(offset + 0);  
79 - }  
80 -  
81 - @Override  
82 - public DarenListMsg readEntity(Cursor cursor, int offset) {  
83 - DarenListMsg entity = new DarenListMsg( //  
84 - cursor.getString(offset + 0), // sid  
85 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1) // darenList  
86 - );  
87 - return entity;  
88 - }  
89 -  
90 - @Override  
91 - public void readEntity(Cursor cursor, DarenListMsg entity, int offset) {  
92 - entity.setSid(cursor.getString(offset + 0));  
93 - entity.setDarenList(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
94 - }  
95 -  
96 - @Override  
97 - protected final String updateKeyAfterInsert(DarenListMsg entity, long rowId) {  
98 - return entity.getSid();  
99 - }  
100 -  
101 - @Override  
102 - public String getKey(DarenListMsg entity) {  
103 - if(entity != null) {  
104 - return entity.getSid();  
105 - } else {  
106 - return null;  
107 - }  
108 - }  
109 -  
110 - @Override  
111 - public boolean hasKey(DarenListMsg entity) {  
112 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
113 - }  
114 -  
115 - @Override  
116 - protected final boolean isEntityUpdateable() {  
117 - return true;  
118 - }  
119 -  
120 -}  
core/database/src/main/java/com/cnlive/database/dao/DownloadInfoDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.DownloadInfo;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "DOWNLOAD_INFO".  
17 -*/  
18 -public class DownloadInfoDao extends AbstractDao<DownloadInfo, String> {  
19 -  
20 - public static final String TABLENAME = "DOWNLOAD_INFO";  
21 -  
22 - /**  
23 - * Properties of entity DownloadInfo.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property UrlId = new Property(0, String.class, "urlId", true, "URL_ID");  
28 - public final static Property Url = new Property(1, String.class, "url", false, "URL");  
29 - public final static Property DownloadStatus = new Property(2, String.class, "downloadStatus", false, "DOWNLOAD_STATUS");  
30 - public final static Property FileName = new Property(3, String.class, "fileName", false, "FILE_NAME");  
31 - public final static Property Total = new Property(4, Long.class, "total", false, "TOTAL");  
32 - public final static Property Progress = new Property(5, Long.class, "progress", false, "PROGRESS");  
33 - public final static Property AlbumId = new Property(6, String.class, "albumId", false, "ALBUM_ID");  
34 - public final static Property ContentId = new Property(7, String.class, "contentId", false, "CONTENT_ID");  
35 - public final static Property CmccId = new Property(8, String.class, "cmccId", false, "CMCC_ID");  
36 - public final static Property ShareUrl = new Property(9, String.class, "shareUrl", false, "SHARE_URL");  
37 - public final static Property AlbumImg = new Property(10, String.class, "albumImg", false, "ALBUM_IMG");  
38 - public final static Property Actor = new Property(11, String.class, "actor", false, "ACTOR");  
39 - public final static Property AlbumName = new Property(12, String.class, "albumName", false, "ALBUM_NAME");  
40 - public final static Property Schedule = new Property(13, Double.class, "schedule", false, "SCHEDULE");  
41 - public final static Property ChannelName = new Property(14, String.class, "channelName", false, "CHANNEL_NAME");  
42 - public final static Property FileSize = new Property(15, String.class, "fileSize", false, "FILE_SIZE");  
43 - public final static Property Counts = new Property(16, Integer.class, "counts", false, "COUNTS");  
44 - }  
45 -  
46 -  
47 - public DownloadInfoDao(DaoConfig config) {  
48 - super(config);  
49 - }  
50 -  
51 - public DownloadInfoDao(DaoConfig config, DaoSession daoSession) {  
52 - super(config, daoSession);  
53 - }  
54 -  
55 - /** Creates the underlying database table. */  
56 - public static void createTable(Database db, boolean ifNotExists) {  
57 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
58 - db.execSQL("CREATE TABLE " + constraint + "\"DOWNLOAD_INFO\" (" + //  
59 - "\"URL_ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: urlId  
60 - "\"URL\" TEXT," + // 1: url  
61 - "\"DOWNLOAD_STATUS\" TEXT," + // 2: downloadStatus  
62 - "\"FILE_NAME\" TEXT," + // 3: fileName  
63 - "\"TOTAL\" INTEGER," + // 4: total  
64 - "\"PROGRESS\" INTEGER," + // 5: progress  
65 - "\"ALBUM_ID\" TEXT," + // 6: albumId  
66 - "\"CONTENT_ID\" TEXT," + // 7: contentId  
67 - "\"CMCC_ID\" TEXT," + // 8: cmccId  
68 - "\"SHARE_URL\" TEXT," + // 9: shareUrl  
69 - "\"ALBUM_IMG\" TEXT," + // 10: albumImg  
70 - "\"ACTOR\" TEXT," + // 11: actor  
71 - "\"ALBUM_NAME\" TEXT," + // 12: albumName  
72 - "\"SCHEDULE\" REAL," + // 13: schedule  
73 - "\"CHANNEL_NAME\" TEXT," + // 14: channelName  
74 - "\"FILE_SIZE\" TEXT," + // 15: fileSize  
75 - "\"COUNTS\" INTEGER);"); // 16: counts  
76 - }  
77 -  
78 - /** Drops the underlying database table. */  
79 - public static void dropTable(Database db, boolean ifExists) {  
80 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DOWNLOAD_INFO\"";  
81 - db.execSQL(sql);  
82 - }  
83 -  
84 - @Override  
85 - protected final void bindValues(DatabaseStatement stmt, DownloadInfo entity) {  
86 - stmt.clearBindings();  
87 - stmt.bindString(1, entity.getUrlId());  
88 -  
89 - String url = entity.getUrl();  
90 - if (url != null) {  
91 - stmt.bindString(2, url);  
92 - }  
93 -  
94 - String downloadStatus = entity.getDownloadStatus();  
95 - if (downloadStatus != null) {  
96 - stmt.bindString(3, downloadStatus);  
97 - }  
98 -  
99 - String fileName = entity.getFileName();  
100 - if (fileName != null) {  
101 - stmt.bindString(4, fileName);  
102 - }  
103 -  
104 - Long total = entity.getTotal();  
105 - if (total != null) {  
106 - stmt.bindLong(5, total);  
107 - }  
108 -  
109 - Long progress = entity.getProgress();  
110 - if (progress != null) {  
111 - stmt.bindLong(6, progress);  
112 - }  
113 -  
114 - String albumId = entity.getAlbumId();  
115 - if (albumId != null) {  
116 - stmt.bindString(7, albumId);  
117 - }  
118 -  
119 - String contentId = entity.getContentId();  
120 - if (contentId != null) {  
121 - stmt.bindString(8, contentId);  
122 - }  
123 -  
124 - String cmccId = entity.getCmccId();  
125 - if (cmccId != null) {  
126 - stmt.bindString(9, cmccId);  
127 - }  
128 -  
129 - String shareUrl = entity.getShareUrl();  
130 - if (shareUrl != null) {  
131 - stmt.bindString(10, shareUrl);  
132 - }  
133 -  
134 - String albumImg = entity.getAlbumImg();  
135 - if (albumImg != null) {  
136 - stmt.bindString(11, albumImg);  
137 - }  
138 -  
139 - String actor = entity.getActor();  
140 - if (actor != null) {  
141 - stmt.bindString(12, actor);  
142 - }  
143 -  
144 - String albumName = entity.getAlbumName();  
145 - if (albumName != null) {  
146 - stmt.bindString(13, albumName);  
147 - }  
148 -  
149 - Double schedule = entity.getSchedule();  
150 - if (schedule != null) {  
151 - stmt.bindDouble(14, schedule);  
152 - }  
153 -  
154 - String channelName = entity.getChannelName();  
155 - if (channelName != null) {  
156 - stmt.bindString(15, channelName);  
157 - }  
158 -  
159 - String fileSize = entity.getFileSize();  
160 - if (fileSize != null) {  
161 - stmt.bindString(16, fileSize);  
162 - }  
163 -  
164 - Integer counts = entity.getCounts();  
165 - if (counts != null) {  
166 - stmt.bindLong(17, counts);  
167 - }  
168 - }  
169 -  
170 - @Override  
171 - protected final void bindValues(SQLiteStatement stmt, DownloadInfo entity) {  
172 - stmt.clearBindings();  
173 - stmt.bindString(1, entity.getUrlId());  
174 -  
175 - String url = entity.getUrl();  
176 - if (url != null) {  
177 - stmt.bindString(2, url);  
178 - }  
179 -  
180 - String downloadStatus = entity.getDownloadStatus();  
181 - if (downloadStatus != null) {  
182 - stmt.bindString(3, downloadStatus);  
183 - }  
184 -  
185 - String fileName = entity.getFileName();  
186 - if (fileName != null) {  
187 - stmt.bindString(4, fileName);  
188 - }  
189 -  
190 - Long total = entity.getTotal();  
191 - if (total != null) {  
192 - stmt.bindLong(5, total);  
193 - }  
194 -  
195 - Long progress = entity.getProgress();  
196 - if (progress != null) {  
197 - stmt.bindLong(6, progress);  
198 - }  
199 -  
200 - String albumId = entity.getAlbumId();  
201 - if (albumId != null) {  
202 - stmt.bindString(7, albumId);  
203 - }  
204 -  
205 - String contentId = entity.getContentId();  
206 - if (contentId != null) {  
207 - stmt.bindString(8, contentId);  
208 - }  
209 -  
210 - String cmccId = entity.getCmccId();  
211 - if (cmccId != null) {  
212 - stmt.bindString(9, cmccId);  
213 - }  
214 -  
215 - String shareUrl = entity.getShareUrl();  
216 - if (shareUrl != null) {  
217 - stmt.bindString(10, shareUrl);  
218 - }  
219 -  
220 - String albumImg = entity.getAlbumImg();  
221 - if (albumImg != null) {  
222 - stmt.bindString(11, albumImg);  
223 - }  
224 -  
225 - String actor = entity.getActor();  
226 - if (actor != null) {  
227 - stmt.bindString(12, actor);  
228 - }  
229 -  
230 - String albumName = entity.getAlbumName();  
231 - if (albumName != null) {  
232 - stmt.bindString(13, albumName);  
233 - }  
234 -  
235 - Double schedule = entity.getSchedule();  
236 - if (schedule != null) {  
237 - stmt.bindDouble(14, schedule);  
238 - }  
239 -  
240 - String channelName = entity.getChannelName();  
241 - if (channelName != null) {  
242 - stmt.bindString(15, channelName);  
243 - }  
244 -  
245 - String fileSize = entity.getFileSize();  
246 - if (fileSize != null) {  
247 - stmt.bindString(16, fileSize);  
248 - }  
249 -  
250 - Integer counts = entity.getCounts();  
251 - if (counts != null) {  
252 - stmt.bindLong(17, counts);  
253 - }  
254 - }  
255 -  
256 - @Override  
257 - public String readKey(Cursor cursor, int offset) {  
258 - return cursor.getString(offset + 0);  
259 - }  
260 -  
261 - @Override  
262 - public DownloadInfo readEntity(Cursor cursor, int offset) {  
263 - DownloadInfo entity = new DownloadInfo( //  
264 - cursor.getString(offset + 0), // urlId  
265 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // url  
266 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // downloadStatus  
267 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // fileName  
268 - cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4), // total  
269 - cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5), // progress  
270 - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // albumId  
271 - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // contentId  
272 - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // cmccId  
273 - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // shareUrl  
274 - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // albumImg  
275 - cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // actor  
276 - cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // albumName  
277 - cursor.isNull(offset + 13) ? null : cursor.getDouble(offset + 13), // schedule  
278 - cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // channelName  
279 - cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // fileSize  
280 - cursor.isNull(offset + 16) ? null : cursor.getInt(offset + 16) // counts  
281 - );  
282 - return entity;  
283 - }  
284 -  
285 - @Override  
286 - public void readEntity(Cursor cursor, DownloadInfo entity, int offset) {  
287 - entity.setUrlId(cursor.getString(offset + 0));  
288 - entity.setUrl(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
289 - entity.setDownloadStatus(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
290 - entity.setFileName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
291 - entity.setTotal(cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4));  
292 - entity.setProgress(cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5));  
293 - entity.setAlbumId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));  
294 - entity.setContentId(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));  
295 - entity.setCmccId(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));  
296 - entity.setShareUrl(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));  
297 - entity.setAlbumImg(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));  
298 - entity.setActor(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));  
299 - entity.setAlbumName(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));  
300 - entity.setSchedule(cursor.isNull(offset + 13) ? null : cursor.getDouble(offset + 13));  
301 - entity.setChannelName(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));  
302 - entity.setFileSize(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));  
303 - entity.setCounts(cursor.isNull(offset + 16) ? null : cursor.getInt(offset + 16));  
304 - }  
305 -  
306 - @Override  
307 - protected final String updateKeyAfterInsert(DownloadInfo entity, long rowId) {  
308 - return entity.getUrlId();  
309 - }  
310 -  
311 - @Override  
312 - public String getKey(DownloadInfo entity) {  
313 - if(entity != null) {  
314 - return entity.getUrlId();  
315 - } else {  
316 - return null;  
317 - }  
318 - }  
319 -  
320 - @Override  
321 - public boolean hasKey(DownloadInfo entity) {  
322 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
323 - }  
324 -  
325 - @Override  
326 - protected final boolean isEntityUpdateable() {  
327 - return true;  
328 - }  
329 -  
330 -}  
core/database/src/main/java/com/cnlive/database/dao/ExceptionInfoDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.ExceptionInfo;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "EXCEPTION_INFO".  
17 -*/  
18 -public class ExceptionInfoDao extends AbstractDao<ExceptionInfo, Long> {  
19 -  
20 - public static final String TABLENAME = "EXCEPTION_INFO";  
21 -  
22 - /**  
23 - * Properties of entity ExceptionInfo.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Id = new Property(0, Long.class, "id", true, "_id");  
28 - public final static Property ErrorTag = new Property(1, String.class, "ErrorTag", false, "ERROR_TAG");  
29 - public final static Property ErrorMessage = new Property(2, String.class, "ErrorMessage", false, "ERROR_MESSAGE");  
30 - }  
31 -  
32 -  
33 - public ExceptionInfoDao(DaoConfig config) {  
34 - super(config);  
35 - }  
36 -  
37 - public ExceptionInfoDao(DaoConfig config, DaoSession daoSession) {  
38 - super(config, daoSession);  
39 - }  
40 -  
41 - /** Creates the underlying database table. */  
42 - public static void createTable(Database db, boolean ifNotExists) {  
43 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
44 - db.execSQL("CREATE TABLE " + constraint + "\"EXCEPTION_INFO\" (" + //  
45 - "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id  
46 - "\"ERROR_TAG\" TEXT NOT NULL ," + // 1: ErrorTag  
47 - "\"ERROR_MESSAGE\" TEXT NOT NULL );"); // 2: ErrorMessage  
48 - }  
49 -  
50 - /** Drops the underlying database table. */  
51 - public static void dropTable(Database db, boolean ifExists) {  
52 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"EXCEPTION_INFO\"";  
53 - db.execSQL(sql);  
54 - }  
55 -  
56 - @Override  
57 - protected final void bindValues(DatabaseStatement stmt, ExceptionInfo entity) {  
58 - stmt.clearBindings();  
59 -  
60 - Long id = entity.getId();  
61 - if (id != null) {  
62 - stmt.bindLong(1, id);  
63 - }  
64 - stmt.bindString(2, entity.getErrorTag());  
65 - stmt.bindString(3, entity.getErrorMessage());  
66 - }  
67 -  
68 - @Override  
69 - protected final void bindValues(SQLiteStatement stmt, ExceptionInfo entity) {  
70 - stmt.clearBindings();  
71 -  
72 - Long id = entity.getId();  
73 - if (id != null) {  
74 - stmt.bindLong(1, id);  
75 - }  
76 - stmt.bindString(2, entity.getErrorTag());  
77 - stmt.bindString(3, entity.getErrorMessage());  
78 - }  
79 -  
80 - @Override  
81 - public Long readKey(Cursor cursor, int offset) {  
82 - return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);  
83 - }  
84 -  
85 - @Override  
86 - public ExceptionInfo readEntity(Cursor cursor, int offset) {  
87 - ExceptionInfo entity = new ExceptionInfo( //  
88 - cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id  
89 - cursor.getString(offset + 1), // ErrorTag  
90 - cursor.getString(offset + 2) // ErrorMessage  
91 - );  
92 - return entity;  
93 - }  
94 -  
95 - @Override  
96 - public void readEntity(Cursor cursor, ExceptionInfo entity, int offset) {  
97 - entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));  
98 - entity.setErrorTag(cursor.getString(offset + 1));  
99 - entity.setErrorMessage(cursor.getString(offset + 2));  
100 - }  
101 -  
102 - @Override  
103 - protected final Long updateKeyAfterInsert(ExceptionInfo entity, long rowId) {  
104 - entity.setId(rowId);  
105 - return rowId;  
106 - }  
107 -  
108 - @Override  
109 - public Long getKey(ExceptionInfo entity) {  
110 - if(entity != null) {  
111 - return entity.getId();  
112 - } else {  
113 - return null;  
114 - }  
115 - }  
116 -  
117 - @Override  
118 - public boolean hasKey(ExceptionInfo entity) {  
119 - return entity.getId() != null;  
120 - }  
121 -  
122 - @Override  
123 - protected final boolean isEntityUpdateable() {  
124 - return true;  
125 - }  
126 -  
127 -}  
core/database/src/main/java/com/cnlive/database/dao/HolidayThemeInfoDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.HolidayThemeInfo;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "HOLIDAY_THEME_INFO".  
17 -*/  
18 -public class HolidayThemeInfoDao extends AbstractDao<HolidayThemeInfo, String> {  
19 -  
20 - public static final String TABLENAME = "HOLIDAY_THEME_INFO";  
21 -  
22 - /**  
23 - * Properties of entity HolidayThemeInfo.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property Appid = new Property(0, String.class, "appid", true, "APPID");  
28 - public final static Property ClickAfter = new Property(1, String.class, "clickAfter", false, "CLICK_AFTER");  
29 - public final static Property ClickBefore = new Property(2, String.class, "clickBefore", false, "CLICK_BEFORE");  
30 - public final static Property HolidayThemeId = new Property(3, String.class, "holidayThemeId", false, "HOLIDAY_THEME_ID");  
31 - public final static Property ImagePackage = new Property(4, String.class, "imagePackage", false, "IMAGE_PACKAGE");  
32 - public final static Property ShowSource = new Property(5, String.class, "showSource", false, "SHOW_SOURCE");  
33 - public final static Property IsShow = new Property(6, String.class, "isShow", false, "IS_SHOW");  
34 - public final static Property UpdateType = new Property(7, Integer.class, "updateType", false, "UPDATE_TYPE");  
35 - public final static Property IsDonwLoadSucess = new Property(8, Boolean.class, "isDonwLoadSucess", false, "IS_DONW_LOAD_SUCESS");  
36 - public final static Property SkinType = new Property(9, String.class, "skinType", false, "SKIN_TYPE");  
37 - }  
38 -  
39 -  
40 - public HolidayThemeInfoDao(DaoConfig config) {  
41 - super(config);  
42 - }  
43 -  
44 - public HolidayThemeInfoDao(DaoConfig config, DaoSession daoSession) {  
45 - super(config, daoSession);  
46 - }  
47 -  
48 - /** Creates the underlying database table. */  
49 - public static void createTable(Database db, boolean ifNotExists) {  
50 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
51 - db.execSQL("CREATE TABLE " + constraint + "\"HOLIDAY_THEME_INFO\" (" + //  
52 - "\"APPID\" TEXT PRIMARY KEY NOT NULL ," + // 0: appid  
53 - "\"CLICK_AFTER\" TEXT," + // 1: clickAfter  
54 - "\"CLICK_BEFORE\" TEXT," + // 2: clickBefore  
55 - "\"HOLIDAY_THEME_ID\" TEXT," + // 3: holidayThemeId  
56 - "\"IMAGE_PACKAGE\" TEXT," + // 4: imagePackage  
57 - "\"SHOW_SOURCE\" TEXT," + // 5: showSource  
58 - "\"IS_SHOW\" TEXT," + // 6: isShow  
59 - "\"UPDATE_TYPE\" INTEGER," + // 7: updateType  
60 - "\"IS_DONW_LOAD_SUCESS\" INTEGER," + // 8: isDonwLoadSucess  
61 - "\"SKIN_TYPE\" TEXT);"); // 9: skinType  
62 - }  
63 -  
64 - /** Drops the underlying database table. */  
65 - public static void dropTable(Database db, boolean ifExists) {  
66 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"HOLIDAY_THEME_INFO\"";  
67 - db.execSQL(sql);  
68 - }  
69 -  
70 - @Override  
71 - protected final void bindValues(DatabaseStatement stmt, HolidayThemeInfo entity) {  
72 - stmt.clearBindings();  
73 - stmt.bindString(1, entity.getAppid());  
74 -  
75 - String clickAfter = entity.getClickAfter();  
76 - if (clickAfter != null) {  
77 - stmt.bindString(2, clickAfter);  
78 - }  
79 -  
80 - String clickBefore = entity.getClickBefore();  
81 - if (clickBefore != null) {  
82 - stmt.bindString(3, clickBefore);  
83 - }  
84 -  
85 - String holidayThemeId = entity.getHolidayThemeId();  
86 - if (holidayThemeId != null) {  
87 - stmt.bindString(4, holidayThemeId);  
88 - }  
89 -  
90 - String imagePackage = entity.getImagePackage();  
91 - if (imagePackage != null) {  
92 - stmt.bindString(5, imagePackage);  
93 - }  
94 -  
95 - String showSource = entity.getShowSource();  
96 - if (showSource != null) {  
97 - stmt.bindString(6, showSource);  
98 - }  
99 -  
100 - String isShow = entity.getIsShow();  
101 - if (isShow != null) {  
102 - stmt.bindString(7, isShow);  
103 - }  
104 -  
105 - Integer updateType = entity.getUpdateType();  
106 - if (updateType != null) {  
107 - stmt.bindLong(8, updateType);  
108 - }  
109 -  
110 - Boolean isDonwLoadSucess = entity.getIsDonwLoadSucess();  
111 - if (isDonwLoadSucess != null) {  
112 - stmt.bindLong(9, isDonwLoadSucess ? 1L: 0L);  
113 - }  
114 -  
115 - String skinType = entity.getSkinType();  
116 - if (skinType != null) {  
117 - stmt.bindString(10, skinType);  
118 - }  
119 - }  
120 -  
121 - @Override  
122 - protected final void bindValues(SQLiteStatement stmt, HolidayThemeInfo entity) {  
123 - stmt.clearBindings();  
124 - stmt.bindString(1, entity.getAppid());  
125 -  
126 - String clickAfter = entity.getClickAfter();  
127 - if (clickAfter != null) {  
128 - stmt.bindString(2, clickAfter);  
129 - }  
130 -  
131 - String clickBefore = entity.getClickBefore();  
132 - if (clickBefore != null) {  
133 - stmt.bindString(3, clickBefore);  
134 - }  
135 -  
136 - String holidayThemeId = entity.getHolidayThemeId();  
137 - if (holidayThemeId != null) {  
138 - stmt.bindString(4, holidayThemeId);  
139 - }  
140 -  
141 - String imagePackage = entity.getImagePackage();  
142 - if (imagePackage != null) {  
143 - stmt.bindString(5, imagePackage);  
144 - }  
145 -  
146 - String showSource = entity.getShowSource();  
147 - if (showSource != null) {  
148 - stmt.bindString(6, showSource);  
149 - }  
150 -  
151 - String isShow = entity.getIsShow();  
152 - if (isShow != null) {  
153 - stmt.bindString(7, isShow);  
154 - }  
155 -  
156 - Integer updateType = entity.getUpdateType();  
157 - if (updateType != null) {  
158 - stmt.bindLong(8, updateType);  
159 - }  
160 -  
161 - Boolean isDonwLoadSucess = entity.getIsDonwLoadSucess();  
162 - if (isDonwLoadSucess != null) {  
163 - stmt.bindLong(9, isDonwLoadSucess ? 1L: 0L);  
164 - }  
165 -  
166 - String skinType = entity.getSkinType();  
167 - if (skinType != null) {  
168 - stmt.bindString(10, skinType);  
169 - }  
170 - }  
171 -  
172 - @Override  
173 - public String readKey(Cursor cursor, int offset) {  
174 - return cursor.getString(offset + 0);  
175 - }  
176 -  
177 - @Override  
178 - public HolidayThemeInfo readEntity(Cursor cursor, int offset) {  
179 - HolidayThemeInfo entity = new HolidayThemeInfo( //  
180 - cursor.getString(offset + 0), // appid  
181 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // clickAfter  
182 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // clickBefore  
183 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // holidayThemeId  
184 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // imagePackage  
185 - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // showSource  
186 - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isShow  
187 - cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7), // updateType  
188 - cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0, // isDonwLoadSucess  
189 - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // skinType  
190 - );  
191 - return entity;  
192 - }  
193 -  
194 - @Override  
195 - public void readEntity(Cursor cursor, HolidayThemeInfo entity, int offset) {  
196 - entity.setAppid(cursor.getString(offset + 0));  
197 - entity.setClickAfter(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
198 - entity.setClickBefore(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
199 - entity.setHolidayThemeId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
200 - entity.setImagePackage(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
201 - entity.setShowSource(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));  
202 - entity.setIsShow(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));  
203 - entity.setUpdateType(cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7));  
204 - entity.setIsDonwLoadSucess(cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0);  
205 - entity.setSkinType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));  
206 - }  
207 -  
208 - @Override  
209 - protected final String updateKeyAfterInsert(HolidayThemeInfo entity, long rowId) {  
210 - return entity.getAppid();  
211 - }  
212 -  
213 - @Override  
214 - public String getKey(HolidayThemeInfo entity) {  
215 - if(entity != null) {  
216 - return entity.getAppid();  
217 - } else {  
218 - return null;  
219 - }  
220 - }  
221 -  
222 - @Override  
223 - public boolean hasKey(HolidayThemeInfo entity) {  
224 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
225 - }  
226 -  
227 - @Override  
228 - protected final boolean isEntityUpdateable() {  
229 - return true;  
230 - }  
231 -  
232 -}  
core/database/src/main/java/com/cnlive/database/dao/IMConversationInfoDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.IMConversationInfo;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "IMCONVERSATION_INFO".  
17 -*/  
18 -public class IMConversationInfoDao extends AbstractDao<IMConversationInfo, String> {  
19 -  
20 - public static final String TABLENAME = "IMCONVERSATION_INFO";  
21 -  
22 - /**  
23 - * Properties of entity IMConversationInfo.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property ConversationId = new Property(0, String.class, "conversationId", true, "CONVERSATION_ID");  
28 - public final static Property ConversationType = new Property(1, String.class, "conversationType", false, "CONVERSATION_TYPE");  
29 - public final static Property Title = new Property(2, String.class, "title", false, "TITLE");  
30 - public final static Property Des = new Property(3, String.class, "des", false, "DES");  
31 - public final static Property FaceUrl = new Property(4, String.class, "faceUrl", false, "FACE_URL");  
32 - public final static Property ConversationFaceUrl = new Property(5, String.class, "conversationFaceUrl", false, "CONVERSATION_FACE_URL");  
33 - public final static Property TimeStep = new Property(6, Long.class, "timeStep", false, "TIME_STEP");  
34 - public final static Property UnreadCount = new Property(7, Long.class, "unreadCount", false, "UNREAD_COUNT");  
35 - }  
36 -  
37 -  
38 - public IMConversationInfoDao(DaoConfig config) {  
39 - super(config);  
40 - }  
41 -  
42 - public IMConversationInfoDao(DaoConfig config, DaoSession daoSession) {  
43 - super(config, daoSession);  
44 - }  
45 -  
46 - /** Creates the underlying database table. */  
47 - public static void createTable(Database db, boolean ifNotExists) {  
48 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
49 - db.execSQL("CREATE TABLE " + constraint + "\"IMCONVERSATION_INFO\" (" + //  
50 - "\"CONVERSATION_ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: conversationId  
51 - "\"CONVERSATION_TYPE\" TEXT," + // 1: conversationType  
52 - "\"TITLE\" TEXT," + // 2: title  
53 - "\"DES\" TEXT," + // 3: des  
54 - "\"FACE_URL\" TEXT," + // 4: faceUrl  
55 - "\"CONVERSATION_FACE_URL\" TEXT," + // 5: conversationFaceUrl  
56 - "\"TIME_STEP\" INTEGER," + // 6: timeStep  
57 - "\"UNREAD_COUNT\" INTEGER);"); // 7: unreadCount  
58 - }  
59 -  
60 - /** Drops the underlying database table. */  
61 - public static void dropTable(Database db, boolean ifExists) {  
62 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"IMCONVERSATION_INFO\"";  
63 - db.execSQL(sql);  
64 - }  
65 -  
66 - @Override  
67 - protected final void bindValues(DatabaseStatement stmt, IMConversationInfo entity) {  
68 - stmt.clearBindings();  
69 - stmt.bindString(1, entity.getConversationId());  
70 -  
71 - String conversationType = entity.getConversationType();  
72 - if (conversationType != null) {  
73 - stmt.bindString(2, conversationType);  
74 - }  
75 -  
76 - String title = entity.getTitle();  
77 - if (title != null) {  
78 - stmt.bindString(3, title);  
79 - }  
80 -  
81 - String des = entity.getDes();  
82 - if (des != null) {  
83 - stmt.bindString(4, des);  
84 - }  
85 -  
86 - String faceUrl = entity.getFaceUrl();  
87 - if (faceUrl != null) {  
88 - stmt.bindString(5, faceUrl);  
89 - }  
90 -  
91 - String conversationFaceUrl = entity.getConversationFaceUrl();  
92 - if (conversationFaceUrl != null) {  
93 - stmt.bindString(6, conversationFaceUrl);  
94 - }  
95 -  
96 - Long timeStep = entity.getTimeStep();  
97 - if (timeStep != null) {  
98 - stmt.bindLong(7, timeStep);  
99 - }  
100 -  
101 - Long unreadCount = entity.getUnreadCount();  
102 - if (unreadCount != null) {  
103 - stmt.bindLong(8, unreadCount);  
104 - }  
105 - }  
106 -  
107 - @Override  
108 - protected final void bindValues(SQLiteStatement stmt, IMConversationInfo entity) {  
109 - stmt.clearBindings();  
110 - stmt.bindString(1, entity.getConversationId());  
111 -  
112 - String conversationType = entity.getConversationType();  
113 - if (conversationType != null) {  
114 - stmt.bindString(2, conversationType);  
115 - }  
116 -  
117 - String title = entity.getTitle();  
118 - if (title != null) {  
119 - stmt.bindString(3, title);  
120 - }  
121 -  
122 - String des = entity.getDes();  
123 - if (des != null) {  
124 - stmt.bindString(4, des);  
125 - }  
126 -  
127 - String faceUrl = entity.getFaceUrl();  
128 - if (faceUrl != null) {  
129 - stmt.bindString(5, faceUrl);  
130 - }  
131 -  
132 - String conversationFaceUrl = entity.getConversationFaceUrl();  
133 - if (conversationFaceUrl != null) {  
134 - stmt.bindString(6, conversationFaceUrl);  
135 - }  
136 -  
137 - Long timeStep = entity.getTimeStep();  
138 - if (timeStep != null) {  
139 - stmt.bindLong(7, timeStep);  
140 - }  
141 -  
142 - Long unreadCount = entity.getUnreadCount();  
143 - if (unreadCount != null) {  
144 - stmt.bindLong(8, unreadCount);  
145 - }  
146 - }  
147 -  
148 - @Override  
149 - public String readKey(Cursor cursor, int offset) {  
150 - return cursor.getString(offset + 0);  
151 - }  
152 -  
153 - @Override  
154 - public IMConversationInfo readEntity(Cursor cursor, int offset) {  
155 - IMConversationInfo entity = new IMConversationInfo( //  
156 - cursor.getString(offset + 0), // conversationId  
157 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // conversationType  
158 - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // title  
159 - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // des  
160 - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // faceUrl  
161 - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // conversationFaceUrl  
162 - cursor.isNull(offset + 6) ? null : cursor.getLong(offset + 6), // timeStep  
163 - cursor.isNull(offset + 7) ? null : cursor.getLong(offset + 7) // unreadCount  
164 - );  
165 - return entity;  
166 - }  
167 -  
168 - @Override  
169 - public void readEntity(Cursor cursor, IMConversationInfo entity, int offset) {  
170 - entity.setConversationId(cursor.getString(offset + 0));  
171 - entity.setConversationType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
172 - entity.setTitle(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));  
173 - entity.setDes(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));  
174 - entity.setFaceUrl(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));  
175 - entity.setConversationFaceUrl(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));  
176 - entity.setTimeStep(cursor.isNull(offset + 6) ? null : cursor.getLong(offset + 6));  
177 - entity.setUnreadCount(cursor.isNull(offset + 7) ? null : cursor.getLong(offset + 7));  
178 - }  
179 -  
180 - @Override  
181 - protected final String updateKeyAfterInsert(IMConversationInfo entity, long rowId) {  
182 - return entity.getConversationId();  
183 - }  
184 -  
185 - @Override  
186 - public String getKey(IMConversationInfo entity) {  
187 - if(entity != null) {  
188 - return entity.getConversationId();  
189 - } else {  
190 - return null;  
191 - }  
192 - }  
193 -  
194 - @Override  
195 - public boolean hasKey(IMConversationInfo entity) {  
196 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
197 - }  
198 -  
199 - @Override  
200 - protected final boolean isEntityUpdateable() {  
201 - return true;  
202 - }  
203 -  
204 -}  
core/database/src/main/java/com/cnlive/database/dao/IMGroupFaceMemberIdsDao.java deleted 100644 → 0
1 -package com.cnlive.database.dao;  
2 -  
3 -import android.database.Cursor;  
4 -import android.database.sqlite.SQLiteStatement;  
5 -  
6 -import org.greenrobot.greendao.AbstractDao;  
7 -import org.greenrobot.greendao.Property;  
8 -import org.greenrobot.greendao.internal.DaoConfig;  
9 -import org.greenrobot.greendao.database.Database;  
10 -import org.greenrobot.greendao.database.DatabaseStatement;  
11 -  
12 -import com.cnlive.database.bean.IMGroupFaceMemberIds;  
13 -  
14 -// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.  
15 -/**  
16 - * DAO for table "IMGROUP_FACE_MEMBER_IDS".  
17 -*/  
18 -public class IMGroupFaceMemberIdsDao extends AbstractDao<IMGroupFaceMemberIds, String> {  
19 -  
20 - public static final String TABLENAME = "IMGROUP_FACE_MEMBER_IDS";  
21 -  
22 - /**  
23 - * Properties of entity IMGroupFaceMemberIds.<br/>  
24 - * Can be used for QueryBuilder and for referencing column names.  
25 - */  
26 - public static class Properties {  
27 - public final static Property GroupId = new Property(0, String.class, "GroupId", true, "GROUP_ID");  
28 - public final static Property GroupFaceUrlIds = new Property(1, String.class, "GroupFaceUrlIds", false, "GROUP_FACE_URL_IDS");  
29 - }  
30 -  
31 -  
32 - public IMGroupFaceMemberIdsDao(DaoConfig config) {  
33 - super(config);  
34 - }  
35 -  
36 - public IMGroupFaceMemberIdsDao(DaoConfig config, DaoSession daoSession) {  
37 - super(config, daoSession);  
38 - }  
39 -  
40 - /** Creates the underlying database table. */  
41 - public static void createTable(Database db, boolean ifNotExists) {  
42 - String constraint = ifNotExists? "IF NOT EXISTS ": "";  
43 - db.execSQL("CREATE TABLE " + constraint + "\"IMGROUP_FACE_MEMBER_IDS\" (" + //  
44 - "\"GROUP_ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: GroupId  
45 - "\"GROUP_FACE_URL_IDS\" TEXT);"); // 1: GroupFaceUrlIds  
46 - }  
47 -  
48 - /** Drops the underlying database table. */  
49 - public static void dropTable(Database db, boolean ifExists) {  
50 - String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"IMGROUP_FACE_MEMBER_IDS\"";  
51 - db.execSQL(sql);  
52 - }  
53 -  
54 - @Override  
55 - protected final void bindValues(DatabaseStatement stmt, IMGroupFaceMemberIds entity) {  
56 - stmt.clearBindings();  
57 - stmt.bindString(1, entity.getGroupId());  
58 -  
59 - String GroupFaceUrlIds = entity.getGroupFaceUrlIds();  
60 - if (GroupFaceUrlIds != null) {  
61 - stmt.bindString(2, GroupFaceUrlIds);  
62 - }  
63 - }  
64 -  
65 - @Override  
66 - protected final void bindValues(SQLiteStatement stmt, IMGroupFaceMemberIds entity) {  
67 - stmt.clearBindings();  
68 - stmt.bindString(1, entity.getGroupId());  
69 -  
70 - String GroupFaceUrlIds = entity.getGroupFaceUrlIds();  
71 - if (GroupFaceUrlIds != null) {  
72 - stmt.bindString(2, GroupFaceUrlIds);  
73 - }  
74 - }  
75 -  
76 - @Override  
77 - public String readKey(Cursor cursor, int offset) {  
78 - return cursor.getString(offset + 0);  
79 - }  
80 -  
81 - @Override  
82 - public IMGroupFaceMemberIds readEntity(Cursor cursor, int offset) {  
83 - IMGroupFaceMemberIds entity = new IMGroupFaceMemberIds( //  
84 - cursor.getString(offset + 0), // GroupId  
85 - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1) // GroupFaceUrlIds  
86 - );  
87 - return entity;  
88 - }  
89 -  
90 - @Override  
91 - public void readEntity(Cursor cursor, IMGroupFaceMemberIds entity, int offset) {  
92 - entity.setGroupId(cursor.getString(offset + 0));  
93 - entity.setGroupFaceUrlIds(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));  
94 - }  
95 -  
96 - @Override  
97 - protected final String updateKeyAfterInsert(IMGroupFaceMemberIds entity, long rowId) {  
98 - return entity.getGroupId();  
99 - }  
100 -  
101 - @Override  
102 - public String getKey(IMGroupFaceMemberIds entity) {  
103 - if(entity != null) {  
104 - return entity.getGroupId();  
105 - } else {  
106 - return null;  
107 - }  
108 - }  
109 -  
110 - @Override  
111 - public boolean hasKey(IMGroupFaceMemberIds entity) {  
112 - throw new UnsupportedOperationException("Unsupported for entities with a non-null key");  
113 - }  
114 -  
115 - @Override  
116 - protected final boolean isEntityUpdateable() {  
117 - return true;  
118 - }  
119 -  
120 -}