org.apache.cayenne.dba

## Class JdbcActionBuilder

- java.lang.Object
- - org.apache.cayenne.dba.JdbcActionBuilder

- All Implemented Interfaces:
    SQLActionVisitor
  Direct Known Subclasses:
    DB2ActionBuilder, IngresActionBuilder, SQLServerActionBuilder

      public class JdbcActionBuilder
      extends Object
      implements SQLActionVisitor

  A factory of default SQLActions. Adapters usually subclass JdbcActionBuilder to provide custom actions for various query types.
  Since:
    1.2

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JdbcAdapter` | `adapter`
    `protected EntityResolver` | `entityResolver`
    `protected JdbcEventLogger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JdbcActionBuilder(JdbcAdapter adapter, EntityResolver resolver)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SQLAction` | `batchAction(BatchQuery query)` Creates an action to execute a batch update query.
    `SQLAction` | `ejbqlAction(EJBQLQuery query)` Creates an action to execute EJBQL query.
    `JdbcAdapter` | `getAdapter()` Returns DbAdapter used associated with this action builder.
    `EntityResolver` | `getEntityResolver()` Returns EntityResolver that can be used to gain access to the mapping objects.
    `SQLAction` | `objectSelectAction(SelectQuery query)` Creates an action to execute a SelectQuery.
    `SQLAction` | `procedureAction(ProcedureQuery query)` Creates an action to execute a ProcedureQuery.
    `SQLAction` | `sqlAction(SQLTemplate query)` Creates an action to execute a SQLTemplate.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### adapter

          protected JdbcAdapter adapter

    - #### entityResolver

          protected EntityResolver entityResolver

    - #### logger

          protected JdbcEventLogger logger

  - ### Constructor Detail

    - #### JdbcActionBuilder

          public JdbcActionBuilder(JdbcAdapter adapter,
                                   EntityResolver resolver)

  - ### Method Detail

    - #### batchAction

          public SQLAction batchAction(BatchQuery query)

      Description copied from interface: `SQLActionVisitor`
      Creates an action to execute a batch update query.
      Specified by:
        `batchAction` in interface `SQLActionVisitor`

    - #### procedureAction

          public SQLAction procedureAction(ProcedureQuery query)

      Description copied from interface: `SQLActionVisitor`
      Creates an action to execute a ProcedureQuery.
      Specified by:
        `procedureAction` in interface `SQLActionVisitor`

    - #### objectSelectAction

          public SQLAction objectSelectAction(SelectQuery query)

      Description copied from interface: `SQLActionVisitor`
      Creates an action to execute a SelectQuery.
      Specified by:
        `objectSelectAction` in interface `SQLActionVisitor`

    - #### sqlAction

          public SQLAction sqlAction(SQLTemplate query)

      Description copied from interface: `SQLActionVisitor`
      Creates an action to execute a SQLTemplate.
      Specified by:
        `sqlAction` in interface `SQLActionVisitor`

    - #### ejbqlAction

          public SQLAction ejbqlAction(EJBQLQuery query)

      Description copied from interface: `SQLActionVisitor`
      Creates an action to execute EJBQL query.
      Specified by:
        `ejbqlAction` in interface `SQLActionVisitor`
      Since:
        3.0

    - #### getAdapter

          public JdbcAdapter getAdapter()

      Returns DbAdapter used associated with this action builder.

    - #### getEntityResolver

          public EntityResolver getEntityResolver()

      Returns EntityResolver that can be used to gain access to the mapping objects.

Copyright © 2001–2017 Apache Cayenne. All rights reserved.