📄 sky.java
字号:
//$Id: $
package org.hibernate.test.annotations.xml.hbm;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
/**
* @author Emmanuel Bernard
*/
@Entity(name="EarthSky")
public class Sky {
private Integer id;
private Set<CloudType> cloudTypes = new HashSet<CloudType>();
private CloudType mainCloud;
@ManyToMany
public Set<CloudType> getCloudTypes() {
return cloudTypes;
}
public void setCloudTypes(Set<CloudType> cloudTypes) {
this.cloudTypes = cloudTypes;
}
@Id @GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@ManyToOne
public CloudType getMainCloud() {
return mainCloud;
}
public void setMainCloud(CloudType mainCloud) {
this.mainCloud = mainCloud;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -