Package org.jbpm.persistence

Examples of org.jbpm.persistence.PersistenceService


    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (jbpmContext != null) {
      // assign id to the given object
      Services services = jbpmContext.getServices();
      if (services.hasService(Services.SERVICENAME_PERSISTENCE)) {
        PersistenceService persistenceService = services.getPersistenceService();
        persistenceService.assignId(object);
      }
    }
  }
View Full Code Here


   * @return the hibernate session factory, or <code>null</code> if a nonstandard
   * persistence service is configured
   */
  public SessionFactory getSessionFactory()
  {
    PersistenceService persistenceService = getPersistenceService();
    return persistenceService instanceof DbPersistenceService
      ? ((DbPersistenceService) persistenceService).getSessionFactory()
      : null;
  }
View Full Code Here

   * sets the hibernate session factory into the default configured persistence service, overwriting the configured session factory (if there is one configured).
   * if a nonstandard persistence service is configured, then this call has no effect.
   */
  public void setSessionFactory(SessionFactory sessionFactory)
  {
    PersistenceService persistenceService = getPersistenceService();
    if (persistenceService instanceof DbPersistenceService) {
      DbPersistenceService dbPersistenceService = (DbPersistenceService) persistenceService;
      dbPersistenceService.setSessionFactory(sessionFactory);
    }
  }
View Full Code Here

   * @return the hibernate session, or <code>null</code> if a nonstandard
   * persistence service is configured.
   */
  public Session getSession()
  {
    PersistenceService persistenceService = getPersistenceService();
    return persistenceService instanceof DbPersistenceService
      ? ((DbPersistenceService) persistenceService).getSession()
      : null;
  }
View Full Code Here

   * one configured).
   * if a nonstandard persistence service is configured, then this call has no effect.
   */
  public void setSession(Session session)
  {
    PersistenceService persistenceService = getPersistenceService();
    if (persistenceService instanceof DbPersistenceService) {
      DbPersistenceService dbPersistenceService = (DbPersistenceService) persistenceService;
      dbPersistenceService.setSession(session);
    }
  }
View Full Code Here

   * @return the jdbc connectoin, or <code>null</code> if a nonstandard
   * persistence service is configured.
   */
  public Connection getConnection()
  {
    PersistenceService persistenceService = getPersistenceService();
    return persistenceService instanceof DbPersistenceService
      ? ((DbPersistenceService) persistenceService).getConnection()
      : null;
  }
View Full Code Here

   * allows users to provide a jdbc connection to be used when the hibernate session is created.
   * if a nonstandard persistence service is configured, then this call has no effect.
   */
  public void setConnection(Connection connection)
  {
    PersistenceService persistenceService = getPersistenceService();
    if (persistenceService instanceof DbPersistenceService) {
      DbPersistenceService dbPersistenceService = (DbPersistenceService) persistenceService;
      dbPersistenceService.setConnection(connection);
    }
  }
View Full Code Here

  /**
   * more variables related database access.
   */
  public ContextSession getContextSession()
  {
    PersistenceService persistenceService = getPersistenceService();
    return persistenceService != null ? persistenceService.getContextSession() : null;
  }
View Full Code Here

  /**
   * more logging related database access.
   */
  public LoggingSession getLoggingSession()
  {
    PersistenceService persistenceService = getPersistenceService();
    return (persistenceService != null ? persistenceService.getLoggingSession() : null);
  }
View Full Code Here

  /**
   * more job related database access.
   */
  public JobSession getJobSession()
  {
    PersistenceService persistenceService = getPersistenceService();
    return (persistenceService != null ? persistenceService.getJobSession() : null);
  }
View Full Code Here

TOP

Related Classes of org.jbpm.persistence.PersistenceService

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.