Hibernate ORM AbstractType - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM AbstractType class.

This code example shows how to use the following methods:
import org.hibernate.engine.SessionImplementor; 
import org.hibernate.type.AbstractType; 
import org.hibernate.type.Type; 
import org.hibernate.util.EqualsHelper; 
public class ImmutableAnyType extends AbstractType { 
	public static final Type INSTANCE = new ImmutableAnyType(); 
	private static final int[] SQL_TYPES = new int[] { 
	private static final boolean[] BOTH = new boolean[] {true, true}; 
	private static final boolean[] NONE = new boolean[] {false, false}; 
	public String getName() { 
This code example shows how to use the following methods:getIdentifier
	public Object getPropertyValue(Object component, int i, SessionImplementor session) 
		throws HibernateException { 
		return i==0 ? 
				session.bestGuessEntityName(component) : 
				getIdentifier(component, session); 
	public Object[] getPropertyValues(Object component, SessionImplementor session) 
		throws HibernateException { 
		return new Object[] { session.bestGuessEntityName(component), getIdentifier(component, session) }; 
	private Serializable getIdentifier(Object value, SessionImplementor session) throws HibernateException { 
		try { 
			return ForeignKeys.getEntityIdentifierIfNotUnsaved( session.bestGuessEntityName(value), value, session ); 
		catch (TransientObjectException toe) { 
			return null; 
See Code Examples for Hibernate ORM AbstractType Methods: