⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 address.java

📁 Hibernate基础教程一书源码.Hibernate是一个持久层开源框架
💻 JAVA
字号:
package com.hibernatebook.annotations;

import javax.persistence.*;

@Entity
public class Address {
    private int id;
    private String city;
    private String country;

    // Constructors...

    protected Address() {
    }
    
    public Address(String city, String country) {
        this.city = city;
        this.country = country;
    }
    
    // Getters...

    @Id
    public int getId() {
        return id;
    }

    public String getCity() {
        return city;
    }

    public String getCountry() {
        return country;
    }
    
    // Setters...

    public void setId(int id) {
        this.id = id;
    }
    
    public void setCity(String city) {
        this.city = city;
    }

    public void setCountry(String country) {
        this.country = country;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -