Package org.hibernate.type

Examples of org.hibernate.type.CustomType


        throw log.unableToFindGridType( exposedType.getJavaTypeDescriptor().getJavaTypeClass().getName() );
      }
      return gridType;
    }
    else if ( type instanceof CustomType ) {
      CustomType cType = (CustomType) type;
      final UserType userType = cType.getUserType();
      if ( userType instanceof EnumType ) {
        EnumType enumType = (EnumType) userType;
        //should we cache that (the key must be enumClass / isOrdinal
        return new org.hibernate.ogm.type.impl.EnumType( cType, enumType );
      }
View Full Code Here


  public static Serializable get(ResultSet rs, String identifier, Type type) throws SQLException, IdentifierGenerationException {
    if ( ResultSetIdentifierConsumer.class.isInstance( type ) ) {
      return ( ( ResultSetIdentifierConsumer ) type ).consumeIdentifier( rs );
    }
    if ( CustomType.class.isInstance( type ) ) {
      final CustomType customType = (CustomType) type;
      if ( ResultSetIdentifierConsumer.class.isInstance( customType.getUserType() ) ) {
        return ( (ResultSetIdentifierConsumer) customType.getUserType() ).consumeIdentifier( rs );
      }
    }

    Class clazz = type.getReturnedClass();
    if (rs.getMetaData().getColumnCount() == 1) {
View Full Code Here

    if ( CompositeUserType.class.isAssignableFrom( userTypeClass ) ) {
      CompositeCustomType type = new CompositeCustomType( userTypeClass, parameters );
      return type;
    }
    else {
      CustomType type = new CustomType( userTypeClass, parameters );
      return type;
    }
  }
View Full Code Here

    if ( CompositeUserType.class.isAssignableFrom( userTypeClass ) ) {
      CompositeCustomType type = new CompositeCustomType( userTypeClass, parameters );
      return type;
    }
    else {
      CustomType type = new CustomType( userTypeClass, parameters );
      return type;
    }
  }
View Full Code Here

  public static Serializable get(ResultSet rs, Type type) throws SQLException, IdentifierGenerationException {
    if ( ResultSetIdentifierConsumer.class.isInstance( type ) ) {
      return ( ( ResultSetIdentifierConsumer ) type ).consumeIdentifier( rs );
    }
    if ( CustomType.class.isInstance( type ) ) {
      final CustomType customType = (CustomType) type;
      if ( ResultSetIdentifierConsumer.class.isInstance( customType.getUserType() ) ) {
        return ( (ResultSetIdentifierConsumer) customType.getUserType() ).consumeIdentifier( rs );
      }
    }

    Class clazz = type.getReturnedClass();
    if ( clazz == Long.class ) {
View Full Code Here

  public static Serializable get(ResultSet rs, Type type) throws SQLException, IdentifierGenerationException {
    if ( ResultSetIdentifierConsumer.class.isInstance( type ) ) {
      return ( ( ResultSetIdentifierConsumer ) type ).consumeIdentifier( rs );
    }
    if ( CustomType.class.isInstance( type ) ) {
      final CustomType customType = (CustomType) type;
      if ( ResultSetIdentifierConsumer.class.isInstance( customType.getUserType() ) ) {
        return ( (ResultSetIdentifierConsumer) customType.getUserType() ).consumeIdentifier( rs );
      }
    }

    Class clazz = type.getReturnedClass();
    if ( clazz == Long.class ) {
View Full Code Here

  public static Serializable get(ResultSet rs, String identifier, Type type) throws SQLException, IdentifierGenerationException {
    if ( ResultSetIdentifierConsumer.class.isInstance( type ) ) {
      return ( ( ResultSetIdentifierConsumer ) type ).consumeIdentifier( rs );
    }
    if ( CustomType.class.isInstance( type ) ) {
      final CustomType customType = (CustomType) type;
      if ( ResultSetIdentifierConsumer.class.isInstance( customType.getUserType() ) ) {
        return ( (ResultSetIdentifierConsumer) customType.getUserType() ).consumeIdentifier( rs );
      }
    }

    Class clazz = type.getReturnedClass();
    if (rs.getMetaData().getColumnCount() == 1) {
View Full Code Here

  public static Serializable get(ResultSet rs, Type type) throws SQLException, IdentifierGenerationException {
    if ( ResultSetIdentifierConsumer.class.isInstance( type ) ) {
      return ( ( ResultSetIdentifierConsumer ) type ).consumeIdentifier( rs );
    }
    if ( CustomType.class.isInstance( type ) ) {
      final CustomType customType = (CustomType) type;
      if ( ResultSetIdentifierConsumer.class.isInstance( customType.getUserType() ) ) {
        return ( (ResultSetIdentifierConsumer) customType.getUserType() ).consumeIdentifier( rs );
      }
    }

    Class clazz = type.getReturnedClass();
    if ( clazz == Long.class ) {
View Full Code Here

    if ( CompositeUserType.class.isAssignableFrom( userTypeClass ) ) {
      CompositeCustomType type = new CompositeCustomType( userTypeClass, parameters );
      return type;
    }
    else {
      CustomType type = new CustomType( userTypeClass, parameters );
      return type;
    }
  }
View Full Code Here

    if ( CompositeUserType.class.isAssignableFrom( userTypeClass ) ) {
      CompositeCustomType type = new CompositeCustomType( userTypeClass, parameters );
      return type;
    }
    else {
      CustomType type = new CustomType( userTypeClass, parameters );
      return type;
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.type.CustomType

Copyright © 2018 www.massapicom. 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.