Delete 'Node.java'

Tanshuhan
pcoifxtab 5 months ago
parent d889fd9a80
commit 1b1d960632

@ -1,158 +0,0 @@
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.micode.notes.gtask.data;
import android.database.Cursor;
import org.json.JSONObject;
/*
* Node Google Task
*
*/
public abstract class Node {
// 同步操作常量
public static final int SYNC_ACTION_NONE = 0; // 无操作
public static final int SYNC_ACTION_ADD_REMOTE = 1; // 远程添加
public static final int SYNC_ACTION_ADD_LOCAL = 2; // 本地添加
public static final int SYNC_ACTION_DEL_REMOTE = 3; // 远程删除
public static final int SYNC_ACTION_DEL_LOCAL = 4; // 本地删除
public static final int SYNC_ACTION_UPDATE_REMOTE = 5; // 远程更新
public static final int SYNC_ACTION_UPDATE_LOCAL = 6; // 本地更新
public static final int SYNC_ACTION_UPDATE_CONFLICT = 7; // 更新冲突
public static final int SYNC_ACTION_ERROR = 8; // 错误
private String mGid; // Google Task 的 ID
private String mName; // 节点名称
private long mLastModified; // 最后修改时间
private boolean mDeleted; // 是否已删除
/*
*
*/
public Node() {
mGid = null;
mName = "";
mLastModified = 0;
mDeleted = false;
}
/*
* JSON
* JSON
* @param actionId ID
* @return JSON
*/
public abstract JSONObject getCreateAction(int actionId);
/*
* JSON
* JSON
* @param actionId ID
* @return JSON
*/
public abstract JSONObject getUpdateAction(int actionId);
/*
* JSON
* JSON
* @param js JSON
*/
public abstract void setContentByRemoteJSON(JSONObject js);
/*
* JSON
* JSON
* @param js JSON
*/
public abstract void setContentByLocalJSON(JSONObject js);
/*
* JSON
* JSON
* @return JSON
*/
public abstract JSONObject getLocalJSONFromContent();
/*
*
*
* @param c
* @return
*/
public abstract int getSyncAction(Cursor c);
/*
* Google Task ID
* @param gid Google Task ID
*/
public void setGid(String gid) {
this.mGid = gid;
}
/*
*
* @param name
*/
public void setName(String name) {
this.mName = name;
}
/*
*
* @param lastModified
*/
public void setLastModified(long lastModified) {
this.mLastModified = lastModified;
}
/*
*
* @param deleted
*/
public void setDeleted(boolean deleted) {
this.mDeleted = deleted;
}
/*
* Google Task ID
* @return Google Task ID
*/
public String getGid() {
return this.mGid;
}
/*
*
* @return
*/
public String getName() {
return this.mName;
}
/*
*
* @return
*/
public long getLastModified() {
return this.mLastModified;
}
/*
*
* @return
*/
public boolean getDeleted() {
return this.mDeleted;
}
}
Loading…
Cancel
Save