Bat/src/main/java/cc/fascinated/bat/common/Serializable.java
Liam d372c41c98
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 44s
big ass refactor to handle loading guilds and users without spring to make it more futureproof
2024-07-01 01:12:32 +01:00

37 lines
837 B
Java

package cc.fascinated.bat.common;
import com.google.gson.Gson;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.bson.Document;
/**
* @author Fascinated (fascinated7)
*/
@Setter
@Getter
@NoArgsConstructor
public abstract class Serializable {
/**
* Load data from the provided document into this profile
*
* @param document the document to load data from
* @param gson the GSON instance to use
*/
public abstract void load(Document document, Gson gson);
/**
* Serialize this profile into a Bson document
*
* @param gson the GSON instance to use
* @return the serialized document
*/
public abstract Document serialize(Gson gson);
/**
* Resets the profile to its default state
*/
public abstract void reset();
}