[AB-192] removing second level cache

changing assignable role place module name
fixing starboard retrieving the starstats incorrectly
fixing removing user assigned roles when removing a role from assignable role place
fixing not being able to remove external emote for assignable role place
This commit is contained in:
Sheldan
2021-02-13 14:48:56 +01:00
parent 047c574319
commit 34b9bca7ac
114 changed files with 88 additions and 460 deletions

View File

@@ -3,10 +3,8 @@ package dev.sheldan.abstracto.statistic.emotes.repository;
import dev.sheldan.abstracto.core.models.ServerSpecificId;
import dev.sheldan.abstracto.statistic.emotes.model.database.TrackedEmote;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.QueryHints;
import org.springframework.stereotype.Repository;
import javax.persistence.QueryHint;
import java.util.List;
/**
@@ -20,7 +18,6 @@ public interface TrackedEmoteRepository extends JpaRepository<TrackedEmote, Serv
* @param serverId The ID of the {@link dev.sheldan.abstracto.core.models.database.AServer} to retrieve the {@link TrackedEmote} for
* @return A list of {@link TrackedEmote} from the {@link dev.sheldan.abstracto.core.models.database.AServer} identified by ID, which are not deleted or external
*/
@QueryHints(@QueryHint(name = org.hibernate.annotations.QueryHints.CACHEABLE, value = "true"))
List<TrackedEmote> findByTrackedEmoteId_ServerIdAndDeletedFalseAndExternalFalse(Long serverId);
/**
@@ -29,7 +26,6 @@ public interface TrackedEmoteRepository extends JpaRepository<TrackedEmote, Serv
* @param serverId The ID of the {@link dev.sheldan.abstracto.core.models.database.AServer} to retrieve the {@link TrackedEmote} for
* @return A list of {@link TrackedEmote} from the {@link dev.sheldan.abstracto.core.models.database.AServer} identified by ID, which have their tracking enabled
*/
@QueryHints(@QueryHint(name = org.hibernate.annotations.QueryHints.CACHEABLE, value = "true"))
List<TrackedEmote> findByTrackedEmoteId_ServerIdAndTrackingEnabledTrue(Long serverId);
@@ -38,6 +34,5 @@ public interface TrackedEmoteRepository extends JpaRepository<TrackedEmote, Serv
* @param serverId The ID of the {@link dev.sheldan.abstracto.core.models.database.AServer} to retrieve the {@link TrackedEmote} for
* @return A list of {@link TrackedEmote} from the {@link dev.sheldan.abstracto.core.models.database.AServer} identified by ID
*/
@QueryHints(@QueryHint(name = org.hibernate.annotations.QueryHints.CACHEABLE, value = "true"))
List<TrackedEmote> findByTrackedEmoteId_ServerId(Long serverId);
}

View File

@@ -4,7 +4,6 @@ import dev.sheldan.abstracto.core.models.Fakeable;
import dev.sheldan.abstracto.core.models.ServerSpecificId;
import dev.sheldan.abstracto.core.models.database.AServer;
import lombok.*;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
@@ -23,8 +22,6 @@ import java.time.Instant;
@Getter
@Setter
@EqualsAndHashCode
@Cacheable
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class TrackedEmote implements Serializable, Fakeable {
@EmbeddedId

View File

@@ -2,7 +2,6 @@ package dev.sheldan.abstracto.statistic.emotes.model.database;
import dev.sheldan.abstracto.statistic.emotes.model.database.embed.UsedEmoteDay;
import lombok.*;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.time.Instant;
@@ -18,8 +17,6 @@ import java.time.Instant;
@Getter
@Setter
@EqualsAndHashCode
@Cacheable
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class UsedEmote {
/**