# Class StDatabaseQueryAbstract<P,R>

java.lang.Object
com.io7m.darco.api.DDatabaseQueryAbstract<StDatabaseTransactionType,P,R>
com.io7m.stonesignal.server.database.StDatabaseQueryAbstract<P,R>

Type Parameters:
  `P` - The query parameters
  `R` - The query results

All Implemented Interfaces:
  `com.io7m.darco.api.DDatabaseQueryType<P,R>`

Direct Known Subclasses:
  `StDBAuditSearch`, `StDBDeviceGetByID`, `StDBDeviceGetByKey`, `StDBDeviceLocationsGet`, `StDBDeviceLocationUpdatePut`, `StDBDeviceLocationUpdateSearch`, `StDBDevicePut`, `StDBDevicesGet`

public abstract class StDatabaseQueryAbstract<P,R> extends com.io7m.darco.api.DDatabaseQueryAbstract<StDatabaseTransactionType,P,R>
An abstract query for the database.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `StDatabaseQueryAbstract(StDatabaseTransactionType t)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected final Map<String,String>`
  `attributes()`
  `protected final org.jooq.DSLContext`
  `context(StDatabaseTransactionType transaction)`
  `protected final org.jooq.DSLContext`
  `context(Connection connection)`
  `protected abstract String`
  `name()`
  `protected final com.fasterxml.jackson.databind.ObjectMapper`
  `objectMapper()`
  `protected final R`
  `onExecute(StDatabaseTransactionType transaction, P parameters)`
  `protected abstract R`
  `onExecuteWithContext(StDatabaseTransactionType transaction, org.jooq.DSLContext context, P parameters)`
  `protected final void`
  `record(String key, Object value)`

  ### Methods inherited from class com.io7m.darco.api.DDatabaseQueryAbstract

  `execute, toString`

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

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

- ## Constructor Details

  - ### StDatabaseQueryAbstract

    protected StDatabaseQueryAbstract(StDatabaseTransactionType t)

- ## Method Details

  - ### context

    protected final org.jooq.DSLContext context(Connection connection)

  - ### context

    protected final org.jooq.DSLContext context(StDatabaseTransactionType transaction)

  - ### objectMapper

    protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper()

  - ### record

    protected final void record(String key, Object value)

  - ### attributes

    protected final Map<String,String> attributes()

  - ### onExecute

    protected final R onExecute(StDatabaseTransactionType transaction, P parameters) throws com.io7m.darco.api.DDatabaseException
    Specified by:
      `onExecute` in class `com.io7m.darco.api.DDatabaseQueryAbstract<StDatabaseTransactionType,P,R>`
    Throws:
      `com.io7m.darco.api.DDatabaseException`

  - ### onExecuteWithContext

    protected abstract R onExecuteWithContext(StDatabaseTransactionType transaction, org.jooq.DSLContext context, P parameters) throws Exception
    Throws:
      `Exception`

  - ### name

    protected abstract String name()