Class Database.Builder

java.lang.Object
de.calamanari.pk.identitymap.Database.Builder
Enclosing class:
Database

public static class Database.Builder
extends java.lang.Object
BUILDER for easier setup of a our fake Database
  • Method Details

    • withTitle

      public Database.Builder withTitle​(java.lang.String title)
      Parameters:
      title - customer property
      Returns:
      this builder
    • withLastName

      public Database.Builder withLastName​(java.lang.String lastName)
      Parameters:
      lastName - customer property
      Returns:
      this builder
    • withFirstName

      public Database.Builder withFirstName​(java.lang.String firstName)
      Parameters:
      firstName - customer property
      Returns:
      this builder
    • withPhone

      public Database.Builder withPhone​(java.lang.String phone)
      Parameters:
      phone - customer property
      Returns:
      this builder
    • withEmail

      public Database.Builder withEmail​(java.lang.String email)
      Parameters:
      email - customer property
      Returns:
      this builder
    • withPromotionOptIn

      public Database.Builder withPromotionOptIn​(boolean promotionOptIn)
      Parameters:
      promotionOptIn - customer property
      Returns:
      this builder
    • withAddressId

      public Database.Builder withAddressId​(java.lang.String addressId)
      Parameters:
      addressId - address identifier
      Returns:
      this builder
    • withStreet

      public Database.Builder withStreet​(java.lang.String street)
      Parameters:
      street - address property
      Returns:
      this builder
    • withZipCode

      public Database.Builder withZipCode​(java.lang.String zipCode)
      Parameters:
      zipCode - address property
      Returns:
      this builder
    • withCity

      public Database.Builder withCity​(java.lang.String city)
      Parameters:
      city - address property
      Returns:
      this builder
    • withCountry

      public Database.Builder withCountry​(java.lang.String country)
      Parameters:
      country - address property
      Returns:
      this builder
    • withSalutation

      public Database.Builder withSalutation​(java.lang.String salutation)
      Parameters:
      salutation - address property
      Returns:
      this builder
    • commit

      public void commit()
      Adds the customer with all information to the database