Examples of SqlTypeDescriptor


Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

    }
    if ( ! sqlTypeDescriptor.canBeRemapped() ) {
      return sqlTypeDescriptor;
    }

    final SqlTypeDescriptor overridden = getSqlTypeDescriptorOverride( sqlTypeDescriptor.getSqlType() );
    return overridden == null ? sqlTypeDescriptor : overridden;
  }
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

   * @param sqlCode A {@link Types} constant indicating the SQL column type
   * @return The {@link SqlTypeDescriptor} that should override the
   * "standard basic" SQL type descriptor, or null, if there is no override.
   */
  protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
    SqlTypeDescriptor descriptor;
    switch ( sqlCode ) {
      case Types.BLOB: {
        descriptor = useInputStreamToInsertBlob() ? BlobTypeDescriptor.STREAM_BINDING : null;
        break;
      }
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

    //    corresponding to the AttributeConverter's declared "databaseColumnJavaType" (how we read that value out
    //     of ResultSets).  See JdbcTypeJavaClassMappings for details.  Again, given example, this should return
    //     VARCHAR/CHAR
    final int jdbcTypeCode = JdbcTypeJavaClassMappings.INSTANCE.determineJdbcTypeCodeForJavaClass( databaseColumnJavaType );
    // find the standard SqlTypeDescriptor for that JDBC type code.
    final SqlTypeDescriptor sqlTypeDescriptor = SqlTypeDescriptorRegistry.INSTANCE.getDescriptor( jdbcTypeCode );
    // find the JavaTypeDescriptor representing the "intermediate database type representation".  Back to the
    //     illustration, this should be the type descriptor for Strings
    final JavaTypeDescriptor intermediateJavaTypeDescriptor = JavaTypeDescriptorRegistry.INSTANCE.getDescriptor( databaseColumnJavaType );
    // and finally construct the adapter, which injects the AttributeConverter calls into the binding/extraction
    //     process...
    final SqlTypeDescriptor sqlTypeDescriptorAdapter = new AttributeConverterSqlTypeDescriptorAdapter(
        attributeConverterDefinition.getAttributeConverter(),
        sqlTypeDescriptor,
        intermediateJavaTypeDescriptor
    );
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

    getDefaultProperties().setProperty( Environment.NON_CONTEXTUAL_LOB_CREATION, "true" );
  }

  @Override
  public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
    SqlTypeDescriptor descriptor;
    switch ( sqlCode ) {
      case Types.BLOB: {
        // Force BLOB binding.  Otherwise, byte[] fields annotated
        // with @Lob will attempt to use
        // BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING.  Since the
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

    }
    if ( ! sqlTypeDescriptor.canBeRemapped() ) {
      return sqlTypeDescriptor;
    }

    final SqlTypeDescriptor overridden = getSqlTypeDescriptorOverride( sqlTypeDescriptor.getSqlType() );
    return overridden == null ? sqlTypeDescriptor : overridden;
  }
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

   *
   * @param sqlCode A {@link Types} constant indicating the SQL column type
   * @return The {@link SqlTypeDescriptor} to use as an override, or {@code null} if there is no override.
   */
  protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
    SqlTypeDescriptor descriptor;
    switch ( sqlCode ) {
      case Types.CLOB: {
        descriptor = useInputStreamToInsertBlob() ? ClobTypeDescriptor.STREAM_BINDING : null;
        break;
      }
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

      public LobCreator getLobCreator() {
        return Hibernate.getLobCreator( session );
      }

      public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
        final SqlTypeDescriptor remapped = sqlTypeDescriptor.canBeRemapped()
            ? session.getFactory().getDialect().remapSqlTypeDescriptor( sqlTypeDescriptor )
            : sqlTypeDescriptor;
        return remapped == null ? sqlTypeDescriptor : remapped;
      }
    };
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

    }
    if ( ! sqlTypeDescriptor.canBeRemapped() ) {
      return sqlTypeDescriptor;
    }

    final SqlTypeDescriptor overridden = getSqlTypeDescriptorOverride( sqlTypeDescriptor.getSqlType() );
    return overridden == null ? sqlTypeDescriptor : overridden;
  }
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

   *
   * @param sqlCode A {@link Types} constant indicating the SQL column type
   * @return The {@link SqlTypeDescriptor} to use as an override, or {@code null} if there is no override.
   */
  protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
    SqlTypeDescriptor descriptor;
    switch ( sqlCode ) {
      case Types.CLOB: {
        descriptor = useInputStreamToInsertBlob() ? ClobTypeDescriptor.STREAM_BINDING : null;
        break;
      }
View Full Code Here

Examples of org.hibernate.type.descriptor.sql.SqlTypeDescriptor

  /**
   * {@inheritDoc}
   */
  @Override
  public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
    SqlTypeDescriptor descriptor;
    switch ( sqlCode ) {
      case Types.BLOB: {
        descriptor = BlobTypeDescriptor.BLOB_BINDING;
        break;
      }
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.