pull/13/head
莫奇 1 year ago
parent 81ab88f1e5
commit a9b69df6b5

@ -63,7 +63,6 @@ public class MetaData extends Task {
} }
/* /*
* *
* Made By CuiCan
*/ */
@Override @Override
@ -90,7 +89,6 @@ public class MetaData extends Task {
} }
/* /*
* 使json * 使json
* Made By CuiCan
*/ */
@Override @Override
public void setContentByLocalJSON(JSONObject js) { public void setContentByLocalJSON(JSONObject js) {
@ -99,7 +97,6 @@ public class MetaData extends Task {
} }
/* /*
* json * json
* Made By CuiCan
*/ */
@Override @Override
public JSONObject getLocalJSONFromContent() { public JSONObject getLocalJSONFromContent() {
@ -107,7 +104,6 @@ public class MetaData extends Task {
} }
/* /*
* *
* Made By CuiCan
*/ */
@Override @Override
public int getSyncAction(Cursor c) { public int getSyncAction(Cursor c) {

@ -40,18 +40,12 @@ import org.json.JSONObject;
* SqlData * SqlData
*/ */
/*
*
*
*
* Made By CuiCan
*/
public class SqlData { public class SqlData {
/* /*
* TAG * TAG
* getSimpleName () * getSimpleName ()
* Made By CuiCan
*/ */
private static final String TAG = SqlData.class.getSimpleName(); private static final String TAG = SqlData.class.getSimpleName();
@ -101,8 +95,6 @@ public class SqlData {
* *
* mContentResolverContentProvider * mContentResolverContentProvider
* mIsCreate * mIsCreate
*
* Made By CuiCan
*/ */
public SqlData(Context context) { public SqlData(Context context) {
mContentResolver = context.getContentResolver(); mContentResolver = context.getContentResolver();
@ -120,8 +112,6 @@ public class SqlData {
* *
* mContentResolverContentProvider * mContentResolverContentProvider
* mIsCreate * mIsCreate
*
* Made By CuiCan
*/ */
public SqlData(Context context, Cursor c) { public SqlData(Context context, Cursor c) {
mContentResolver = context.getContentResolver(); mContentResolver = context.getContentResolver();
@ -133,7 +123,6 @@ public class SqlData {
/* /*
* *
* *
* Made By CuiCan
*/ */
private void loadFromCursor(Cursor c) { private void loadFromCursor(Cursor c) {
mDataId = c.getLong(DATA_ID_COLUMN); mDataId = c.getLong(DATA_ID_COLUMN);
@ -146,8 +135,6 @@ public class SqlData {
/* /*
* *
*
* Made By CuiCan
*/ */
public void setContent(JSONObject js) throws JSONException { public void setContent(JSONObject js) throws JSONException {
//如果传入的JSONObject对象中有DataColumns.ID这一项则设置否则设为INVALID_ID //如果传入的JSONObject对象中有DataColumns.ID这一项则设置否则设为INVALID_ID
@ -186,8 +173,6 @@ public class SqlData {
/* /*
* *
*
* Made By CuiCan
*/ */
public JSONObject getContent() throws JSONException { public JSONObject getContent() throws JSONException {
if (mIsCreate) { if (mIsCreate) {
@ -206,8 +191,6 @@ public class SqlData {
/* /*
* commit * commit
*
* Made By CuiCan
*/ */
public void commit(long noteId, boolean validateVersion, long version) { public void commit(long noteId, boolean validateVersion, long version) {
@ -250,9 +233,6 @@ public class SqlData {
/* /*
* id * id
*
*
* Made By CuiCan
*/ */
public long getId() { public long getId() {
return mDataId; return mDataId;

@ -44,18 +44,10 @@ import java.util.ArrayList;
*/ */
/*
*
*
*
* Made By CuiCan
*/
public class SqlNote { public class SqlNote {
/* /*
* TAG * TAG
* getSimpleName () * getSimpleName ()
* Made By CuiCan
*/ */
private static final String TAG = SqlNote.class.getSimpleName(); private static final String TAG = SqlNote.class.getSimpleName();
@ -145,8 +137,6 @@ public class SqlNote {
/* /*
* *
* mIsCreate * mIsCreate
*
* Made By CuiCan
*/ */
//构造函数只有context对所有的变量进行初始化 //构造函数只有context对所有的变量进行初始化
public SqlNote(Context context) { public SqlNote(Context context) {
@ -174,8 +164,6 @@ public class SqlNote {
/* /*
* *
* mIsCreate * mIsCreate
*
* Made By CuiCan
*/ */
//构造函数有context和一个数据库的cursor多数变量通过cursor指向的一条记录直接进行初始化 //构造函数有context和一个数据库的cursor多数变量通过cursor指向的一条记录直接进行初始化
public SqlNote(Context context, Cursor c) { public SqlNote(Context context, Cursor c) {
@ -194,8 +182,6 @@ public class SqlNote {
/* /*
* *
* mIsCreate * mIsCreate
*
* Made By CuiCan
*/ */
public SqlNote(Context context, long id) { public SqlNote(Context context, long id) {
mContext = context; mContext = context;
@ -211,7 +197,6 @@ public class SqlNote {
/* /*
* id * id
* Made By CuiCan
*/ */
private void loadFromCursor(long id) { private void loadFromCursor(long id) {
Cursor c = null; Cursor c = null;
@ -235,7 +220,6 @@ public class SqlNote {
/* /*
* *
* Made By CuiCan
*/ */
private void loadFromCursor(Cursor c) { private void loadFromCursor(Cursor c) {
//直接从一条记录中的获得以下变量的初始值 //直接从一条记录中的获得以下变量的初始值
@ -255,8 +239,6 @@ public class SqlNote {
/* /*
* content * content
*
* Made By CuiCan
*/ */
private void loadDataContent() { private void loadDataContent() {
Cursor c = null; Cursor c = null;
@ -286,8 +268,6 @@ public class SqlNote {
/* /*
* content * content
*
* Made By CuiCan
*/ */
public boolean setContent(JSONObject js) { public boolean setContent(JSONObject js) {
try { try {
@ -423,8 +403,6 @@ public class SqlNote {
/* /*
* contentnote * contentnote
*
* Made By CuiCan
*/ */
public JSONObject getContent() { public JSONObject getContent() {
try { try {
@ -476,8 +454,6 @@ public class SqlNote {
/* /*
* idid * idid
*
* Made By CuiCan
*/ */
public void setParentId(long id) { public void setParentId(long id) {
mParentId = id; mParentId = id;
@ -486,8 +462,6 @@ public class SqlNote {
/* /*
* idGtaskid * idGtaskid
*
* Made By CuiCan
*/ */
public void setGtaskId(String gid) { public void setGtaskId(String gid) {
mDiffNoteValues.put(NoteColumns.GTASK_ID, gid); mDiffNoteValues.put(NoteColumns.GTASK_ID, gid);
@ -495,8 +469,6 @@ public class SqlNote {
/* /*
* idid * idid
*
* Made By CuiCan
*/ */
public void setSyncId(long syncId) { public void setSyncId(long syncId) {
mDiffNoteValues.put(NoteColumns.SYNC_ID, syncId); mDiffNoteValues.put(NoteColumns.SYNC_ID, syncId);
@ -504,8 +476,6 @@ public class SqlNote {
/* /*
* *
*
* Made By CuiCan
*/ */
public void resetLocalModified() { public void resetLocalModified() {
mDiffNoteValues.put(NoteColumns.LOCAL_MODIFIED, 0); mDiffNoteValues.put(NoteColumns.LOCAL_MODIFIED, 0);
@ -513,8 +483,6 @@ public class SqlNote {
/* /*
* id * id
*
* Made By CuiCan
*/ */
public long getId() { public long getId() {
return mId; return mId;
@ -522,8 +490,6 @@ public class SqlNote {
/* /*
* idid * idid
*
* Made By CuiCan
*/ */
public long getParentId() { public long getParentId() {
return mParentId; return mParentId;
@ -531,8 +497,6 @@ public class SqlNote {
/* /*
* 便 * 便
*
* Made By CuiCan
*/ */
public String getSnippet() { public String getSnippet() {
return mSnippet; return mSnippet;
@ -540,8 +504,6 @@ public class SqlNote {
/* /*
* 便 * 便
*
* Made By CuiCan
*/ */
public boolean isNoteType() { public boolean isNoteType() {
return mType == Notes.TYPE_NOTE; return mType == Notes.TYPE_NOTE;
@ -549,8 +511,6 @@ public class SqlNote {
/* /*
* commit * commit
*
* Made By CuiCan
*/ */
public void commit(boolean validateVersion) { public void commit(boolean validateVersion) {
if (mIsCreate) { if (mIsCreate) {

Loading…
Cancel
Save