Package org.hibernate

Examples of org.hibernate.HibernateException


   * @throws HibernateException If no mapping was specified for that type.
   */
  public String getTypeName(int code, long length, int precision, int scale) throws HibernateException {
    String result = typeNames.get( code, length, precision, scale );
    if ( result == null ) {
      throw new HibernateException(
          "No type mapping for java.sql.Types code: " +
          code +
          ", length: " +
          length
      );
View Full Code Here


   * @throws HibernateException If no mapping was specified for that type.
   */
  public String getHibernateTypeName(int code) throws HibernateException {
    String result = hibernateTypeNames.get( code );
    if ( result == null ) {
      throw new HibernateException( "No Hibernate type mapping for java.sql.Types code: " + code );
    }
    return result;
  }
View Full Code Here

   * @throws HibernateException If no mapping was specified for that type.
   */
  public String getHibernateTypeName(int code, int length, int precision, int scale) throws HibernateException {
    String result = hibernateTypeNames.get( code, length, precision, scale );
    if ( result == null ) {
      throw new HibernateException(
          "No Hibernate type mapping for java.sql.Types code: " +
          code +
          ", length: " +
          length
      );
View Full Code Here

          entityInfos[x - first] = documentExtractor.extract( x );
          entityInfosLoaded.add( entityInfos[x - first] );
        }
      }
      catch (IOException e) {
        throw new HibernateException( "Unable to read Lucene topDocs[" + x + "]", e );
      }

    }
    //preload efficiently first
    loader.load( entityInfosLoaded.toArray( new EntityInfo[entityInfosLoaded.size()] ) );
View Full Code Here

            Date date = null;
            try {
              date = new SimpleDateFormat( "yyyyMMdd" ).parse( result );
            }
            catch ( ParseException e ) {
              throw new HibernateException( "Unable to read date from datastore " + result, e );
            }
            if ( log.isTraceEnabled() ) {
              log.tracef( "found [$s] as column [$s]", result, name );
            }
            return (X) date;
View Full Code Here

      public IntegralDataTypeHolder execute(Connection connection) throws SQLException {
        try {
          return doWorkInCurrentTransactionIfAny( localSession );
        }
        catch ( RuntimeException sqle ) {
          throw new HibernateException( "Could not get or update next value", sqle );
        }
      }
    }
    //we want to work out of transaction
    boolean workInTransaction = false;
View Full Code Here

      public IntegralDataTypeHolder execute(Connection connection) throws SQLException {
        try {
          return doWorkInCurrentTransactionIfAny( localSession );
        }
        catch ( RuntimeException sqle ) {
          throw new HibernateException( "Could not get or update next value", sqle );
        }
      }
View Full Code Here

    Calendar calendar = new GregorianCalendar();
    try {
      calendar.setTime( createDateTimeTimeZoneFormat().parse( string ) );
    }
    catch ( ParseException pe ) {
      throw new HibernateException( "could not parse date time string", pe );
    }
    return calendar;
  }
View Full Code Here

  public BigInteger fromStringValue(String string) throws HibernateException {
    try {
      return new BigInteger( string );
    }
    catch ( NumberFormatException e ) {
      throw new HibernateException( "Unable to rebuild BigInteger from String", e );
    }
  }
View Full Code Here

    final Serializable id = session.getContextEntityIdentifier( entity );

    final EntityEntry entry = session.getPersistenceContext().getEntry( entity );
    if ( entry == null ) {
      throw new HibernateException( "entity is not associated with the session: " + id );
    }

    if ( log.isTraceEnabled() ) {
      log.trace(
          "initializing lazy properties of: " +
View Full Code Here

TOP

Related Classes of org.hibernate.HibernateException

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.