반응형
package com.hacsa.ejb3.board;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@NamedQueries({
@NamedQuery(
name="findBoard",
query="SELECT o FROM BoardEntity o"
)
})
@SqlResultSetMapping(name="BoardResults",
entities={
@EntityResult(entityClass=com.hacsa.ejb3.board.BoardEntity.class)
// ,@EntityResult(entityClass=ejbql.models.Customer.class)
}
)
@Entity
@Table(name = "BoardTable")
//@SequenceGenerator(name = "IdGen", sequenceName = "num")//오라클사용시
public class BoardEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
// @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "IdGen")//오라클사용시
@Id
@Column(name = "no")
private int no;
@Column(name = "subject")
private String subject;
@Column(name = "username")
private String userName;
@Column(name = "contents")
private String contents;
@Column(name = "userid")
private String userId;
@Column(name = "createdate")
private Date createDate;
@Column(name = "modifydate")
private Date modifyDate;
@Column(name = "countnum")
private String countNum;
@Column ( name = "req_num")
private int req_num;
@Column(name = "req_pos")
private int req_pos;
@Column(name = "req_depth")
private int req_depth;
/**
* @return the no
*/
public int getNo() {
return no;
}
/**
* @param no the no to set
*/
public void setNo(int no) {
this.no = no;
}
/**
* @return the subject
*/
public String getSubject() {
return subject;
}
/**
* @param subject the subject to set
*/
public void setSubject(String subject) {
this.subject = subject;
}
/**
* @return the userName
*/
public String getUserName() {
return userName;
}
/**
* @param userName the userName to set
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* @return the contents
*/
public String getContents() {
return contents;
}
/**
* @param contents the contents to set
*/
public void setContents(String contents) {
this.contents = contents;
}
/**
* @return the userId
*/
public String getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* @return the createDate
*/
public Date getCreateDate() {
return createDate;
}
/**
* @param createDate the createDate to set
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
/**
* @return the modifyDate
*/
public Date getModifyDate() {
return modifyDate;
}
/**
* @param modifyDate the modifyDate to set
*/
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
/**
* @return the countNum
*/
public String getCountNum() {
return countNum;
}
/**
* @param countNum the countNum to set
*/
public void setCountNum(String countNum) {
this.countNum = countNum;
}
/**
* @return the req_num
*/
public int getReq_num() {
return req_num;
}
/**
* @param req_num the req_num to set
*/
public void setReq_num(int req_num) {
this.req_num = req_num;
}
/**
* @return the req_pos
*/
public int getReq_pos() {
return req_pos;
}
/**
* @param req_pos the req_pos to set
*/
public void setReq_pos(int req_pos) {
this.req_pos = req_pos;
}
/**
* @return the req_depth
*/
public int getReq_depth() {
return req_depth;
}
/**
* @param req_depth the req_depth to set
*/
public void setReq_depth(int req_depth) {
this.req_depth = req_depth;
}
/**
* @return the serialVersionUID
*/
public static long getSerialVersionUID() {
return serialVersionUID;
}
}
반응형
'EJB' 카테고리의 다른 글
EJB3 시작 첫번째_01 [ Eclipes + Jboss + mysql] (0) | 2008.10.31 |
---|---|
EJB3 시작 첫걸음 _ (0) | 2008.06.19 |
EJB3 시작 첫걸음 < Jboss - Eclipse Server Plug-In STAP_02 > (0) | 2008.04.24 |
EJB3 시작 첫걸음 < JBOSS SETTING STAP_1> (0) | 2008.04.24 |
EJB Project 시작 - [ 개요 ] (0) | 2008.04.18 |