Class EventSchema.Builder

java.lang.Object
org.axonframework.eventsourcing.eventstore.jdbc.EventSchema.Builder
Enclosing class:
EventSchema

public static class EventSchema.Builder extends Object
Builder for an EventSchema that gets initialized with default values.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • eventTable

      public EventSchema.Builder eventTable(String eventTable)
      Sets the name of the domain events table. Defaults to 'DomainEventEntry'.
      Parameters:
      eventTable - the event table name
      Returns:
      the modified Builder instance
    • snapshotTable

      public EventSchema.Builder snapshotTable(String snapshotTable)
      Sets the name of the snapshot events table. Defaults to 'SnapshotEventEntry'.
      Parameters:
      snapshotTable - the snapshot table name
      Returns:
      the modified Builder instance
    • globalIndexColumn

      public EventSchema.Builder globalIndexColumn(String globalIndexColumn)
      Sets the name of the global index column. Defaults to 'globalIndex'.
      Parameters:
      globalIndexColumn - the name of the global index column.
      Returns:
      the modified Builder instance
    • timestampColumn

      public EventSchema.Builder timestampColumn(String timestampColumn)
      Sets the name of the timestamp column. Defaults to 'timeStamp'.
      Parameters:
      timestampColumn - the name of the timestamp column.
      Returns:
      the modified Builder instance
    • eventIdentifierColumn

      public EventSchema.Builder eventIdentifierColumn(String eventIdentifierColumn)
      Sets the name of the event identifier column. Defaults to 'eventIdentifier'.
      Parameters:
      eventIdentifierColumn - the name of the event identifier column.
      Returns:
      the modified Builder instance
    • aggregateIdentifierColumn

      public EventSchema.Builder aggregateIdentifierColumn(String aggregateIdentifierColumn)
      Sets the name of the event identifier column. Defaults to 'aggregateIdentifier'.
      Parameters:
      aggregateIdentifierColumn - the name of the aggregate identifier column.
      Returns:
      the modified Builder instance
    • sequenceNumberColumn

      public EventSchema.Builder sequenceNumberColumn(String sequenceNumberColumn)
      Sets the name of the event identifier column. Defaults to 'sequenceNumber'.
      Parameters:
      sequenceNumberColumn - the name of the sequence number column.
      Returns:
      the modified Builder instance
    • typeColumn

      public EventSchema.Builder typeColumn(String typeColumn)
      Sets the name of the aggregate type column. Defaults to 'type'.
      Parameters:
      typeColumn - the name of the aggregate type column.
      Returns:
      the modified Builder instance
    • payloadTypeColumn

      public EventSchema.Builder payloadTypeColumn(String payloadTypeColumn)
      Sets the name of the event payload type column. Defaults to 'payloadType'.
      Parameters:
      payloadTypeColumn - the name of the payload type column.
      Returns:
      the modified Builder instance
    • payloadRevisionColumn

      public EventSchema.Builder payloadRevisionColumn(String payloadRevisionColumn)
      Sets the name of the event payload revision column. Defaults to 'payloadRevision'.
      Parameters:
      payloadRevisionColumn - the name of the payload revision column.
      Returns:
      the modified Builder instance
    • payloadColumn

      public EventSchema.Builder payloadColumn(String payloadColumn)
      Sets the name of the event payload column. Defaults to 'payload'.
      Parameters:
      payloadColumn - the name of the payload column.
      Returns:
      the modified Builder instance
    • metaDataColumn

      public EventSchema.Builder metaDataColumn(String metaDataColumn)
      Sets the name of the event metadata column. Defaults to 'metaData'.
      Parameters:
      metaDataColumn - the name of the metadata column.
      Returns:
      the modified Builder instance
    • domainEventFields

      public EventSchema.Builder domainEventFields(Function<EventSchema,String> domainEventFields)
      Set a comma separated list of domain event column names to select from an event or snapshot entry. Defaults to:

      "[eventIdentifierColumn], [aggregateIdentifierColumn], [sequenceNumberColumn], [typeColumn], [timestampColumn], [payloadTypeColumn], [payloadRevisionColumn], [payloadColumn], [metaDataColumn]"

      Returns:
      the modified Builder instance
    • trackedEventFields

      public EventSchema.Builder trackedEventFields(Function<EventSchema,String> trackedEventFields)
      Set a comma separated list of tracked domain event column names to select from an event entry. Defaults to:

      "[globalIndexColumn], [domainEventFields]"

      Returns:
      the modified Builder instance
    • build

      public EventSchema build()
      Builds a new EventSchema from builder values.
      Returns:
      new EventSchema