Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles
Articles_cn
Articles_de
Articles_pt
Articles_zh
HibernateRelationshi...




JSPWiki v2.2.33

[RSS]


Hide Menu

HibernateRelationships


Difference between version 11 and version 10:

At line 20 added 10 lines.
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
* @hibernate.class table="weblog"
*/
At line 31 added 1 line.
At line 33 added 1 line.
At line 35 added 1 line.
At line 24 removed 1 line.
private Date blogTitle;
At line 38 added 1 line.
private String blogTitle;
At line 27 changed 5 lines.
/*
Generate your getters and setters using your favorite IDE:
In Eclipse:
Right-click -> Source -> Generate Getters and Setters
*/
private Integer version;
/*
* Generate your getters and setters using your favorite IDE: In Eclipse:
* Right-click -> Source -> Generate Getters and Setters
*/
/**
* @return Returns the blogTitle.
*
* @hibernate.property column="blog_title"
*/
public String getBlogTitle() {
return blogTitle;
}
/**
* @param blogTitle
* The blogTitle to set.
*/
public void setBlogTitle(String blogTitle) {
this.blogTitle = blogTitle;
}
/**
* @return Returns the dateCreated.
*
* @hibernate.property column="date_created"
*/
public Date getDateCreated() {
return dateCreated;
}
/**
* @param dateCreated
* The dateCreated to set.
*/
public void setDateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
}
/**
* @return Returns the id.
*
* @hibernate.id column="weblog_id" generator-class="native"
* unsaved-value="null"
*/
public Long getId() {
return id;
}
/**
* @param id
* The id to set.
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return Returns the username.
*/
public String getUsername() {
return username;
}
/**
* @param username
* The username to set.
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return Returns the version.
*
* @hibernate.version
*/
public Integer getVersion() {
return version;
}
/**
* @param version
* The version to set.
*/
public void setVersion(Integer version) {
this.version = version;
}
/**
* @see java.lang.Object#equals(Object)
*/
public boolean equals(Object object) {
if (!(object instanceof Weblog)) {
return false;
}
Weblog rhs = (Weblog) object;
return new EqualsBuilder().append(this.blogTitle, rhs.blogTitle)
.append(this.username, rhs.username).append(this.dateCreated,
rhs.dateCreated).append(this.id, rhs.id).append(
this.version, rhs.version).isEquals();
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return new HashCodeBuilder(-1229851019, 1071684527).append(
this.blogTitle).append(this.username).append(this.dateCreated)
.append(this.id).append(this.version).toHashCode();
}
/**
* @see java.lang.Object#toString()
*/
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", this.id).append("version", this.version).append(
"username", this.username).append("blogTitle",
this.blogTitle).append("dateCreated", this.dateCreated)
.toString();
}
At line 235 added 1 line.

Back to HibernateRelationships, or to the Page History.