Examples of EDBPreCommitHook


Examples of org.openengsb.core.edb.api.hooks.EDBPreCommitHook

    public void initDB() throws Exception {
        AuthenticationContext authenticationContext = mock(AuthenticationContext.class);
        when(authenticationContext.getAuthenticatedPrincipal()).thenReturn(COMMITTER);
        EntityManager em = testPersistenceUnit.getEntityManager("edb");
        JPADao dao = new DefaultJPADao(em);
        EDBPreCommitHook preCommitHook = new CheckPreCommitHook(dao);
        ContextHolder.get().setCurrentContextId(CONTEXT);

        db = new TestEDBService(dao, authenticationContext, null, Arrays.asList(preCommitHook), null, null, true, em);
        db.open();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.