Package javax.persistence

Examples of javax.persistence.PersistenceException


   * Externally created connections should be committed or rolled back externally.
   * </p>
   */
  @Override
  public void commit() throws RollbackException {
    throw new PersistenceException("This is an external transaction so must be committed externally");
  }
View Full Code Here


   * Externally created connections should be committed or rolled back externally.
   * </p>
   */
  @Override
  public void end() throws PersistenceException {
    throw new PersistenceException("This is an external transaction so must be committed externally");
  }
View Full Code Here

   * Externally created connections should be committed or rolled back externally.
   * </p>
   */
  @Override
  public void rollback() throws PersistenceException {
    throw new PersistenceException("This is an external transaction so must be rolled back externally");
  }
View Full Code Here

   * Externally created connections should be committed or rolled back externally.
   * </p>
   */
  @Override
  public void rollback(Throwable e) throws PersistenceException {
    throw new PersistenceException("This is an external transaction so must be rolled back externally");
  }
View Full Code Here

    } catch (Exception e) {
      String msg = "Error converted enum type[" + beanValue.getClass().getName();
      msg += "] enum value[" + beanValue + "] string value [" + stringDbValue + "]";
      msg += " to an Integer.";
      throw new PersistenceException(msg, e);
    }
  }
View Full Code Here

    public String toString() {
        return columnName + " = " + discValue;
    }

    public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
        throw new PersistenceException("Never called (only for inserts)");
    }
View Full Code Here

    private EbeanServer getPrimaryServer() {
      if (primaryServer == null) {
        String msg = "The default EbeanServer has not been defined?";
        msg += " This is normally set via the ebean.datasource.default property.";
        msg += " Otherwise it should be registered programatically via registerServer()";
        throw new PersistenceException(msg);
      }
      return primaryServer;
    }
View Full Code Here

      String c = generateDropDdl();
      writeFile(dropFile, c);

    } catch (IOException e) {
      String msg = "Error generating Drop DDL";
      throw new PersistenceException(msg, e);
    }
  }
View Full Code Here

      String c = generateCreateDdl();
      writeFile(createFile, c);

    } catch (IOException e) {
      String msg = "Error generating Create DDL";
      throw new PersistenceException(msg, e);
    }
  }
View Full Code Here

      t.commit();

    } catch (Exception e) {
      String msg = "Error: " + e.getMessage();
      throw new PersistenceException(msg, e);
    } finally {
      t.end();
    }
  }
View Full Code Here

TOP

Related Classes of javax.persistence.PersistenceException

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.