@Repository public interface ServerPackRepository extends org.springframework.data.repository.CrudRepository<ServerPackModel,java.lang.Integer>
ServerPackModels to and from our SQLite
database. Provides methods for retrieving, storing, deleting. Calls must always be made from
ServerPackService and not directly to this repository. It may seem strange, but this
accomplishes a couple of things:| Modifier and Type | Method and Description |
|---|---|
int |
countAllByProjectName(java.lang.String projectName)
Count all server packs by a CurseForge project name.
|
java.util.Optional<java.util.List<ServerPackModel>> |
findAllByProjectName(java.lang.String projectName)
Find all server packs using a CurseForge project name.
|
java.util.Optional<ServerPackModel> |
findByFileName(java.lang.String fileName)
Find a server pack by its CurseForge file display name.
|
java.util.Optional<java.util.List<ServerPackModel>> |
findByStatus(java.lang.String status)
Find all server packs by their status.
|
java.util.Optional<java.util.List<ServerPackModel>> findAllByProjectName(java.lang.String projectName)
projectName - The project name with which to search for server packs.Optional. I recommend to make use of Optional.isPresent() and
Optional.get().java.util.Optional<ServerPackModel> findByFileName(java.lang.String fileName)
fileName - The CurseForge file display name with which to search for a server pack.Optional.
I recommend to make use of Optional.isPresent() and Optional.get().java.util.Optional<java.util.List<ServerPackModel>> findByStatus(java.lang.String status)
status - The status with which to search for server packs.Optional. I
recommend to make use of Optional.isPresent() and Optional.get().int countAllByProjectName(java.lang.String projectName)
projectName - The CurseForge project name with which to count all server packs.