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

📄 simpleassociatedentity.java

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 JAVA
字号:
package org.hibernate.test.hql;/** * @author Steve Ebersole */public class SimpleAssociatedEntity {	private Long id;	private String name;	private SimpleEntityWithAssociation owner;	public SimpleAssociatedEntity() {	}	public SimpleAssociatedEntity(String name) {		this.name = name;	}	public SimpleAssociatedEntity(String name, SimpleEntityWithAssociation owner) {		this( name );		bindToOwner( owner );	}	public Long getId() {		return id;	}	public void setId(Long id) {		this.id = id;	}	public String getName() {		return name;	}	public void setName(String name) {		this.name = name;	}	public SimpleEntityWithAssociation getOwner() {		return owner;	}	public void setOwner(SimpleEntityWithAssociation owner) {		this.owner = owner;	}	public void bindToOwner(SimpleEntityWithAssociation owner) {		if ( owner != this.owner ) {			unbindFromCurrentOwner();			if ( owner != null ) {				owner.getAssociatedEntities().add( this );			}		}		this.owner = owner;	}	public void unbindFromCurrentOwner() {		if ( this.owner != null ) {			this.owner.getAssociatedEntities().remove( this );			this.owner = null;		}	}}

⌨️ 快捷键说明

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