Package org.hibernate.type

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


            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
            break;
          }
          case TIME: {
            typeToUse = CalendarTimeType.INSTANCE;
            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
            break;
          }
        }
      }
    }
View Full Code Here


        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

    StringBuilder fragment = new StringBuilder();
    for ( int i=0; i<columns.length; i++ ) {
      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

    );

    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

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.