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

This code example shows how to use the following methods:sqlType
    } 
 
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
        try { 
            if (value == null) { 
                st.setNull(index, ((AbstractSingleColumnStandardBasicType<?>) type).sqlType());
            } 
            else { 
                Object identifier = value instanceof String ? value : identifierMethod.invoke(value, new Object[0]);
                type.nullSafeSet(st, identifier, index, null);
            } 
        } 
        catch (Exception e) {
            throw new HibernateException("Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " +
                    "enumeration class '" + enumClass + "'", e);
        } 
    } 
 
    public int[] sqlTypes() { 
        return sqlTypes;
5
CodeRank
This code example shows how to use the following methods:sqlType
		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();
     
	public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
 
		beforeNullSafeOperation(null); 
		 
		try { 
	 
4
CodeRank
This code example shows how to use the following methods:sqlType
 
    @Override 
    public void nullSafeSet(final PreparedStatement st, final Object value, final int index, final SessionImplementor session) throws HibernateException {
        try { 
            if (value == null) { 
                st.setNull(index, type.sqlType());
            } else { 
                final Integer identifier = (Integer) identifierMethod.invoke(value, new Object[0]);
                type.set(st, identifier, index, session);
            } 
        } catch (final Exception e) {
            final StringBuilder stb = new StringBuilder("Exception while invoking identifierMethod '");
            stb.append(valueOfMethod.getName());
            stb.append("' of enumeration class '");
            stb.append(enumClass);
            stb.append('\'');
            throw new HibernateException(stb.toString(), e);
        } 
 
    } 
4
CodeRank
This code example shows how to use the following methods:sqlType
 
    @Override 
    public void nullSafeSet(final PreparedStatement st, final Object value, final int index, final SessionImplementor session) throws HibernateException {
        try { 
            if (value == null) { 
                st.setNull(index, type.sqlType());
            } else { 
                final String identifier = (String) identifierMethod.invoke(value, new Object[0]);
                type.set(st, identifier, index, session);
            } 
        } catch (final Exception e) {
            final StringBuilder stb = new StringBuilder("Exception while invoking identifierMethod '");
            stb.append(valueOfMethod.getName());
            stb.append("' of enumeration class '");
            stb.append(enumClass);
            stb.append('\'');
            throw new HibernateException(stb.toString(), e);
        } 
 
    } 
4
CodeRank
This code example shows how to use the following methods:sqlType
	@Override 
	public void nullSafeSet(final PreparedStatement st, final Object value, final int index, final SessionImplementor sessionImplementor) throws HibernateException,
			SQLException {
		try { 
			if (value == null) { 
				st.setNull(index, type.sqlType());
			} else { 
				final Object identifier = identifierMethod.invoke(value, new Object[0]);
				type.nullSafeSet(st, identifier, index, sessionImplementor);
			} 
		} catch (final Exception e) {
			throw new HibernateException("Exception while invoking identifierMethod '" + identifierMethod.getName()
					+ "' of " + "enumeration class '" + enumClass + "'", e);
		} 
	} 
 
	@Override 
	public int[] sqlTypes() { 
		return sqlTypes;
	} 
3
CodeRank