mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 11:48:16 +00:00
[AB-96] adding ability to edit/delete modmail messages via editing/deleting the original message causing the message,
adding featuremode to modmail to define whether or not there is a separate message posted to the mod mail thread, to see it easier, renaming modmail related tables to singular, adding some necessary methods (caching) to all entities
This commit is contained in:
@@ -2,9 +2,10 @@ package dev.sheldan.abstracto.scheduling.model.database;
|
||||
|
||||
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Objects;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* The scheduler job instance according to the properties stored in the database. This is needed in order to have a
|
||||
@@ -17,7 +18,10 @@ import java.util.Objects;
|
||||
@Table(name = "scheduler_job")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SchedulerJob {
|
||||
@EqualsAndHashCode
|
||||
@Cacheable
|
||||
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class SchedulerJob implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -53,22 +57,4 @@ public class SchedulerJob {
|
||||
*/
|
||||
private boolean recovery;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
SchedulerJob that = (SchedulerJob) o;
|
||||
return active == that.active &&
|
||||
recovery == that.recovery &&
|
||||
Objects.equals(id, that.id) &&
|
||||
Objects.equals(name, that.name) &&
|
||||
Objects.equals(groupName, that.groupName) &&
|
||||
Objects.equals(clazz, that.clazz) &&
|
||||
Objects.equals(cronExpression, that.cronExpression);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, groupName, clazz, cronExpression, active, recovery);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user