Package org.hibernate.id

Examples of org.hibernate.id.IdentifierGenerationException


      try {
        ResultSet rs = qps.executeQuery();
        if ( !rs.next() ) {
          String err = "could not read a hi value - you need to populate the table: " + tableName;
          log.error( err );
          throw new IdentifierGenerationException( err );
        }
        result = rs.getLong( 1 );
        rs.close();
      }
      catch ( SQLException sqle ) {
View Full Code Here


      EventSource source,
      boolean requiresImmediateIdAccess) {
    EntityPersister persister = source.getEntityPersister( entityName, entity );
    Serializable generatedId = persister.getIdentifierGenerator().generate( source, entity );
    if ( generatedId == null ) {
      throw new IdentifierGenerationException( "null id generated for:" + entity.getClass() );
    }
    else if ( generatedId == IdentifierGeneratorFactory.SHORT_CIRCUIT_INDICATOR ) {
      return source.getIdentifier( entity );
    }
    else if ( generatedId == IdentifierGeneratorFactory.POST_INSERT_INDICATOR ) {
View Full Code Here

      try {
        ResultSet selectRS = selectPS.executeQuery();
        if ( !selectRS.next() ) {
          String err = "could not read a hi value - you need to populate the table: " + tableName;
          log.error( err );
          throw new IdentifierGenerationException( err );
        }
        result = selectRS.getLong( 1 );
        selectRS.close();
      }
      catch ( SQLException sqle ) {
View Full Code Here

      EventSource source,
      boolean requiresImmediateIdAccess) {
    EntityPersister persister = source.getEntityPersister( entityName, entity );
    Serializable generatedId = persister.getIdentifierGenerator().generate( source, entity );
    if ( generatedId == null ) {
      throw new IdentifierGenerationException( "null id generated for:" + entity.getClass() );
    }
    else if ( generatedId == IdentifierGeneratorHelper.SHORT_CIRCUIT_INDICATOR ) {
      return source.getIdentifier( entity );
    }
    else if ( generatedId == IdentifierGeneratorHelper.POST_INSERT_INDICATOR ) {
View Full Code Here

                  try {
                    final ResultSet selectRS = executeQuery( selectStatement, statsCollector );
                    if ( !selectRS.next() ) {
                      final String err = "could not read a hi value - you need to populate the table: " + tableName;
                      LOG.error( err );
                      throw new IdentifierGenerationException( err );
                    }
                    value.initialize( selectRS, 1 );
                    selectRS.close();
                  }
                  catch (SQLException sqle) {
View Full Code Here

      try {
        ResultSet selectRS = selectPS.executeQuery();
        if ( !selectRS.next() ) {
          String err = "could not read a hi value - you need to populate the table: " + tableName;
          log.error( err );
          throw new IdentifierGenerationException( err );
        }
        result = selectRS.getLong( 1 );
        selectRS.close();
      }
      catch ( SQLException sqle ) {
View Full Code Here

      EventSource source,
      boolean requiresImmediateIdAccess) {
    EntityPersister persister = source.getEntityPersister( entityName, entity );
    Serializable generatedId = persister.getIdentifierGenerator().generate( source, entity );
    if ( generatedId == null ) {
      throw new IdentifierGenerationException( "null id generated for:" + entity.getClass() );
    }
    else if ( generatedId == IdentifierGeneratorFactory.SHORT_CIRCUIT_INDICATOR ) {
      return source.getIdentifier( entity );
    }
    else if ( generatedId == IdentifierGeneratorFactory.POST_INSERT_INDICATOR ) {
View Full Code Here

      try {
        ResultSet rs = qps.executeQuery();
        if ( !rs.next() ) {
          String err = "could not read a hi value - you need to populate the table: " + tableName;
          log.error( err );
          throw new IdentifierGenerationException( err );
        }
        result = rs.getLong( 1 );
        rs.close();
      }
      catch ( SQLException sqle ) {
View Full Code Here

      EventSource source,
      boolean requiresImmediateIdAccess) {
    EntityPersister persister = source.getEntityPersister( entityName, entity );
    Serializable generatedId = persister.getIdentifierGenerator().generate( source, entity );
    if ( generatedId == null ) {
      throw new IdentifierGenerationException( "null id generated for:" + entity.getClass() );
    }
    else if ( generatedId == IdentifierGeneratorFactory.SHORT_CIRCUIT_INDICATOR ) {
      return source.getIdentifier( entity );
    }
    else if ( generatedId == IdentifierGeneratorFactory.POST_INSERT_INDICATOR ) {
View Full Code Here

      try {
        ResultSet selectRS = selectPS.executeQuery();
        if ( !selectRS.next() ) {
          String err = "could not read a hi value - you need to populate the table: " + tableName;
          log.error( err );
          throw new IdentifierGenerationException( err );
        }
        result = selectRS.getLong( 1 );
        selectRS.close();
      }
      catch ( SQLException sqle ) {
View Full Code Here

TOP

Related Classes of org.hibernate.id.IdentifierGenerationException

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.