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 28 and version 27:

At line 440 added 182 lines.
[{Java2HtmlPlugin
/*
* Created on Apr 17, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.appfuse.model;
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="entry"
*/
public class Entry extends BaseObject {
private Long entryId;
private String text;
private Date timeCreated;
private Integer version;
private Long categoryId;
private Category category;
/*
* Generate your getters and setters using your favorite IDE: In Eclipse:
* Right-click -> Source -> Generate Getters and Setters
*/
/**
* @return Returns the category.
*
* @hibernate.many-to-one insert="false" update="false" cascade="none"
* column="category_id" outer-join="true"
*/
public Category getCategory() {
return category;
}
/**
* @param category
* The category to set.
*/
public void setCategory(Category category) {
this.category = category;
}
/**
* @return Returns the categoryId.
*
* @hibernate.property column="category_id"
*/
public Long getCategoryId() {
return categoryId;
}
/**
* @param categoryId
* The categoryId to set.
*
*/
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
/**
* @return Returns the id.
*
* @hibernate.id column="entry_id" generator-class="native"
* unsaved-value="null"
*/
public Long getEntryId() {
return entryId;
}
/**
* @param id
* The id to set.
*/
public void setEntryId(Long entryId) {
this.entryId = entryId;
}
/**
* @return Returns the text.
*
* @hibernate.property column="entry_text"
*/
public String getText() {
return text;
}
/**
* @param text
* The text to set.
*/
public void setText(String text) {
this.text = text;
}
/**
* @return Returns the timeCreated.
*
* @hibernate.property column="time_created"
*/
public Date getTimeCreated() {
return timeCreated;
}
/**
* @param timeCreated
* The timeCreated to set.
*/
public void setTimeCreated(Date timeCreated) {
this.timeCreated = timeCreated;
}
/**
* @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 Entry)) {
return false;
}
Entry rhs = (Entry) object;
return new EqualsBuilder().append(this.text, rhs.text).append(
this.timeCreated, rhs.timeCreated).append(this.category,
rhs.category).append(this.entryId, rhs.entryId).append(
this.categoryId, rhs.categoryId).append(this.version,
rhs.version).isEquals();
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return new HashCodeBuilder(835056587, 1192670387).append(this.text)
.append(this.timeCreated).append(this.category).append(
this.entryId).append(this.categoryId).append(
this.version).toHashCode();
}
/**
* @see java.lang.Object#toString()
*/
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("text", this.text).append("entryId", this.entryId)
.append("version", this.version).append("categoryId",
this.categoryId).append("category", this.category)
.append("timeCreated", this.timeCreated).toString();
}
}
}]

Back to HibernateRelationships, or to the Page History.