All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shapestone.event.Event Maven / Gradle / Ivy

The newest version!
package com.shapestone.event;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

import static java.util.Objects.isNull;

/**
 * Name: Michael Williams
 * Date: 10/22/16.
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@JsonIgnoreProperties(ignoreUnknown = true)
public class Event {

  private String eventId;
  private String eventName;
  private String sourceId;
  private String sourceName;
  private String sourceSystemName;
  private String sourcePartyId;
  private String correlationId;
  private String action;
  private Boolean fail;
  private List eventItems;
  private String ownerPartyId;
  private Long createdDate;

  public Event(Event event) {
    this.eventId = event.eventId;
    this.sourceId = event.sourceId;
    this.sourceName = event.sourceName;
    this.sourceSystemName = event.sourceSystemName;
    this.sourcePartyId = event.sourcePartyId;
    this.correlationId = event.correlationId;
    this.action = event.action;
    this.fail = event.fail;
    this.eventItems = event.eventItems;
    this.ownerPartyId = event.ownerPartyId;
    this.createdDate = event.createdDate;
  }

  public List getEventItems() {
    if (isNull(eventItems)) {
      this.eventItems = new ArrayList<>();
    }
    return this.eventItems;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy