package com.path.android.jobqueue.examples.twitter.entities;
// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
// KEEP INCLUDES - put your custom includes here
// KEEP INCLUDES END
/**
* Entity mapped to table TWEET.
*/
abstract public class TweetBase {
protected Long localId;
protected Long serverId;
protected String text;
protected Long userId;
protected Boolean isLocal;
protected java.util.Date createdAt;
// KEEP FIELDS - put your custom fields here
// KEEP FIELDS END
public TweetBase() {
}
public TweetBase(Long localId) {
this.localId = localId;
}
public TweetBase(Long localId, Long serverId, String text, Long userId, Boolean isLocal, java.util.Date createdAt) {
this.localId = localId;
this.serverId = serverId;
this.text = text;
this.userId = userId;
this.isLocal = isLocal;
this.createdAt = createdAt;
}
public Long getLocalId() {
return localId;
}
public void setLocalId(Long localId) {
this.localId = localId;
}
public Long getServerId() {
return serverId;
}
public void setServerId(Long serverId) {
this.serverId = serverId;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Boolean getIsLocal() {
return isLocal;
}
public void setIsLocal(Boolean isLocal) {
this.isLocal = isLocal;
}
public java.util.Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
public void updateNotNull(Tweet other) {
if(this == other) {
return;//both came from db, no need to run this.
}
if(other.localId != null) {
this.localId = other.localId;
}
if(other.serverId != null) {
this.serverId = other.serverId;
}
if(other.text != null) {
this.text = other.text;
}
if(other.userId != null) {
this.userId = other.userId;
}
if(other.isLocal != null) {
this.isLocal = other.isLocal;
}
if(other.createdAt != null) {
this.createdAt = other.createdAt;
}
// relationships
}
// KEEP METHODS - put your custom methods here
// KEEP METHODS END
public void onBeforeSave() {
//you can override this method and do some stuff if you want to :)
}
}