org.apache.oozie.service
Class StoreService

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

public class StoreService
extends java.lang.Object
implements Service

Base service for persistency of jobs and actions.


Field Summary
static java.lang.String CONF_CREATE_DB_SCHEMA
           
static java.lang.String CONF_DRIVER
           
static java.lang.String CONF_MAX_ACTIVE_CONN
           
static java.lang.String CONF_PASSWORD
           
static java.lang.String CONF_PREFIX
           
static java.lang.String CONF_URL
           
static java.lang.String CONF_USERNAME
           
 
Constructor Summary
StoreService()
           
 
Method Summary
 void destroy()
          Destroy the StoreService
 javax.persistence.EntityManager getEntityManager()
          Return EntityManager
 java.lang.Class<? extends Service> getInterface()
          Return the public interface of the service.
<S extends Store>
S
getStore(java.lang.Class<S> klass)
          Return instance of store.
<S extends Store,T extends Store>
S
getStore(java.lang.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 java.lang.String CONF_PREFIX
See Also:
Constant Field Values

CONF_URL

public static final java.lang.String CONF_URL
See Also:
Constant Field Values

CONF_DRIVER

public static final java.lang.String CONF_DRIVER
See Also:
Constant Field Values

CONF_USERNAME

public static final java.lang.String CONF_USERNAME
See Also:
Constant Field Values

CONF_PASSWORD

public static final java.lang.String CONF_PASSWORD
See Also:
Constant Field Values

CONF_MAX_ACTIVE_CONN

public static final java.lang.String CONF_MAX_ACTIVE_CONN
See Also:
Constant Field Values

CONF_CREATE_DB_SCHEMA

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

StoreService

public StoreService()
Method Detail

getStore

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

Returns:
Store.
Throws:
StoreException

getStore

public <S extends Store,T extends Store> S getStore(java.lang.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 java.lang.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 © 2010 Yahoo. All Rights Reserved.