sky.java

来自「hibernate3.2.6源码和jar包」· Java 代码 · 共 48 行

JAVA
48
字号
//$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 + =
减小字号Ctrl + -
显示快捷键?