Package org.springframework.orm.jpa

Examples of org.springframework.orm.jpa.JpaTemplate


    protected void validate() {
        ObjectHelper.notNull(getEntityManagerFactory(), "entityManagerFactory");
    }

    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here


    /**
     * Creates a new implementation from the given JPA factory
     */
    public static JpaTemplateTransactionStrategy newInstance(EntityManagerFactory emf) {
        JpaTemplate template = new JpaTemplate(emf);
        return newInstance(emf, template);
    }
View Full Code Here

    protected void validate() {
        ObjectHelper.notNull(getEntityManagerFactory(), "entityManagerFactory property");
    }

    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

        overdueEndpoint = getMockEndpoint("mock:overdue");
        overdueEndpoint.setResultWaitTime(20000);
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        JpaTemplate jpaTemplate = getMandatoryBean(JpaTemplate.class, "jpaTemplate");
        TransactionTemplate transactionTemplate = getMandatoryBean(TransactionTemplate.class, "transactionTemplate");

        // START SNIPPET: example
        return new ProcessBuilder(jpaTemplate, transactionTemplate) {
            public void configure() throws Exception {
View Full Code Here

    protected void validate() {
        ObjectHelper.notNull(getEntityManagerFactory(), "entityManagerFactory");
    }

    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

    protected void validate() {
        ObjectHelper.notNull(getEntityManagerFactory(), "entityManagerFactory");
    }

    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

        this.transactionTemplate = transactionTemplate;
    }

    public static JpaMessageIdRepository jpaMessageIdRepository(String persistenceUnit, String processorName) {
        EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(persistenceUnit);
        return jpaMessageIdRepository(new JpaTemplate(entityManagerFactory), processorName);
    }
View Full Code Here

    }

    // Implementation methods
    // -------------------------------------------------------------------------
    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

        overdueEndpoint = getMockEndpoint("mock:overdue");
        overdueEndpoint.setDefaulResultWaitMillis(8000);
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        JpaTemplate jpaTemplate = getMandatoryBean(JpaTemplate.class, "jpaTemplate");
        TransactionTemplate transactionTemplate = getMandatoryBean(TransactionTemplate.class, "transactionTemplate");

        // START SNIPPET: example
        return new ProcessBuilder(jpaTemplate, transactionTemplate) {
            public void configure() throws Exception {
View Full Code Here

    this.marshallingHelper = new JPASessionMarshallingHelper(this.ksession, conf);

    this.sessionInfo.setJPASessionMashallingHelper(this.marshallingHelper);

    TransactionTemplate txTemplate = new TransactionTemplate(transactionManager);
    jpaTemplate = new JpaTemplate((EntityManagerFactory) env.get(EnvironmentName.ENTITY_MANAGER_FACTORY));

    txTemplate.execute(new TransactionCallback() {
      public Object doInTransaction(TransactionStatus status) {
        Object result = jpaTemplate.execute(new JpaCallback() {
          public Object doInJpa(EntityManager em) throws PersistenceException {
View Full Code Here

TOP

Related Classes of org.springframework.orm.jpa.JpaTemplate

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.