관리 메뉴

IT.FARMER

EJB3 미정 본문

EJB

EJB3 미정

아이티.파머 2009. 3. 11. 18:19
반응형


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;
 }

}
반응형