public String toString(Map<String, TypedValue> namedTypedValues) throws HibernateException { Map<String, String> result = new HashMap<String, String>(); for ( Map.Entry<String, TypedValue> entry : namedTypedValues.entrySet() ) { result.put( entry.getKey(), entry.getValue().getType().toLoggableString( entry.getValue().getValue(), factory ) ); } return result.toString(); }
@Override public int bind( PreparedStatement statement, QueryParameters qp, SharedSessionContractImplementor session, int position) throws SQLException { final TypedValue typedValue = qp.getNamedParameters().get( Integer.toString( label ) ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); } }
@Override public int bind( PreparedStatement statement, QueryParameters qp, SharedSessionContractImplementor session, int position) throws SQLException { final TypedValue typedValue = qp.getNamedParameters().get( Integer.toString( label ) ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); } }
@Override public int bind( PreparedStatement statement, QueryParameters qp, SharedSessionContractImplementor session, int position) throws SQLException { final TypedValue typedValue = qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); } }
@Override public int bind( PreparedStatement statement, QueryParameters qp, SharedSessionContractImplementor session, int position) throws SQLException { final TypedValue typedValue = qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); } }
/** * Bind the appropriate value into the given statement at the specified position. * * @param statement The statement into which the value should be bound. * @param qp The defined values for the current query execution. * @param session The session against which the current execution is occuring. * @param position The position from which to start binding value(s). * * @return The number of sql bind positions "eaten" by this bind operation. */ @Override public int bind(PreparedStatement statement, QueryParameters qp, SharedSessionContractImplementor session, int position) throws SQLException { final TypedValue typedValue = qp.getNamedParameters().get( Integer.toString( label ) ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); }
/** * Bind the appropriate value into the given statement at the specified position. * * @param statement The statement into which the value should be bound. * @param qp The defined values for the current query execution. * @param session The session against which the current execution is occuring. * @param position The position from which to start binding value(s). * * @return The number of sql bind positions "eaten" by this bind operation. */ @Override public int bind( PreparedStatement statement, QueryParameters qp, SharedSessionContractImplementor session, int position) throws SQLException { TypedValue typedValue = qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); }
); typedval.getType().nullSafeSet( statement, typedval.getValue(), loc + startIndex, session );
); typedVal.getType().nullSafeSet( ps, typedVal.getValue(), location + start, session );
public String toString(Map<String,TypedValue> namedTypedValues) throws HibernateException { Map<String,String> result = new HashMap<String,String>(); for ( Map.Entry<String, TypedValue> entry : namedTypedValues.entrySet() ) { result.put( entry.getKey(), entry.getValue().getType().toLoggableString( entry.getValue().getValue(), factory ) ); } return result.toString(); }
public String toString(Map<String, TypedValue> namedTypedValues) throws HibernateException { Map<String, String> result = new HashMap<String, String>(); for ( Map.Entry<String, TypedValue> entry : namedTypedValues.entrySet() ) { result.put( entry.getKey(), entry.getValue().getType().toLoggableString( entry.getValue().getValue() ) ); } return result.toString(); }
public String toString(Map<String,TypedValue> namedTypedValues) throws HibernateException { Map<String,String> result = new HashMap<String,String>(); for ( Map.Entry<String, TypedValue> entry : namedTypedValues.entrySet() ) { result.put( entry.getKey(), entry.getValue().getType().toLoggableString( entry.getValue().getValue(), factory ) ); } return result.toString(); }
/** * Bind the appropriate value into the given statement at the specified position. * * @param statement The statement into which the value should be bound. * @param qp The defined values for the current query execution. * @param session The session against which the current execution is occuring. * @param position The position from which to start binding value(s). * * @return The number of sql bind positions "eaten" by this bind operation. */ public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException { TypedValue typedValue = ( TypedValue ) qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); }
/** * Bind the appropriate value into the given statement at the specified position. * * @param statement The statement into which the value should be bound. * @param qp The defined values for the current query execution. * @param session The session against which the current execution is occuring. * @param position The position from which to start binding value(s). * * @return The number of sql bind positions "eaten" by this bind operation. */ public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException { TypedValue typedValue = ( TypedValue ) qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( session.getFactory() ); }
public static TypedGridValue fromOrmTypedValue(TypedValue typedValue, TypeTranslator typeTranslator, SessionFactoryImplementor factory) { GridType gridType = typeTranslator.getType( typedValue.getType() ); Object backendValue = gridType.convertToBackendType( typedValue.getValue(), factory ); return new TypedGridValue( gridType, backendValue ); }
public static int bindNamedParameters( final PreparedStatement ps, final Map namedParams, final int start, final NamedParameterSource source, final SessionImplementor session) throws SQLException, HibernateException { if ( namedParams != null ) { // assumes that types are all of span 1 Iterator iter = namedParams.entrySet().iterator(); int result = 0; while ( iter.hasNext() ) { Map.Entry e = ( Map.Entry ) iter.next(); String name = ( String ) e.getKey(); TypedValue typedval = (TypedValue) e.getValue(); int[] locations = source.getNamedParameterLocations( name ); for ( int i = 0; i < locations.length; i++ ) { if ( LOG.isDebugEnabled() ) { LOG.debugf("bindNamedParameters() %s -> %s [%s]", typedval.getValue(), name, locations[i] + start); } typedval.getType().nullSafeSet( ps, typedval.getValue(), locations[i] + start, session ); } result += locations.length; } return result; } return 0; } }
public static int bindNamedParameters( final PreparedStatement ps, final Map namedParams, final int start, final NamedParameterSource source, final SessionImplementor session) throws SQLException, HibernateException { if ( namedParams != null ) { // assumes that types are all of span 1 Iterator iter = namedParams.entrySet().iterator(); int result = 0; while ( iter.hasNext() ) { Map.Entry e = ( Map.Entry ) iter.next(); String name = ( String ) e.getKey(); TypedValue typedval = (TypedValue) e.getValue(); int[] locations = source.getNamedParameterLocations( name ); for ( int i = 0; i < locations.length; i++ ) { if ( LOG.isDebugEnabled() ) { LOG.debugf("bindNamedParameters() %s -> %s [%s]", typedval.getValue(), name, locations[i] + start); } typedval.getType().nullSafeSet( ps, typedval.getValue(), locations[i] + start, session ); } result += locations.length; } return result; } return 0; } }