FileDocCategorySizeDatePackage
ElementPropertyMapping.javaAPI DocHibernate 3.2.51551Wed Mar 23 08:41:48 GMT 2005org.hibernate.persister.collection

ElementPropertyMapping

public class ElementPropertyMapping extends Object implements org.hibernate.persister.entity.PropertyMapping
author
Gavin King

Fields Summary
private final String[]
elementColumns
private final org.hibernate.type.Type
type
Constructors Summary
public ElementPropertyMapping(String[] elementColumns, org.hibernate.type.Type type)

		this.elementColumns = elementColumns;
		this.type = type;
	
Methods Summary
public org.hibernate.type.TypegetType()

		return type;
	
public java.lang.String[]toColumns(java.lang.String alias, java.lang.String propertyName)

		if (propertyName==null || "id".equals(propertyName) ) {
			return StringHelper.qualify(alias, elementColumns);
		}
		else {
			throw new QueryException("cannot dereference scalar collection element: " + propertyName);
		}
	
public java.lang.String[]toColumns(java.lang.String propertyName)
Given a property path, return the corresponding column name(s).

		throw new UnsupportedOperationException( "References to collections must be define a SQL alias" );
	
public org.hibernate.type.TypetoType(java.lang.String propertyName)

		if ( propertyName==null || "id".equals(propertyName) ) {
			return type;
		}
		else {
			throw new QueryException("cannot dereference scalar collection element: " + propertyName);
		}