Interface JpaEndpointBuilderFactory.JpaEndpointProducerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointProducerBuilder, org.apache.camel.EndpointProducerResolver
    All Known Subinterfaces:
    JpaEndpointBuilderFactory.JpaEndpointBuilder
    Enclosing interface:
    JpaEndpointBuilderFactory

    public static interface JpaEndpointBuilderFactory.JpaEndpointProducerBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Builder for endpoint producers for the JPA component.
    • Method Detail

      • joinTransaction

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder joinTransaction​(boolean joinTransaction)
        The camel-jpa component will join transaction by default. You can use this option to turn this off, for example if you use LOCAL_RESOURCE and join transaction doesn't work with your JPA provider. This option can also be set globally on the JpaComponent, instead of having to set it on all endpoints. The option is a: boolean type. Default: true Group: common
      • joinTransaction

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder joinTransaction​(String joinTransaction)
        The camel-jpa component will join transaction by default. You can use this option to turn this off, for example if you use LOCAL_RESOURCE and join transaction doesn't work with your JPA provider. This option can also be set globally on the JpaComponent, instead of having to set it on all endpoints. The option will be converted to a boolean type. Default: true Group: common
      • resultClass

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder resultClass​(Class<Object> resultClass)
        Defines the type of the returned payload (we will call entityManager.createNativeQuery(nativeQuery, resultClass) instead of entityManager.createNativeQuery(nativeQuery)). Without this option, we will return an object array. Only has an affect when using in conjunction with native query when consuming data. The option is a: java.lang.Class<java.lang.Object> type. Group: common
      • resultClass

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder resultClass​(String resultClass)
        Defines the type of the returned payload (we will call entityManager.createNativeQuery(nativeQuery, resultClass) instead of entityManager.createNativeQuery(nativeQuery)). Without this option, we will return an object array. Only has an affect when using in conjunction with native query when consuming data. The option will be converted to a java.lang.Class<java.lang.Object> type. Group: common
      • findEntity

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder findEntity​(boolean findEntity)
        If enabled then the producer will find a single entity by using the message body as key and entityType as the class type. This can be used instead of a query to find a single entity. The option is a: boolean type. Default: false Group: producer
      • findEntity

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder findEntity​(String findEntity)
        If enabled then the producer will find a single entity by using the message body as key and entityType as the class type. This can be used instead of a query to find a single entity. The option will be converted to a boolean type. Default: false Group: producer
      • lazyStartProducer

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder lazyStartProducer​(boolean lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: boolean type. Default: false Group: producer
      • lazyStartProducer

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder lazyStartProducer​(String lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option will be converted to a boolean type. Default: false Group: producer
      • useExecuteUpdate

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder useExecuteUpdate​(Boolean useExecuteUpdate)
        To configure whether to use executeUpdate() when producer executes a query. When you use INSERT, UPDATE or DELETE statement as a named query, you need to specify this option to 'true'. The option is a: java.lang.Boolean type. Group: producer
      • useExecuteUpdate

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder useExecuteUpdate​(String useExecuteUpdate)
        To configure whether to use executeUpdate() when producer executes a query. When you use INSERT, UPDATE or DELETE statement as a named query, you need to specify this option to 'true'. The option will be converted to a java.lang.Boolean type. Group: producer
      • usePersist

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder usePersist​(boolean usePersist)
        Indicates to use entityManager.persist(entity) instead of entityManager.merge(entity). Note: entityManager.persist(entity) doesn't work for detached entities (where the EntityManager has to execute an UPDATE instead of an INSERT query)!. The option is a: boolean type. Default: false Group: producer
      • usePersist

        default JpaEndpointBuilderFactory.JpaEndpointProducerBuilder usePersist​(String usePersist)
        Indicates to use entityManager.persist(entity) instead of entityManager.merge(entity). Note: entityManager.persist(entity) doesn't work for detached entities (where the EntityManager has to execute an UPDATE instead of an INSERT query)!. The option will be converted to a boolean type. Default: false Group: producer