public Type type(Class<Type> typeClass, Properties parameters) { try { Type type = typeClass.newInstance(); injectParameters( type, parameters ); return type; } catch (Exception e) { throw new MappingException( "Could not instantiate Type: " + typeClass.getName(), e ); } }
/** * @deprecated Only for use temporary use by {@link org.hibernate.Hibernate} */ @Deprecated public static CustomType custom(Class<UserType> typeClass, Properties parameters, TypeScope scope) { try { UserType userType = typeClass.newInstance(); injectParameters( userType, parameters ); return new CustomType( userType ); } catch (Exception e) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
public CustomType custom(Class<UserType> typeClass, Properties parameters) { try { UserType userType = typeClass.newInstance(); if ( TypeConfigurationAware.class.isInstance( userType ) ) { ( (TypeConfigurationAware) userType ).setTypeConfiguration( typeConfiguration ); } injectParameters( userType, parameters ); return new CustomType( userType ); } catch (Exception e) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
/** * @deprecated Only for use temporary use by {@link org.hibernate.Hibernate} */ @Deprecated @SuppressWarnings({"JavaDoc"}) public static CompositeCustomType customComponent( Class<CompositeUserType> typeClass, Properties parameters, TypeScope scope) { try { CompositeUserType userType = typeClass.newInstance(); injectParameters( userType, parameters ); return new CompositeCustomType( userType ); } catch (Exception e) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
public CollectionType customCollection( String typeName, Properties typeParameters, String role, String propertyRef) { Class typeClass; try { typeClass = ReflectHelper.classForName( typeName ); } catch (ClassNotFoundException cnfe) { throw new MappingException( "user collection type class not found: " + typeName, cnfe ); } CustomCollectionType result = new CustomCollectionType( typeScope, typeClass, role, propertyRef ); if ( typeParameters != null ) { injectParameters( result.getUserType(), typeParameters ); } return result; }
public Type type(Class<Type> typeClass, Properties parameters) { try { Type type = typeClass.newInstance(); injectParameters( type, parameters ); return type; } catch (Exception e) { throw new MappingException( "Could not instantiate Type: " + typeClass.getName(), e ); } }
public Type type(Class<Type> typeClass, Properties parameters) { try { Type type = typeClass.newInstance(); injectParameters( type, parameters ); return type; } catch (Exception e) { throw new MappingException( "Could not instantiate Type: " + typeClass.getName(), e ); } }
/** * @deprecated Only for use temporary use by {@link org.hibernate.Hibernate} */ @Deprecated @SuppressWarnings({ "JavaDoc" }) public static CompositeCustomType customComponent(Class<CompositeUserType> typeClass, Properties parameters, TypeScope scope) { try { CompositeUserType userType = typeClass.newInstance(); injectParameters( userType, parameters ); return new CompositeCustomType( userType ); } catch ( Exception e ) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
/** * @deprecated Only for use temporary use by {@link org.hibernate.Hibernate} */ @Deprecated @SuppressWarnings({ "JavaDoc" }) public static CompositeCustomType customComponent(Class<CompositeUserType> typeClass, Properties parameters, TypeScope scope) { try { CompositeUserType userType = typeClass.newInstance(); injectParameters( userType, parameters ); return new CompositeCustomType( userType ); } catch ( Exception e ) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
/** * @deprecated Only for use temporary use by {@link org.hibernate.Hibernate} */ @Deprecated public static CustomType custom(Class<UserType> typeClass, Properties parameters, TypeScope scope) { try { UserType userType = typeClass.newInstance(); injectParameters( userType, parameters ); return new CustomType( userType ); } catch ( Exception e ) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
/** * @deprecated Only for use temporary use by {@link org.hibernate.Hibernate} */ @Deprecated public static CustomType custom(Class<UserType> typeClass, Properties parameters, TypeScope scope) { try { UserType userType = typeClass.newInstance(); injectParameters( userType, parameters ); return new CustomType( userType ); } catch ( Exception e ) { throw new MappingException( "Unable to instantiate custom type: " + typeClass.getName(), e ); } }
public CompositeCustomType(Class userTypeClass, Properties parameters) throws MappingException { name = userTypeClass.getName(); if ( !CompositeUserType.class.isAssignableFrom(userTypeClass) ) { throw new MappingException( "Custom type does not implement CompositeUserType: " + userTypeClass.getName() ); } try { userType = (CompositeUserType) userTypeClass.newInstance(); } catch (InstantiationException ie) { throw new MappingException( "Cannot instantiate custom type: " + userTypeClass.getName() ); } catch (IllegalAccessException iae) { throw new MappingException( "IllegalAccessException trying to instantiate custom type: " + userTypeClass.getName() ); } TypeFactory.injectParameters(userType, parameters); }
public CustomType(Class userTypeClass, Properties parameters) throws MappingException { if ( !UserType.class.isAssignableFrom( userTypeClass ) ) { throw new MappingException( "Custom type does not implement UserType: " + userTypeClass.getName() ); } name = userTypeClass.getName(); try { userType = ( UserType ) userTypeClass.newInstance(); } catch ( InstantiationException ie ) { throw new MappingException( "Cannot instantiate custom type: " + userTypeClass.getName() ); } catch ( IllegalAccessException iae ) { throw new MappingException( "IllegalAccessException trying to instantiate custom type: " + userTypeClass.getName() ); } TypeFactory.injectParameters( userType, parameters ); types = userType.sqlTypes(); customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass ); }
injectParameters(type, parameters);
public CollectionType customCollection( String typeName, Properties typeParameters, String role, String propertyRef, boolean embedded) { Class typeClass; try { typeClass = ReflectHelper.classForName( typeName ); } catch ( ClassNotFoundException cnfe ) { throw new MappingException( "user collection type class not found: " + typeName, cnfe ); } CustomCollectionType result = new CustomCollectionType( typeScope, typeClass, role, propertyRef, embedded ); if ( typeParameters != null ) { injectParameters( result.getUserType(), typeParameters ); } return result; }
public CollectionType customCollection( String typeName, Properties typeParameters, String role, String propertyRef, boolean embedded) { Class typeClass; try { typeClass = ReflectHelper.classForName( typeName ); } catch ( ClassNotFoundException cnfe ) { throw new MappingException( "user collection type class not found: " + typeName, cnfe ); } CustomCollectionType result = new CustomCollectionType( typeScope, typeClass, role, propertyRef, embedded ); if ( typeParameters != null ) { injectParameters( result.getUserType(), typeParameters ); } return result; }