package org.ryu22e.nico2cal.model; import java.io.Serializable; import java.util.Date; import org.slim3.datastore.Attribute; import org.slim3.datastore.Model; import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Link; import com.google.appengine.api.datastore.Text; /** * @author ryu22e * */ @Model(schemaVersion = 1) public final class Nicolive implements Serializable { /** * */ private static final long serialVersionUID = 1L; /** * */ @Attribute(primaryKey = true) private Key key; /** * */ @Attribute(version = true) private Long version; /** * */ private String title; /** * */ private Text description; /** * */ private Date openTime; /** * */ private Date startTime; /** * */ private String type; /** * */ private Link link; /** * Returns the key. * * @return the key */ public Key getKey() { return key; } /** * Sets the key. * * @param key * the key */ public void setKey(Key key) { this.key = key; } /** * Returns the version. * * @return the version */ public Long getVersion() { return version; } /** * Sets the version. * * @param version * the version */ public void setVersion(Long version) { this.version = version; } /** * @return the title */ public String getTitle() { return title; } /** * @param title the title to set */ public void setTitle(String title) { this.title = title; } /** * @return the description */ public Text getDescription() { return description; } /** * @param description the description to set */ public void setDescription(Text description) { this.description = description; } /** * @return the openTime */ public Date getOpenTime() { return openTime; } /** * @param openTime the openTime to set */ public void setOpenTime(Date openTime) { this.openTime = openTime; } /** * @return the startTime */ public Date getStartTime() { return startTime; } /** * @param startTime the startTime to set */ public void setStartTime(Date startTime) { this.startTime = startTime; } /** * @return the type */ public String getType() { return type; } /** * @param type the type to set */ public void setType(String type) { this.type = type; } /** * @return the link */ public Link getLink() { return link; } /** * @param link the link to set */ public void setLink(Link link) { this.link = link; } /* * (non-Javadoc) {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((key == null) ? 0 : key.hashCode()); return result; } /* * (non-Javadoc) {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Nicolive other = (Nicolive) obj; if (key == null) { if (other.key != null) { return false; } } else if (!key.equals(other.key)) { return false; } return true; } }