Hibernate ORM TypeResolver - 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 TypeResolver class.

This code example shows how to use the following methods:
 * @see org.hibernate.engine.FilterDefinition 
 * @see LocalSessionFactoryBean#setFilterDefinitions 
 */ 
public class FilterDefinitionFactoryBean implements FactoryBean<FilterDefinition>, BeanNameAware, InitializingBean {
 
	private final TypeResolver typeResolver = new TypeResolver();
 
	private String filterName;
 
	private Map<String, Type> parameterTypeMap = new HashMap<String, Type>();
 
	private String defaultFilterCondition;
 
	private FilterDefinition filterDefinition;
 
 
	/** 
	 * Set the name of the filter. 
	 */ 
	public void setFilterName(String filterName) {
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getTypeFactory
		return typeResolver.heuristicType( name );
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public Type entity(Class entityClass) {
		return entity( entityClass.getName() );
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public Type entity(String entityName) {
		return typeResolver.getTypeFactory().manyToOne( entityName );
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    } 
     
	public void setParameterValues(Properties parameters) {
		 
		@SuppressWarnings("unchecked") 
		final AbstractSingleColumnStandardBasicType<? extends Object> heuristicType = (AbstractSingleColumnStandardBasicType<? extends Object>) new TypeResolver().heuristicType(identifierType.getName(), parameters);
		if (heuristicType == null) { 
			throw new HibernateException("Unsupported identifier type " + identifierType.getName());
		} 
		 
		type = heuristicType;
		sqlTypes = new int[]{ type.sqlType() };
	} 
 
	public int[] sqlTypes() { 
        return copyOf(sqlTypes);
    } 
 
    public abstract Class<?> returnedClass();
     
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:basic
			identifierType = identifierMethod.getReturnType();
		} catch (final Exception e) {
			throw new HibernateException("Failed to obtain identifier method", e);
		} 
 
		final TypeResolver tr = new TypeResolver();
		type = (AbstractSingleColumnStandardBasicType) tr.basic(identifierType.getName());
 
		if (type == null) {
			throw new HibernateException("Unsupported identifier type " + identifierType.getName());
		} 
 
		sqlTypes = new int[] { type.sqlType() };
 
		final String valueOfMethodName = parameters.getProperty("valueOfMethod", DEFAULT_VALUE_OF_METHOD_NAME);
 
		try { 
			valueOfMethod = enumClass.getMethod(valueOfMethodName, new Class[] { identifierType });
		} catch (final Exception e) {
			throw new HibernateException("Failed to obtain valueOf method", e);
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Hibernate ORM TypeResolver Methods: