All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.persister.entity.BasicEntityPropertyMapping Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.persister.entity;
import org.hibernate.QueryException;
import org.hibernate.type.Type;

/**
 * @author Gavin King
 */
public class BasicEntityPropertyMapping extends AbstractPropertyMapping {

	private final AbstractEntityPersister persister;

	public BasicEntityPropertyMapping(AbstractEntityPersister persister) {
		this.persister = persister;
	}
	
	public String[] getIdentifierColumnNames() {
		return persister.getIdentifierColumnNames();
	}
	
	public String[] getIdentifierColumnReaders() {
		return persister.getIdentifierColumnReaders();
	}
	
	public String[] getIdentifierColumnReaderTemplates() {
		return persister.getIdentifierColumnReaderTemplates();
	}

	protected String getEntityName() {
		return persister.getEntityName();
	}

	public Type getType() {
		return persister.getType();
	}

	public String[] toColumns(final String alias, final String propertyName) throws QueryException {
		return super.toColumns( 
				AbstractEntityPersister.generateTableAlias(
						alias,
						persister.getSubclassPropertyTableNumber( propertyName )
				),
				propertyName 
			);
	}
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy