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

com.hpe.dna.common.mongodb.notifier.EntityChangedEvent Maven / Gradle / Ivy

The newest version!
package com.hpe.dna.common.mongodb.notifier;

import com.hpe.dna.common.mongodb.Entity;

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

/**
 * @author [email protected]
 */
public class EntityChangedEvent {
    public enum EEventType {CREATED, BULK_CREATED, DELETED, UPDATED}

    private EEventType eventType;
    private Class entityType;
    private List entityIds;
    private List entitiesDeleted;

    public EntityChangedEvent(EEventType eventType, Class entityType, List entityIds) {
        this.entityIds = entityIds;
        this.entityType = entityType;
        this.eventType = eventType;
        this.entitiesDeleted = new ArrayList<>();
    }

    public void setEntityType(Class entityType) {
        this.entityType = entityType;
    }

    public Class getEntityType() {
        return entityType;
    }

    public void setEntityIds(List entityIds) {
        this.entityIds = entityIds;
    }

    public List getEntityIds() {
        return entityIds;
    }

    public EEventType getEventType() {
        return eventType;
    }

    public void setEventType(EEventType eventType) {
        this.eventType = eventType;
    }

    public List getEntitiesDeleted() {
        return entitiesDeleted;
    }

    public void setEntitiesDeleted(List entitiesDeleted) {
        this.entitiesDeleted = entitiesDeleted;
    }

    @Override
    public String toString() {
        return "EntityChangedEvent{" +
                "eventType=" + eventType +
                ", entityType=" + entityType +
                ", entityIds=" + entityIds +
                ", entitiesDeleted=" + entitiesDeleted +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy