@CanIgnoreReturnValue
    public CasEvent assignIdIfNecessary() {
        if (getId() <= 0) {
            setId(System.currentTimeMillis());
        }
        return this;
    }
Assign id if undefined.

@return the registered service
api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java