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

com.github.rexsheng.springboot.faster.system.dept.domain.DeptStateChangedEvent Maven / Gradle / Ivy

The newest version!
package com.github.rexsheng.springboot.faster.system.dept.domain;

import org.springframework.context.ApplicationEvent;
import org.springframework.util.Assert;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class DeptStateChangedEvent extends ApplicationEvent {

    private DeptState state;

    public DeptStateChangedEvent(Integer deptId, DeptState state) {
        super(Arrays.asList(deptId));
        Assert.notNull(state, "state must not be null");
        this.state = state;
    }

    public DeptStateChangedEvent(DeptState state) {
        super(Collections.emptyList());
        Assert.notNull(state, "state must not be null");
        this.state = state;
    }

    public DeptStateChangedEvent(List deptIds, DeptState state) {
        super(deptIds);
        Assert.notNull(state, "state must not be null");
        this.state = state;
    }

    public DeptState getState() {
        return state;
    }

    public static enum DeptState{
        DELETE,ADD,STATUS_CHANGED
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy