⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photo.java

📁 java电子相册一般网页里面实现图片切换的这个电子相册的代码
💻 JAVA
字号:
package cn.edu.seu.album.pojo;

import java.io.Serializable;
import java.sql.Timestamp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="PHOTO"
 *     
 */
public class Photo implements Serializable {

    /** identifier field */
    private String id;

    /** persistent field */
    private String name;

    /** persistent field */
    private String priv;

    /** nullable persistent field */
    private String description;

    /** persistent field */
    private Timestamp createDate;

    /** persistent field */
    private Timestamp lastUpdateDate;

    /** persistent field */
    private Integer modifyTimes;

    /** persistent field */
    private cn.edu.seu.album.pojo.Person person;

    /** full constructor */
    public Photo(String name, String priv, String description,
            Timestamp createDate, Timestamp lastUpdateDate,
            Integer modifyTimes, cn.edu.seu.album.pojo.Person person) {
        this.name = name;
        this.priv = priv;
        this.description = description;
        this.createDate = createDate;
        this.lastUpdateDate = lastUpdateDate;
        this.modifyTimes = modifyTimes;
        this.person = person;
    }

    /** default constructor */
    public Photo() {
    }

    /** minimal constructor */
    public Photo(String name, String priv, Timestamp createDate,
            Timestamp lastUpdateDate, Integer modifyTimes,
            cn.edu.seu.album.pojo.Person person) {
        this.name = name;
        this.priv = priv;
        this.createDate = createDate;
        this.lastUpdateDate = lastUpdateDate;
        this.modifyTimes = modifyTimes;
        this.person = person;
    }

    /** 
     *            @hibernate.id
     *             generator-class="uuid.hex"
     *             type="java.lang.String"
     *             column="ID"
     *         
     */
    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="32"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="PRIV"
     *             length="1"
     *             not-null="true"
     *         
     */
    public String getPriv() {
        return this.priv;
    }

    public void setPriv(String priv) {
        this.priv = priv;
    }

    /** 
     *            @hibernate.property
     *             column="DESCRIPTION"
     *             length="200"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /** 
     *            @hibernate.property
     *             column="CREATE_DATE"
     *             length="7"
     *             not-null="true"
     *         
     */
    public Timestamp getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    /** 
     *            @hibernate.property
     *             column="LAST_UPDATE_DATE"
     *             length="7"
     *             not-null="true"
     *         
     */
    public Timestamp getLastUpdateDate() {
        return this.lastUpdateDate;
    }

    public void setLastUpdateDate(Timestamp lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    /** 
     *            @hibernate.property
     *             column="MODIFY_TIMES"
     *             length="22"
     *             not-null="true"
     *         
     */
    public Integer getModifyTimes() {
        return this.modifyTimes;
    }

    public void setModifyTimes(Integer modifyTimes) {
        this.modifyTimes = modifyTimes;
    }

    /** 
     *            @hibernate.many-to-one
     *             not-null="true"
     *            @hibernate.column name="OWNER"         
     *         
     */
    public cn.edu.seu.album.pojo.Person getPerson() {
        return this.person;
    }

    public void setPerson(cn.edu.seu.album.pojo.Person person) {
        this.person = person;
    }

    public String toString() {
        return new ToStringBuilder(this).append("id", getId()).append("name",
                getName()).toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof Photo))
            return false;
        Photo castOther = (Photo) other;
        return new EqualsBuilder().append(this.getId(), castOther.getId())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder().append(getId()).toHashCode();
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -