@@ -0,0 +1,2246 @@
+/*%0A * Copyright 2017, TeamDev Ltd. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage org.spine3.server.event;%0A%0Aimport org.spine3.base.Event;%0Aimport org.spine3.base.EventId;%0Aimport org.spine3.base.Events;%0Aimport org.spine3.server.entity.AbstractEntity;%0A%0Aimport java.util.Comparator;%0A%0A/**%0A * Stores an event.%0A *%0A * @author Alexander Yevsyukov%0A */%0Aclass EventEntity extends AbstractEntity%3CEventId, Event%3E %7B%0A%0A    /**%0A     * Compares event entities by timestamps of events.%0A     */%0A    private static final Comparator%3CEventEntity%3E comparator = new Comparator%3CEventEntity%3E() %7B%0A        @Override%0A        public int compare(EventEntity e1, EventEntity e2) %7B%0A            final Event event1 = e1.getState();%0A            final Event event2 = e2.getState();%0A            final int result = Events.eventComparator()%0A                                     .compare(event1, event2);%0A            return result;%0A        %7D%0A    %7D;%0A%0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    EventEntity(EventId id) %7B%0A        super(id);%0A    %7D%0A%0A    EventEntity(Event event) %7B%0A        this(event.getContext()%0A                  .getEventId());%0A        updateState(event);%0A    %7D%0A%0A    /**%0A     * Returns comparator which sorts event entities chronologically.%0A     */%0A    static Comparator%3CEventEntity%3E comparator() %7B%0A        return comparator;%0A    %7D%0A%7D%0A

Fix location of `EventEntity` class