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

📄 bookvalue.java

📁 java ejb----html jsp
💻 JAVA
字号:
/* * Generated by XDoclet - Do not edit! */package de.laliluna.tutorial.library.entity.interfaces;/** * Value object for Book. * * @xdoclet-generated at ${TODAY} * @copyright The XDoclet Team * @author XDoclet * @version ${version} */public class BookValue   extends java.lang.Object   implements java.io.Serializable {   private java.lang.Integer id;   private boolean idHasBeenSet = false;   private java.lang.String title;   private boolean titleHasBeenSet = false;   private java.lang.String author;   private boolean authorHasBeenSet = false;   private java.lang.Boolean available;   private boolean availableHasBeenSet = false;   private java.lang.Integer userId;   private boolean userIdHasBeenSet = false;   private java.lang.Integer pk;   public BookValue()   {   }   public BookValue( java.lang.Integer id,java.lang.String title,java.lang.String author,java.lang.Boolean available,java.lang.Integer userId )   {	  this.id = id;	  idHasBeenSet = true;	  this.title = title;	  titleHasBeenSet = true;	  this.author = author;	  authorHasBeenSet = true;	  this.available = available;	  availableHasBeenSet = true;	  this.userId = userId;	  userIdHasBeenSet = true;	  pk = this.getId();   }   //TODO Cloneable is better than this !   public BookValue( BookValue otherValue )   {	  this.id = otherValue.id;	  idHasBeenSet = true;	  this.title = otherValue.title;	  titleHasBeenSet = true;	  this.author = otherValue.author;	  authorHasBeenSet = true;	  this.available = otherValue.available;	  availableHasBeenSet = true;	  this.userId = otherValue.userId;	  userIdHasBeenSet = true;	  pk = this.getId();   }   public java.lang.Integer getPrimaryKey()   {	  return pk;   }   public void setPrimaryKey( java.lang.Integer pk )   {      // it's also nice to update PK object - just in case      // somebody would ask for it later...      this.pk = pk;	  setId( pk );   }   public java.lang.Integer getId()   {	  return this.id;   }   public void setId( java.lang.Integer id )   {	  this.id = id;	  idHasBeenSet = true;		  pk = id;   }   public boolean idHasBeenSet(){	  return idHasBeenSet;   }   public java.lang.String getTitle()   {	  return this.title;   }   public void setTitle( java.lang.String title )   {	  this.title = title;	  titleHasBeenSet = true;   }   public boolean titleHasBeenSet(){	  return titleHasBeenSet;   }   public java.lang.String getAuthor()   {	  return this.author;   }   public void setAuthor( java.lang.String author )   {	  this.author = author;	  authorHasBeenSet = true;   }   public boolean authorHasBeenSet(){	  return authorHasBeenSet;   }   public java.lang.Boolean getAvailable()   {	  return this.available;   }   public void setAvailable( java.lang.Boolean available )   {	  this.available = available;	  availableHasBeenSet = true;   }   public boolean availableHasBeenSet(){	  return availableHasBeenSet;   }   public java.lang.Integer getUserId()   {	  return this.userId;   }   public void setUserId( java.lang.Integer userId )   {	  this.userId = userId;	  userIdHasBeenSet = true;   }   public boolean userIdHasBeenSet(){	  return userIdHasBeenSet;   }   public String toString()   {	  StringBuffer str = new StringBuffer("{");	  str.append("id=" + getId() + " " + "title=" + getTitle() + " " + "author=" + getAuthor() + " " + "available=" + getAvailable() + " " + "userId=" + getUserId());	  str.append('}');	  return(str.toString());   }   /**    * A Value Object has an identity if the attributes making its Primary Key have all been set. An object without identity is never equal to any other object.    *    * @return true if this instance has an identity.    */   protected boolean hasIdentity()   {	  return idHasBeenSet;   }   public boolean equals(Object other)   {      if (this == other)         return true;	  if ( ! hasIdentity() ) return false;	  if (other instanceof BookValue)	  {		 BookValue that = (BookValue) other;		 if ( ! that.hasIdentity() ) return false;		 boolean lEquals = true;		 if( this.id == null )		 {			lEquals = lEquals && ( that.id == null );		 }		 else		 {			lEquals = lEquals && this.id.equals( that.id );		 }		 lEquals = lEquals && isIdentical(that);		 return lEquals;	  }	  else	  {		 return false;	  }   }   public boolean isIdentical(Object other)   {	  if (other instanceof BookValue)	  {		 BookValue that = (BookValue) other;		 boolean lEquals = true;		 if( this.title == null )		 {			lEquals = lEquals && ( that.title == null );		 }		 else		 {			lEquals = lEquals && this.title.equals( that.title );		 }		 if( this.author == null )		 {			lEquals = lEquals && ( that.author == null );		 }		 else		 {			lEquals = lEquals && this.author.equals( that.author );		 }		 if( this.available == null )		 {			lEquals = lEquals && ( that.available == null );		 }		 else		 {			lEquals = lEquals && this.available.equals( that.available );		 }		 if( this.userId == null )		 {			lEquals = lEquals && ( that.userId == null );		 }		 else		 {			lEquals = lEquals && this.userId.equals( that.userId );		 }		 return lEquals;	  }	  else	  {		 return false;	  }   }   public int hashCode(){	  int result = 17;      result = 37*result + ((this.id != null) ? this.id.hashCode() : 0);      result = 37*result + ((this.title != null) ? this.title.hashCode() : 0);      result = 37*result + ((this.author != null) ? this.author.hashCode() : 0);      result = 37*result + ((this.available != null) ? this.available.hashCode() : 0);      result = 37*result + ((this.userId != null) ? this.userId.hashCode() : 0);	  return result;   }}

⌨️ 快捷键说明

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