org.apache.oozie.service
Class StoreService

java.lang.Object
  extended by org.apache.oozie.service.StoreService
All Implemented Interfaces:
Service

public class StoreService
extends Object
implements Service

Base service for persistency of jobs and actions.


Field Summary
static String CONF_CREATE_DB_SCHEMA
           
static String CONF_DRIVER
           
static String CONF_MAX_ACTIVE_CONN
           
static String CONF_PASSWORD
           
static String CONF_PREFIX
           
static String CONF_URL
           
static String CONF_USERNAME
           
 
Constructor Summary
StoreService()
           
 
Method Summary
 void destroy()
          Destroy the StoreService
 javax.persistence.EntityManager getEntityManager()
          Return EntityManager
 Class<? extends Service> getInterface()
          Return the public interface of the service.
<S extends Store>
S
getStore(Class<S> klass)
          Return instance of store.
<S extends Store,T extends Store>
S
getStore(Class<S> klass, T store)
          Return instance of store with an EntityManager pointing to an existing Store.
 void init(Services services)
          Initializes the StoreService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_PREFIX

public static final String CONF_PREFIX
See Also:
Constant Field Values

CONF_URL

public static final String CONF_URL
See Also:
Constant Field Values

CONF_DRIVER

public static final String CONF_DRIVER
See Also:
Constant Field Values

CONF_USERNAME

public static final String CONF_USERNAME
See Also:
Constant Field Values

CONF_PASSWORD

public static final String CONF_PASSWORD
See Also:
Constant Field Values

CONF_MAX_ACTIVE_CONN

public static final String CONF_MAX_ACTIVE_CONN
See Also:
Constant Field Values

CONF_CREATE_DB_SCHEMA

public static final String CONF_CREATE_DB_SCHEMA
See Also:
Constant Field Values
Constructor Detail

StoreService

public StoreService()
Method Detail

getStore

public <S extends Store> S getStore(Class<S> klass)
                         throws StoreException
Return instance of store.

Returns:
Store.
Throws:
StoreException

getStore

public <S extends Store,T extends Store> S getStore(Class<S> klass,
                                                    T store)
                         throws StoreException
Return instance of store with an EntityManager pointing to an existing Store.

Returns:
Store.
Throws:
StoreException

getInterface

public Class<? extends Service> getInterface()
Return the public interface of the service.

Specified by:
getInterface in interface Service
Returns:
StoreService.

init

public void init(Services services)
          throws ServiceException
Initializes the StoreService.

Specified by:
init in interface Service
Parameters:
services - services instance.
Throws:
ServiceException - thrown if the service could not initialize.

destroy

public void destroy()
Destroy the StoreService

Specified by:
destroy in interface Service

getEntityManager

public javax.persistence.EntityManager getEntityManager()
Return EntityManager



Copyright © 2011 Yahoo. All Rights Reserved.