Package org.springframework.orm.jpa

Examples of org.springframework.orm.jpa.JpaTemplate


       
    @NotNull
    private String ticketGrantingTicketPrefix = "TGT";
   
    public JpaTicketRegistry(final EntityManagerFactory factory) {
        this.jpaTemplate = new JpaTemplate(factory);
    }
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

    /**
     * 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");
    }

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

        overdueEndpoint = getMockEndpoint("mock:overdue");
        overdueEndpoint.setResultWaitTime(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

        consumer = endpoint.createConsumer(new Processor() {
            public void process(Exchange e) {
                LOG.info("Received exchange: " + e.getIn());
                receivedExchange = e;
                // should have a JpaTemplate
                JpaTemplate template = e.getIn().getHeader(JpaConstants.JPA_TEMPLATE, JpaTemplate.class);
                assertNotNull("Should have a JpaTemplate as header", template);
                latch.countDown();
            }
        });
        consumer.start();
View Full Code Here

   * @param entityManagerFactory the JPA EntityManagerFactory to create a JpaTemplate for
   * @return the new JpaTemplate instance
   * @see #setEntityManagerFactory
   */
  protected JpaTemplate createJpaTemplate(EntityManagerFactory entityManagerFactory) {
    return new JpaTemplate(entityManagerFactory);
  }
View Full Code Here

   * @param entityManager the JPA EntityManager to create a JpaTemplate for
   * @return the new JpaTemplate instance
   * @see #setEntityManagerFactory
   */
  protected JpaTemplate createJpaTemplate(EntityManager entityManager) {
    return new JpaTemplate(entityManager);
  }
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

   * @param entityManagerFactory the JPA EntityManagerFactory to create a JpaTemplate for
   * @return the new JpaTemplate instance
   * @see #setEntityManagerFactory
   */
  protected JpaTemplate createJpaTemplate(EntityManagerFactory entityManagerFactory) {
    return new JpaTemplate(entityManagerFactory);
  }
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.