public class OcmTemplateImpl<T> extends java.lang.Object implements OcmTemplate<T>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger
Un Logger
|
protected OcmSessionFactory |
sessionFactory
Fabrique de session OCM
|
| Constructor and Description |
|---|
OcmTemplateImpl()
Constructeur par defaut
|
OcmTemplateImpl(OcmSessionFactory sessionFactory)
Constructeur avec initialisation des parametres
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
java.lang.Object |
execute(OcmAction<T> action)
Methode permettant d'executer une action OCM
|
java.lang.Object |
execute(OcmAction<T> action,
boolean autoSave)
Methode permettant d'executer une action OCM
|
java.util.Collection<T> |
filter(org.apache.jackrabbit.ocm.query.Query query)
Methode permettant de filtrer des entites du depot
|
T |
findByPath(java.lang.String path)
Methode permettant de rechercher une entite a partir de son chemin
|
OcmSessionFactory |
getSessionFactory()
Methode permettant d'obtenir la valeur du champ "sessionFactory"
|
T |
insert(T entity)
Methode permettant d'inserer l'entite dans le depot
|
void |
remove(T entity)
Methode permettant de supprimer une entite du depot
|
void |
setSessionFactory(OcmSessionFactory sessionFactory)
Methode permettant de modifier la valeur du champ "sessionFactory"
|
T |
update(T entity)
Methode permettant de mettre a jour une entite du depot
|
protected final org.apache.commons.logging.Log logger
protected OcmSessionFactory sessionFactory
public OcmTemplateImpl()
public OcmTemplateImpl(OcmSessionFactory sessionFactory)
sessionFactory - Fabrique de sessionspublic OcmSessionFactory getSessionFactory()
public void setSessionFactory(OcmSessionFactory sessionFactory)
sessionFactory - Nouvelle valeur du champ "sessionFactory"public java.lang.Object execute(OcmAction<T> action, boolean autoSave) throws org.springframework.dao.DataAccessException
OcmTemplateexecute in interface OcmTemplate<T>action - Action a executerautoSave - Enregistrement automatique des modificationsorg.springframework.dao.DataAccessExceptionpublic java.lang.Object execute(OcmAction<T> action) throws org.springframework.dao.DataAccessException
OcmTemplateexecute in interface OcmTemplate<T>action - Action a executerorg.springframework.dao.DataAccessExceptionpublic T insert(T entity) throws org.springframework.dao.DataAccessException
OcmTemplateinsert in interface OcmTemplate<T>entity - Entite a insererorg.springframework.dao.DataAccessException - Exception potentiellepublic T update(T entity) throws org.springframework.dao.DataAccessException
OcmTemplateupdate in interface OcmTemplate<T>entity - Entite a mettre a jourorg.springframework.dao.DataAccessException - Exception potentiellepublic void remove(T entity) throws org.springframework.dao.DataAccessException
OcmTemplateremove in interface OcmTemplate<T>entity - Entite a mettre a jourorg.springframework.dao.DataAccessException - Exception potentiellepublic T findByPath(java.lang.String path) throws org.springframework.dao.DataAccessException
OcmTemplatefindByPath in interface OcmTemplate<T>path - Chemin de l'entiteorg.springframework.dao.DataAccessException - Exception potentiellepublic java.util.Collection<T> filter(org.apache.jackrabbit.ocm.query.Query query) throws org.springframework.dao.DataAccessException
OcmTemplatefilter in interface OcmTemplate<T>query - Requete de filtre (OCM)org.springframework.dao.DataAccessException - Exception potentiellepublic void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.ExceptionCopyright © 2018 Kube Cloud. All Rights Reserved.