joinedsubclassfksecondpass.java

来自「Hibernate Annotations Sample」· Java 代码 · 共 37 行

JAVA
37
字号
//$Id: JoinedSubclassFkSecondPass.java 14779 2008-06-18 17:56:27Z hardy.ferentschik $package org.hibernate.cfg;import java.util.Map;import org.hibernate.MappingException;import org.hibernate.cfg.annotations.TableBinder;import org.hibernate.mapping.JoinedSubclass;import org.hibernate.mapping.SimpleValue;/** * @author Emmanuel Bernard */@SuppressWarnings({"serial", "unchecked"})public class JoinedSubclassFkSecondPass extends FkSecondPass {	private JoinedSubclass entity;	private ExtendedMappings mappings;	public JoinedSubclassFkSecondPass(JoinedSubclass entity, Ejb3JoinColumn[] inheritanceJoinedColumns, SimpleValue key, ExtendedMappings mappings) {		super( key, inheritanceJoinedColumns );		this.entity = entity;		this.mappings = mappings;	}	public String getReferencedEntityName() {		return entity.getSuperclass().getEntityName();	}	public boolean isInPrimaryKey() {		return true;	}	public void doSecondPass(Map persistentClasses) throws MappingException {		TableBinder.bindFk( entity.getSuperclass(), entity, columns, value, false, mappings );	}}

⌨️ 快捷键说明

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