// Path: src/com/concentricsky/android/khanacademy/data/remote/BaseEntityUpdateVisitor.java
// public abstract class BaseEntityUpdateVisitor<T extends EntityBase> implements EntityVisitor {
// 	private T updateFrom;
// 	public BaseEntityUpdateVisitor(T updateFrom) {
// 		this.updateFrom = updateFrom;
// 	}
// 	@Override
// 	public void visit(Topic topic) {
// 		baseUpdate(topic);
// 	}
// 	@Override
// 	public void visit(Video video) {
// 		baseUpdate(video);
// 	}
// 	@Override
// 	public void visit(EntityBase.Impl entity) {
// 		baseUpdate(entity);
// 	}
// 	private void baseUpdate(EntityBase toUpdate) {
// 		String value = updateFrom.getTitle();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setTitle(value);
// 		}
// 		
// 		value = updateFrom.getDescription();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setDescription(value);
// 		}
// 		
// 		value = updateFrom.getHide();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setHide(value);
// 		}
// 		
// 		value = updateFrom.getKa_url();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setKa_url(value);
// 		}
// 		
// 		Topic parent = updateFrom.getParentTopic();
// 		if (!isDefaultValue(parent, Topic.class)) {
// 			toUpdate.setParentTopic(parent);
// 		}
// 		
// 	}
// 	
// 	/**
// 	 * Test a value to see if it is the default value for its type.
// 	 * 
// 	 * @param value The value to check.
// 	 * @param valueType The value's class. In case of primitives, pass the wrapper class, such as Integer.
// 	 * @return true if the value is default for fields of the given type on this class, false otherwise.
// 	 */
// 	protected boolean isDefaultValue(Object value, Class<?> valueType) {
// 		
// 		if (String.class.equals(valueType)) {
// 			return null == value || "".equals(value);
// 		} else if (Integer.class.equals(valueType)) {
// 			return Integer.valueOf(0).equals(value);
// 		} else if (Topic.class.equals(valueType)) {
// 			return null == value;
// 		}
// 		
// 		throw new UnsupportedOperationException(String.format("Unknown type: %s", valueType.getSimpleName()));
// 	}
// 	
// }
// 
// Path: src/com/concentricsky/android/khanacademy/data/remote/EntityVisitor.java
// public interface EntityVisitor {
// 	public void visit(Topic topic);
// 	public void visit(Video video);
// 	public void visit(EntityBase.Impl entity);
// }


import com.concentricsky.android.khanacademy.data.remote.BaseEntityUpdateVisitor;
import com.concentricsky.android.khanacademy.data.remote.EntityVisitor;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.j256.ormlite.field.DatabaseField;
	 */
	public void setHide(String hide) {
		this.hide = hide;
	}
	/**
	 * @return the parentTopic
	 */
	public Topic getParentTopic() {
		return parentTopic;
	}

	/**
	 * @param parentTopic the parentTopic to set
	 */
	public void setParentTopic(Topic parentTopic) {
		this.parentTopic = parentTopic;
//		parentTopic.getChildren().add(this);
	}

	public String getAncestry() {
		return ancestry;
	}

	public void setAncestry(String ancestry) {
		this.ancestry = ancestry;
	}

	abstract public int getDownloaded_video_count();
	abstract public int getVideo_count();
	abstract public String getId();
// Path: src/com/concentricsky/android/khanacademy/data/remote/BaseEntityUpdateVisitor.java
// public abstract class BaseEntityUpdateVisitor<T extends EntityBase> implements EntityVisitor {
// 	private T updateFrom;
// 	public BaseEntityUpdateVisitor(T updateFrom) {
// 		this.updateFrom = updateFrom;
// 	}
// 	@Override
// 	public void visit(Topic topic) {
// 		baseUpdate(topic);
// 	}
// 	@Override
// 	public void visit(Video video) {
// 		baseUpdate(video);
// 	}
// 	@Override
// 	public void visit(EntityBase.Impl entity) {
// 		baseUpdate(entity);
// 	}
// 	private void baseUpdate(EntityBase toUpdate) {
// 		String value = updateFrom.getTitle();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setTitle(value);
// 		}
// 		
// 		value = updateFrom.getDescription();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setDescription(value);
// 		}
// 		
// 		value = updateFrom.getHide();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setHide(value);
// 		}
// 		
// 		value = updateFrom.getKa_url();
// 		if (!isDefaultValue(value, String.class)) {
// 			toUpdate.setKa_url(value);
// 		}
// 		
// 		Topic parent = updateFrom.getParentTopic();
// 		if (!isDefaultValue(parent, Topic.class)) {
// 			toUpdate.setParentTopic(parent);
// 		}
// 		
// 	}
// 	
// 	/**
// 	 * Test a value to see if it is the default value for its type.
// 	 * 
// 	 * @param value The value to check.
// 	 * @param valueType The value's class. In case of primitives, pass the wrapper class, such as Integer.
// 	 * @return true if the value is default for fields of the given type on this class, false otherwise.
// 	 */
// 	protected boolean isDefaultValue(Object value, Class<?> valueType) {
// 		
// 		if (String.class.equals(valueType)) {
// 			return null == value || "".equals(value);
// 		} else if (Integer.class.equals(valueType)) {
// 			return Integer.valueOf(0).equals(value);
// 		} else if (Topic.class.equals(valueType)) {
// 			return null == value;
// 		}
// 		
// 		throw new UnsupportedOperationException(String.format("Unknown type: %s", valueType.getSimpleName()));
// 	}
// 	
// }
// 
// Path: src/com/concentricsky/android/khanacademy/data/remote/EntityVisitor.java
// public interface EntityVisitor {
// 	public void visit(Topic topic);
// 	public void visit(Video video);
// 	public void visit(EntityBase.Impl entity);
// }


// Path: src/com/concentricsky/android/khanacademy/data/db/EntityBase.java
import com.concentricsky.android.khanacademy.data.remote.BaseEntityUpdateVisitor;
import com.concentricsky.android.khanacademy.data.remote.EntityVisitor;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.j256.ormlite.field.DatabaseField;

	 */
	public void setHide(String hide) {
		this.hide = hide;
	}
	/**
	 * @return the parentTopic
	 */
	public Topic getParentTopic() {
		return parentTopic;
	}

	/**
	 * @param parentTopic the parentTopic to set
	 */
	public void setParentTopic(Topic parentTopic) {
		this.parentTopic = parentTopic;
//		parentTopic.getChildren().add(this);
	}

	public String getAncestry() {
		return ancestry;
	}

	public void setAncestry(String ancestry) {
		this.ancestry = ancestry;
	}

	abstract public int getDownloaded_video_count();
	abstract public int getVideo_count();
	abstract public String getId();
	abstract public BaseEntityUpdateVisitor<? extends EntityBase> buildUpdateVisitor();