Image.java
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- package com.chinacannel.entity;
- import java.io.Serializable;
- import org.apache.commons.lang.builder.EqualsBuilder;
- import org.apache.commons.lang.builder.HashCodeBuilder;
- import org.apache.commons.lang.builder.ToStringBuilder;
- /**
- * <p>Title: </p>
- *
- * <p>Description: </p>
- *
- * <p>Copyright: Copyright (c) 2007</p>
- *
- * <p>Company: </p>
- *
- * @author not attributable
- * @version 1.0
- */
- /** @author Hibernate CodeGenerator */
- public class Image implements Serializable {
- private static final long serialVersionUID = 1;
- /** identifier field */
- private Long id;
- /** nullable persistent field */
- private String filename;
- /** nullable persistent field */
- private String reallyname;
- /** nullable persistent field */
- private String path;
- /** nullable persistent field */
- private String thumbnailpath;
- /** nullable persistent field */
- private String thumbnailname;
- /** nullable persistent field */
- private String type;
- /** full constructor */
- public Image(java.lang.String filename, java.lang.String reallyname, java.lang.String path, java.lang.String thumbnailpath, java.lang.String thumbnailname, java.lang.String type) {
- this.filename = filename;
- this.reallyname = reallyname;
- this.path = path;
- this.thumbnailpath = thumbnailpath;
- this.thumbnailname = thumbnailname;
- this.type = type;
- }
- /** default constructor */
- public Image() {
- }
- public java.lang.Long getId() {
- return this.id;
- }
- public void setId(java.lang.Long id) {
- this.id = id;
- }
- public java.lang.String getFilename() {
- return this.filename;
- }
- public void setFilename(java.lang.String filename) {
- this.filename = filename;
- }
- public java.lang.String getReallyname() {
- return this.reallyname;
- }
- public void setReallyname(java.lang.String reallyname) {
- this.reallyname = reallyname;
- }
- public java.lang.String getPath() {
- return this.path;
- }
- public void setPath(java.lang.String path) {
- this.path = path;
- }
- public java.lang.String getThumbnailpath() {
- return this.thumbnailpath;
- }
- public void setThumbnailpath(java.lang.String thumbnailpath) {
- this.thumbnailpath = thumbnailpath;
- }
- public java.lang.String getThumbnailname() {
- return this.thumbnailname;
- }
- public void setThumbnailname(java.lang.String thumbnailname) {
- this.thumbnailname = thumbnailname;
- }
- public java.lang.String getType() {
- return this.type;
- }
- public void setType(java.lang.String type) {
- this.type = type;
- }
- public String getExtendName() {
- int dot=this.getFilename().lastIndexOf(".");
- return this.getFilename().substring(dot+1);
- }
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .toString();
- }
- public boolean equals(Object other) {
- if ( !(other instanceof Image) ) return false;
- Image castOther = (Image) other;
- return new EqualsBuilder()
- .append(this.getId(), castOther.getId())
- .isEquals();
- }
- public int hashCode() {
- return new HashCodeBuilder()
- .append(getId())
- .toHashCode();
- }
- }