Examples of sqlTypes()


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

        if ( hibernateType == null ) {
          throw new IllegalArgumentException(
              "Could not convert java type [" + javaType.getName() + "] to Hibernate type"
          );
        }
        int[] sqlTypeCodes = hibernateType.sqlTypes( factory );
        if ( sqlTypeCodes.length != 1 ) {
          throw new IllegalArgumentException(
              "Invalid Hibernate Type [" + hibernateType.getName() +
                  "] for cast : more than one column spanned"
          );
View Full Code Here

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

        if ( hibernateType == null ) {
          throw new IllegalArgumentException(
              "Could not convert java type [" + javaType.getName() + "] to Hibernate type"
          );
        }
        int[] sqlTypeCodes = hibernateType.sqlTypes( factory );
        if ( sqlTypeCodes.length != 1 ) {
          throw new IllegalArgumentException(
              "Invalid Hibernate Type [" + hibernateType.getName() +
                  "] for cast : more than one column spanned"
          );
View Full Code Here

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

    String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName);
    Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName);
    StringBuffer fragment = new StringBuffer();
    for ( int i=0; i<columns.length; i++ ) {
      SessionFactoryImplementor factory = criteriaQuery.getFactory();
      boolean lower = ignoreCase && type.sqlTypes( factory )[i]==Types.VARCHAR;
      if (lower) {
        fragment.append( factory.getDialect().getLowercaseFunction() )
          .append('(');
      }
      fragment.append( columns[i] );
View Full Code Here

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

    String[] columns = criteriaQuery.findColumns(propertyName, criteria);
    Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName);
    StringBuffer fragment = new StringBuffer();
    if (columns.length>1) fragment.append('(');
    SessionFactoryImplementor factory = criteriaQuery.getFactory();
    int[] sqlTypes = type.sqlTypes( factory );
    for ( int i=0; i<columns.length; i++ ) {
      boolean lower = ignoreCase &&
          ( sqlTypes[i]==Types.VARCHAR || sqlTypes[i]==Types.CHAR );
      if (lower) {
        fragment.append( factory.getDialect().getLowercaseFunction() )
View Full Code Here

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

        if ( hibernateType == null ) {
          throw new IllegalArgumentException(
              "Could not convert java type [" + javaType.getName() + "] to Hibernate type"
          );
        }
        int[] sqlTypeCodes = hibernateType.sqlTypes( factory );
        if ( sqlTypeCodes.length != 1 ) {
          throw new IllegalArgumentException(
              "Invalid Hibernate Type [" + hibernateType.getName() +
                  "] for cast : more than one column spanned"
          );
View Full Code Here

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

    for ( int i=0; i<columns.length; i++ ) {
      final StringBuilder expression = new StringBuilder();
      SessionFactoryImplementor factory = criteriaQuery.getFactory();
      boolean lower = false;
      if ( ignoreCase ) {
        int sqlType = type.sqlTypes( factory )[i];
        lower = sqlType == Types.VARCHAR
            || sqlType == Types.CHAR
            || sqlType == Types.LONGVARCHAR;
      }
     
View Full Code Here

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

    String[] columns = criteriaQuery.findColumns(propertyName, criteria);
    Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName);
    StringBuffer fragment = new StringBuffer();
    if (columns.length>1) fragment.append('(');
    SessionFactoryImplementor factory = criteriaQuery.getFactory();
    int[] sqlTypes = type.sqlTypes( factory );
    for ( int i=0; i<columns.length; i++ ) {
      boolean lower = ignoreCase &&
          ( sqlTypes[i]==Types.VARCHAR || sqlTypes[i]==Types.CHAR );
      if (lower) {
        fragment.append( factory.getDialect().getLowercaseFunction() )
View Full Code Here

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

    StringBuilder fragment = new StringBuilder();
    if ( columns.length > 1 ) {
      fragment.append( '(' );
    }
    SessionFactoryImplementor factory = criteriaQuery.getFactory();
    int[] sqlTypes = type.sqlTypes( factory );
    for ( int i = 0; i < columns.length; i++ ) {
      boolean lower = ignoreCase &&
          (sqlTypes[i] == Types.VARCHAR || sqlTypes[i] == Types.CHAR);
      if ( lower ) {
        fragment.append( factory.getDialect().getLowercaseFunction() )
View Full Code Here

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

    );

    Type wantedType = mappings.getTypeResolver().heuristicType(preferredHibernateType);

    if(wantedType!=null) {
      int[] wantedSqlTypes = wantedType.sqlTypes(mapping);

      if(wantedSqlTypes.length>1) {
        throw new JDBCBinderException("The type " + preferredHibernateType + " found on " + location + " spans multiple columns. Only single column types allowed.");
      }
View Full Code Here

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

    StringBuffer fragment = new StringBuffer();
    if ( columns.length > 1 ) {
      fragment.append( '(' );
    }
    SessionFactoryImplementor factory = criteriaQuery.getFactory();
    int[] sqlTypes = type.sqlTypes( factory );
    for ( int i = 0; i < columns.length; i++ ) {
      boolean lower = ignoreCase &&
          (sqlTypes[i] == Types.VARCHAR || sqlTypes[i] == Types.CHAR);
      if ( lower ) {
        fragment.append( factory.getDialect().getLowercaseFunction() )
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.