Examples of nullSafeSet()


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

        int loop = 0;
        for ( int idPosition : getNaturalIdentifierProperties() ) {
          final Object naturalIdValue = naturalIdValues[loop++];
          if ( naturalIdValue != null ) {
            final Type type = getPropertyTypes()[idPosition];
            type.nullSafeSet( ps, naturalIdValue, positions, session );
            positions += type.getColumnSpan( session.getFactory() );
          }
        }
        ResultSet rs = ps.executeQuery();
        try {
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

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

      PreparedStatement ps = session.getTransactionCoordinator()
          .getJdbcCoordinator()
          .getStatementPreparer()
          .prepareStatement( generateIdByUniqueKeySelectString( uniquePropertyName ) );
      try {
        propertyType.nullSafeSet( ps, key, 1, session );
        ResultSet rs = session.getTransactionCoordinator().getJdbcCoordinator().getResultSetReturn().extract( ps );
        try {
          //if there is no resulting row, return null
          if ( !rs.next() ) {
            return null;
View Full Code Here

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

        int loop = 0;
        for ( int idPosition : getNaturalIdentifierProperties() ) {
          final Object naturalIdValue = naturalIdValues[loop++];
          if ( naturalIdValue != null ) {
            final Type type = getPropertyTypes()[idPosition];
            type.nullSafeSet( ps, naturalIdValue, positions, session );
            positions += type.getColumnSpan( session.getFactory() );
          }
        }
        ResultSet rs = session.getTransactionCoordinator().getJdbcCoordinator().getResultSetReturn().extract( ps );
        try {
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

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

   */
  public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException {
    Type type = qp.getPositionalParameterTypes()[hqlPosition];
    Object value = qp.getPositionalParameterValues()[hqlPosition];

    type.nullSafeSet( statement, value, position, session );
    return type.getColumnSpan( session.getFactory() );
  }

  /**
   * {@inheritDoc}
 
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

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

              try {
                int index = 1;

                // set REVEND = ?
                final Number revisionNumber = auditCfg.getRevisionInfoNumberReader().getRevisionNumber( revision );
                revisionInfoIdType.nullSafeSet( preparedStatement, revisionNumber, index, sessionImplementor );
                index += revisionInfoIdType.getColumnSpan( sessionImplementor.getFactory() );

                // set [, REVEND_TSTMP = ?]
                if ( isRevisionEndTimestampEnabled ) {
                  final Object revEndTimestampObj = revisionTimestampGetter.get( revision );
View Full Code Here

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

                  final Object revEndTimestampObj = revisionTimestampGetter.get( revision );
                  final Date revisionEndTimestamp = convertRevEndTimestampToDate( revEndTimestampObj );
                  final Type revEndTsType = rootAuditedEntityQueryable.getPropertyType(
                      auditCfg.getAuditEntCfg().getRevisionEndTimestampFieldName()
                  );
                  revEndTsType.nullSafeSet( preparedStatement, revisionEndTimestamp, index, sessionImplementor );
                  index += revEndTsType.getColumnSpan( sessionImplementor.getFactory() );
                }

                // where (prod_ent_id) = ?
                final Type idType = rootProductionEntityQueryable.getIdentifierType();
View Full Code Here

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

                  index += revEndTsType.getColumnSpan( sessionImplementor.getFactory() );
                }

                // where (prod_ent_id) = ?
                final Type idType = rootProductionEntityQueryable.getIdentifierType();
                idType.nullSafeSet( preparedStatement, id, index, sessionImplementor );
                index += idType.getColumnSpan( sessionImplementor.getFactory() );

                // where REV <> ?
                final Type revType = rootAuditedEntityQueryable.getPropertyType(
                    auditCfg.getAuditEntCfg().getRevisionNumberPath()
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.