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

📄 animal.java

📁 XDoclet 使自动生成部署描述符更为便利。XDoclet 是一个代码生成实用程序
💻 JAVA
字号:
package test.hibernate;

import java.util.Set;

/**
 * @author Administrator
 *
 * @hibernate.class
 *  table="ANIMALS"
 *  dynamic-update="true"
 * 
 * @hibernate.discriminator column="disc"
 * 	not-null="true"
 *  force="false"
 */
public class Animal extends Persistent {
	
	private Set prey;
	private char sex;

	/**
	 * Constructor for Animal.
	 */
	public Animal() {
		super();
	}

	/**
	 * @hibernate.set
	 *  lazy="true"
	 *  table="PREDATOR_PREY"
	 *  order-by="PREY_ID"
	 * @hibernate.collection-key
	 *  column="PREDATOR_ID"
	 * @hibernate.collection-many-to-many
	 *  column="PREY_ID"
	 * @return Set
	 */
	public Set getPrey() {
		return prey;
	}

	/**
	 * Sets the prey.
	 * @param prey The prey to set
	 */
	public void setPrey(Set prey) {
		this.prey = prey;
	}

	/**
	 * @hibernate.property
	 *  not-null="true"
	 * Returns the sex.
	 * @return char
	 */
	public char getSex() {
		return sex;
	}

	/**
	 * Sets the sex.
	 * @param sex The sex to set
	 */
	public void setSex(char sex) {
		this.sex = sex;
	}

}

⌨️ 快捷键说明

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