Examples of nullSafeSet()


Examples of org.hibernate.ogm.type.GridType.nullSafeSet()

    Tuple dummy = new Tuple();
    TypeTranslator typeTranslator = serviceRegistry.getService( TypeTranslator.class );

    for ( Entry<String, TypedValue> parameter : queryParameters.getNamedParameters().entrySet() ) {
      GridType gridType = typeTranslator.getType( parameter.getValue().getType() );
      gridType.nullSafeSet( dummy, parameter.getValue().getValue(), new String[]{ parameter.getKey() }, null );
      parameterValues.put( parameter.getKey(), dummy.get( parameter.getKey() ) );
    }

    return parameterValues;
  }
View Full Code Here

Examples of org.hibernate.ogm.type.GridType.nullSafeSet()

    Tuple dummy = new Tuple();
    TypeTranslator typeTranslator = serviceRegistry.getService( TypeTranslator.class );

    for ( Entry<String, TypedValue> parameter : queryParameters.getNamedParameters().entrySet() ) {
      GridType gridType = typeTranslator.getType( parameter.getValue().getType() );
      gridType.nullSafeSet( dummy, parameter.getValue().getValue(), new String[]{ parameter.getKey() }, null );
      parameterValues.put( parameter.getKey(), dummy.get( parameter.getKey() ) );
    }

    return parameterValues;
  }
View Full Code Here

Examples of org.hibernate.ogm.type.GridType.nullSafeSet()

    Tuple dummy = new Tuple();
    TypeTranslator typeTranslator = serviceRegistry.getService( TypeTranslator.class );

    for ( Entry<String, TypedValue> parameter : queryParameters.getNamedParameters().entrySet() ) {
      GridType gridType = typeTranslator.getType( parameter.getValue().getType() );
      gridType.nullSafeSet( dummy, parameter.getValue().getValue(), new String[]{ parameter.getKey() }, null );
      parameterValues.put( parameter.getKey(), dummy.get( parameter.getKey() ) );
    }

    return parameterValues;
  }
View Full Code Here

Examples of org.hibernate.ogm.type.GridType.nullSafeSet()

  }

  private Object convertToGridType(Object value, Type propertyType) {
    Tuple dummy = new Tuple();
    GridType gridType = typeTranslator().getType( propertyType );
    gridType.nullSafeSet( dummy, value, new String[] { "key" }, null );
    return dummy.get( "key" );
  }

  private TypeTranslator typeTranslator() {
    return sessionFactory.getServiceRegistry().getService( TypeTranslator.class );
View Full Code Here

Examples of org.hibernate.ogm.type.spi.GridType.nullSafeSet()

  }

  private Object convertToGridType(Object value, Type propertyType) {
    Tuple dummy = new Tuple();
    GridType gridType = typeTranslator().getType( propertyType );
    gridType.nullSafeSet( dummy, value, new String[] { "key" }, null );
    return dummy.get( "key" );
  }

  private TypeTranslator typeTranslator() {
    return sessionFactory.getServiceRegistry().getService( TypeTranslator.class );
View Full Code Here

Examples of org.hibernate.ogm.type.spi.GridType.nullSafeSet()

    Tuple dummy = new Tuple();
    TypeTranslator typeTranslator = serviceRegistry.getService( TypeTranslator.class );

    for ( Entry<String, TypedValue> parameter : queryParameters.getNamedParameters().entrySet() ) {
      GridType gridType = typeTranslator.getType( parameter.getValue().getType() );
      gridType.nullSafeSet( dummy, parameter.getValue().getValue(), new String[]{ parameter.getKey() }, null );
      parameterValues.put( parameter.getKey(), dummy.get( parameter.getKey() ) );
    }

    return parameterValues;
  }
View Full Code Here

Examples of org.hibernate.ogm.type.spi.GridType.nullSafeSet()

  @Override
  public void nullSafeSet(Tuple resultset, Object value, String[] names, boolean[] settable, SessionImplementor session)
      throws HibernateException {
    GridType idGridType = getIdGridType( session );
    idGridType.nullSafeSet( resultset, getIdentifier( value, session ), names, settable, session );
  }

  private GridType getIdGridType(SessionImplementor session) {
    final Type idType = delegate.getIdentifierOrUniqueKeyType( session.getFactory() );
    GridType idGridType = typeTranslator.getType( idType );
View Full Code Here

Examples of org.hibernate.ogm.type.spi.GridType.nullSafeSet()

  @Override
  public void nullSafeSet(Tuple resultset, Object value, String[] names, SessionImplementor session)
      throws HibernateException {
    GridType idGridType = getIdGridType( session );
    idGridType.nullSafeSet( resultset, getIdentifier( value, session ), names, session );
  }

  @Override
  public Object hydrate(Tuple rs, String[] names, SessionImplementor session, Object owner)
      throws HibernateException {
View Full Code Here

Examples of org.hibernate.ogm.type.spi.GridType.nullSafeSet()

    Tuple dummy = new Tuple();
    TypeTranslator typeTranslator = serviceRegistry.getService( TypeTranslator.class );

    for ( Entry<String, TypedValue> parameter : queryParameters.getNamedParameters().entrySet() ) {
      GridType gridType = typeTranslator.getType( parameter.getValue().getType() );
      gridType.nullSafeSet( dummy, parameter.getValue().getValue(), new String[]{ parameter.getKey() }, null );
      parameterValues.put( parameter.getKey(), dummy.get( parameter.getKey() ) );
    }

    return parameterValues;
  }
View Full Code Here

Examples of org.hibernate.type.Type.nullSafeSet()

        : queryParameters.getPositionalParameterTypes().length;
    int filterParamCount = filteredParamCount - nonfilteredParamCount;
    for ( int i = 0; i < filterParamCount; i++ ) {
      Type type = queryParameters.getFilteredPositionalParameterTypes()[i];
      Object value = queryParameters.getFilteredPositionalParameterValues()[i];
      type.nullSafeSet( st, value, position, session );
      position += type.getColumnSpan( getFactory() );
    }

    return position;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.