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.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()

    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.getColumnsUsingProjection(criteria, propertyName);
    Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName);
    StringBuilder fragment = new StringBuilder();
    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()

    );

    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()

    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()

    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()

    if ( bind != null && bind.getExplicitTemporalType() != null ) {
      if ( Calendar.class.isInstance( bind.getValue() ) ) {
        switch ( bind.getExplicitTemporalType() ) {
          case TIMESTAMP: {
            typeToUse = CalendarType.INSTANCE;
            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
            break;
          }
          case DATE: {
            typeToUse = CalendarDateType.INSTANCE;
            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
View Full Code Here

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

            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
            break;
          }
          case DATE: {
            typeToUse = CalendarDateType.INSTANCE;
            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
            break;
          }
          case TIME: {
            typeToUse = CalendarTimeType.INSTANCE;
            sqlTypesToUse = typeToUse.sqlTypes( session().getFactory() );
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.