Examples of sqlTypes()


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

    );

    Type wantedType = TypeFactory.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()

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

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

   */
  public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) {
    final String[] columns = criteriaQuery.getColumnsUsingProjection( criteria, propertyName );
    final Type type = criteriaQuery.getTypeUsingProjection( criteria, propertyName );
    final SessionFactoryImplementor factory = criteriaQuery.getFactory();
    final int[] sqlTypes = type.sqlTypes( factory );

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

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

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

    String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName);
    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);
    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
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.