第一节:基本类型映射                                      

Hibernate学习6—Hibernate 映射类型

com.cy.model.Book.java:

package com.cy.model;

import java.sql.Blob;
import java.util.Date;

public class Book {
    private int id;
    private String bookName; // 图书名称
    private float price; //图书价格
    private boolean specialPrice; //是否是特价
    private Date publishDate; // 发布日期
    private String author; // 作者
    private String introduction; // 简介
    private Blob bookPic; // 图书图片
    
    
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getBookName() {
        return bookName;
    }
    public void setBookName(String bookName) {
        this.bookName = bookName;
    }
    public float getPrice() {
        return price;
    }
    public void setPrice(float price) {
        this.price = price;
    }
    public boolean isSpecialPrice() {
        return specialPrice;
    }
    public void setSpecialPrice(boolean specialPrice) {
        this.specialPrice = specialPrice;
    }
    public Date getPublishDate() {
        return publishDate;
    }
    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }
    public String getAuthor() {
        return author;
    }
    public void setAuthor(String author) {
        this.author = author;
    }
    public String getIntroduction() {
        return introduction;
    }
    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }
    public Blob getBookPic() {
        return bookPic;
    }
    public void setBookPic(Blob bookPic) {
        this.bookPic = bookPic;
    }
    
    
}
View Code

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-11-27
  • 2021-12-21
  • 2021-12-14
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2021-08-19
  • 2021-07-20
  • 2021-08-21
  • 2021-08-16
相关资源
相似解决方案