Index

A C D E F G H I L M N P R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form

A

alreadyExists(String, D) - Static method in exception class dev.akif.crud.error.CRUDErrorException
Builds an "already exists" error as a CRUDErrorException with "409 Conflict" HTTP status for given data

C

clock - Variable in class dev.akif.crud.CRUDService
Clock dependency of this service
code() - Method in record class dev.akif.crud.error.CRUDError
Returns the value of the code record component.
create(CD) - Method in class dev.akif.crud.CRUDController
Default implementation for creating a new entity from given create DTO
create(CM) - Method in class dev.akif.crud.CRUDService
Default implementation for creating a new entity from given create model
createdAt() - Method in interface dev.akif.crud.CRUDDTO
Gets the instant at which this DTO is created
createdAt() - Method in interface dev.akif.crud.CRUDModel
Gets the instant at which this model is created
createdAt() - Method in class dev.akif.crud.simplest.SimplestEntity
 
CRUDController<I extends Serializable,E extends CRUDEntity<I,E>,M extends CRUDModel<I>,D extends CRUDDTO<I>,CM extends CRUDCreateModel<I,E>,UM extends CRUDUpdateModel<I,E>,CD extends CRUDCreateDTO<I,E,CM>,UD extends CRUDUpdateDTO<I,E,UM>,R extends CRUDRepository<I,E>,S extends CRUDService<I,M,E,CM,UM,R>> - Class in dev.akif.crud
Base implementation of a CRUD controller for API layer
CRUDController(String, S) - Constructor for class dev.akif.crud.CRUDController
Constructor to provide type name and dependencies to this controller
CRUDCreateDTO<I extends Serializable,E extends CRUDEntity<I,E>,CM extends CRUDCreateModel<I,E>> - Interface in dev.akif.crud
Base DTO that contains required data to create a new entity
CRUDCreateModel<I extends Serializable,E extends CRUDEntity<I,E>> - Interface in dev.akif.crud
Base model that contains required data to create a new entity
CRUDDTO<I extends Serializable> - Interface in dev.akif.crud
Base DTO of an entity
CRUDEntity<I extends Serializable,E extends CRUDEntity<I,E>> - Class in dev.akif.crud
Base entity of a data model representing its persisted structure
CRUDEntity() - Constructor for class dev.akif.crud.CRUDEntity
Default empty constructor
CRUDError - Record Class in dev.akif.crud.error
Error model of the API operations
CRUDError(int, String, String) - Constructor for record class dev.akif.crud.error.CRUDError
Creates an instance of a CRUDError record class.
CRUDError(HttpStatus, String) - Constructor for record class dev.akif.crud.error.CRUDError
Constructor to create a CRUDError with given data
CRUDErrorException - Exception Class in dev.akif.crud.error
Wrapper for a CRUDError as a RuntimeException so it can be thrown
CRUDErrorException(CRUDError) - Constructor for exception class dev.akif.crud.error.CRUDErrorException
Constructor to create a CRUDErrorException from given error
CRUDErrorHandler - Interface in dev.akif.crud.error
Default ExceptionHandler implementations for CRUDErrorException and unexpected exceptions
CRUDModel<I extends Serializable> - Interface in dev.akif.crud
Base model of a data model
CRUDRepository<I extends Serializable,E extends CRUDEntity<I,E>> - Interface in dev.akif.crud
Base interface of a CRUD repository for data layer
CRUDService<I extends Serializable,M extends CRUDModel<I>,E extends CRUDEntity<I,E>,CM extends CRUDCreateModel<I,E>,UM extends CRUDUpdateModel<I,E>,R extends CRUDRepository<I,E>> - Class in dev.akif.crud
Base implementation of a CRUD service for business layer
CRUDService(String, Clock, R) - Constructor for class dev.akif.crud.CRUDService
Constructor to provide type name and dependencies to this service
CRUDUpdateDTO<I extends Serializable,E extends CRUDEntity<I,E>,UM extends CRUDUpdateModel<I,E>> - Interface in dev.akif.crud
Base DTO that contains required data to update an existing entity
CRUDUpdateModel<I extends Serializable,E extends CRUDEntity<I,E>> - Interface in dev.akif.crud
Base model that contains required data to update an existing entity

D

data() - Method in record class dev.akif.crud.Paged
Returns the value of the data record component.
delete(I) - Method in class dev.akif.crud.CRUDController
Default implementation for deleting an entity with given id
delete(I) - Method in class dev.akif.crud.CRUDService
Default implementation for deleting an entity with given id
deletedAt() - Method in interface dev.akif.crud.CRUDModel
Gets the instant at which this model is deleted
deletedAt() - Method in class dev.akif.crud.simplest.SimplestEntity
 
dev.akif.crud - package dev.akif.crud
spring-boot-crud is a library that provides opinionated, REST-ful and generic CRUD (Create, Read, Update and Delete) operations on data models of a backend API application using Spring Boot.
dev.akif.crud.error - package dev.akif.crud.error
 
dev.akif.crud.simple - package dev.akif.crud.simple
 
dev.akif.crud.simpler - package dev.akif.crud.simpler
 
dev.akif.crud.simplest - package dev.akif.crud.simplest
 

E

equals(Object) - Method in record class dev.akif.crud.error.CRUDError
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class dev.akif.crud.Paged
Indicates whether some other object is "equal to" this one.

F

findAllByDeletedAtIsNull(Pageable) - Method in interface dev.akif.crud.CRUDRepository
Finds all entities for given pagination and deletion flag
findByIdAndDeletedAtIsNull(I) - Method in interface dev.akif.crud.CRUDRepository
Finds an entity with given id and deletion flag
flush() - Method in interface dev.akif.crud.CRUDRepository
Flushes changes made to the entities, meaning any change will be persisted.

G

get(I) - Method in class dev.akif.crud.CRUDController
Default implementation for getting an entity with given id
get(I) - Method in class dev.akif.crud.CRUDService
Default implementation for getting an entity with given id
getAll(int, int) - Method in class dev.akif.crud.CRUDController
Default implementation for listing entities with given pagination
getAll(Pageable) - Method in class dev.akif.crud.CRUDService
Default implementation for listing entities with given pagination
getCreatedAt() - Method in class dev.akif.crud.CRUDEntity
Gets the instant at which this entity is created
getDeletedAt() - Method in class dev.akif.crud.CRUDEntity
Gets the instant at which this entity is logically deleted or null if is not deleted
getId() - Method in class dev.akif.crud.CRUDEntity
Gets identifier of this entity
getUpdatedAt() - Method in class dev.akif.crud.CRUDEntity
Gets the instant at which this entity is last updated
getVersion() - Method in class dev.akif.crud.CRUDEntity
Gets version of this entity used in optimistic locking during persistence

H

handleCRUDError(CRUDErrorException) - Method in interface dev.akif.crud.error.CRUDErrorHandler
Converts CRUDError in this exception into a ResponseEntity with correct status code, media type and body
handleUnexpectedError(Exception) - Method in interface dev.akif.crud.error.CRUDErrorHandler
Converts any exception into a ResponseEntity with 500 Internal Server Error code and a generic message
hashCode() - Method in record class dev.akif.crud.error.CRUDError
Returns a hash code value for this object.
hashCode() - Method in record class dev.akif.crud.Paged
Returns a hash code value for this object.

I

id() - Method in interface dev.akif.crud.CRUDDTO
Gets identifier of this DTO
id() - Method in interface dev.akif.crud.CRUDModel
Gets identifier of this model
id() - Method in class dev.akif.crud.simplest.SimplestEntity
 

L

log - Static variable in interface dev.akif.crud.error.CRUDErrorHandler
Logger for this class

M

map(Function<A, B>) - Method in record class dev.akif.crud.Paged
Converts this Paged into a Paged containing items converted by given mapping function
markAsDeleted(Instant) - Method in class dev.akif.crud.CRUDEntity
Marks this entity as deleted at given time, also setting updated at and incrementing its version
message() - Method in record class dev.akif.crud.error.CRUDError
Returns the value of the message record component.

N

notFound(String, I) - Static method in exception class dev.akif.crud.error.CRUDErrorException
Builds a "not found" error as a CRUDErrorException with "404 Not Found" HTTP status for given id

P

page() - Method in record class dev.akif.crud.Paged
Returns the value of the page record component.
Paged<A> - Record Class in dev.akif.crud
Container of paged data with its pagination info
Paged(List<A>, int, int, int) - Constructor for record class dev.akif.crud.Paged
Creates an instance of a Paged record class.
Paged(Page<A>) - Constructor for record class dev.akif.crud.Paged
Constructor to build a Paged from a Page
perPage() - Method in record class dev.akif.crud.Paged
Returns the value of the perPage record component.
persist(Supplier<A>, D) - Method in class dev.akif.crud.CRUDService
Performs given persisting action

R

repository - Variable in class dev.akif.crud.CRUDService
Repository dependency of this service

S

save(E) - Method in interface dev.akif.crud.CRUDRepository
Saves given entity, used when creating a new entity
service - Variable in class dev.akif.crud.CRUDController
Service dependency of this controller
setCreatedAt(Instant) - Method in class dev.akif.crud.CRUDEntity
Sets the instant at which this entity is created
setDeletedAt(Instant) - Method in class dev.akif.crud.CRUDEntity
Sets the instant at which this entity is logically deleted
setId(I) - Method in class dev.akif.crud.CRUDEntity
Sets identifier of this entity
setUpdatedAt(Instant) - Method in class dev.akif.crud.CRUDEntity
Sets the instant at which this entity is last updated
setVersion(int) - Method in class dev.akif.crud.CRUDEntity
Sets version of this entity used in optimistic locking during persistence
SimpleController<I extends Serializable,E extends SimpleEntity<I,E>,M extends SimpleModel<I,E>,D extends SimpleDTO<I,M,E>,R extends SimpleRepository<I,E>,S extends SimpleService<I,E,M,R>> - Class in dev.akif.crud.simple
Simple variant of CRUDController where create/update models are just models and create/update DTOs are just DTOs directly
SimpleController(String, S) - Constructor for class dev.akif.crud.simple.SimpleController
Constructor to provide type name and dependencies to this controller
SimpleDTO<I extends Serializable,M extends CRUDModel<I> & CRUDCreateModel<I,E> & CRUDUpdateModel<I,E>,E extends CRUDEntity<I,E>> - Interface in dev.akif.crud.simple
Simple version of CRUDDTO where create/update DTOs are just DTOs directly
SimpleEntity<I extends Serializable,E extends CRUDEntity<I,E>> - Class in dev.akif.crud.simple
Simple variant of CRUDEntity
SimpleEntity() - Constructor for class dev.akif.crud.simple.SimpleEntity
Default empty constructor
SimpleModel<I extends Serializable,E extends CRUDEntity<I,E>> - Interface in dev.akif.crud.simple
Simple variant of CRUDModel which is also a CRUDCreateModel and a CRUDUpdateModel
SimplerController<I extends Serializable,E extends SimplerEntity<I,E>,M extends SimplerModel<I,E,M>,R extends SimplerRepository<I,E>,S extends SimplerService<I,E,M,R>> - Class in dev.akif.crud.simpler
Simpler variant of CRUDController where create/update models and DTOs are just models
SimplerController(String, S) - Constructor for class dev.akif.crud.simpler.SimplerController
Constructor to provide type name and dependencies to this controller
SimplerEntity<I extends Serializable,E extends CRUDEntity<I,E>> - Class in dev.akif.crud.simpler
Simpler variant of CRUDEntity
SimplerEntity() - Constructor for class dev.akif.crud.simpler.SimplerEntity
Default empty constructor
SimpleRepository<I extends Serializable,E extends SimpleEntity<I,E>> - Interface in dev.akif.crud.simple
Simple variant of CRUDRepository
SimplerModel<I extends Serializable,E extends CRUDEntity<I,E>,M extends CRUDModel<I> & CRUDCreateModel<I,E> & CRUDUpdateModel<I,E>> - Interface in dev.akif.crud.simpler
Simpler variant of CRUDModel which is also a CRUDCreateModel, a CRUDUpdateModel, a CRUDDTO, a CRUDCreateDTO and a CRUDUpdateDTO
SimplerRepository<I extends Serializable,E extends SimplerEntity<I,E>> - Interface in dev.akif.crud.simpler
Simpler variant of CRUDRepository
SimplerService<I extends Serializable,E extends SimplerEntity<I,E>,M extends SimplerModel<I,E,M>,R extends SimplerRepository<I,E>> - Class in dev.akif.crud.simpler
Simpler variant of CRUDService where create/update models are just models directly
SimplerService(String, Clock, R) - Constructor for class dev.akif.crud.simpler.SimplerService
Constructor to provide type name and dependencies to this service
SimpleService<I extends Serializable,E extends SimpleEntity<I,E>,M extends SimpleModel<I,E>,R extends SimpleRepository<I,E>> - Class in dev.akif.crud.simple
Simple variant of CRUDService where create/update models are just models directly
SimpleService(String, Clock, R) - Constructor for class dev.akif.crud.simple.SimpleService
Constructor to provide type name and dependencies to this service
SimplestController<I extends Serializable,E extends SimplestEntity<I,E>,R extends SimplestRepository<I,E>,S extends SimplestService<I,E,R>> - Class in dev.akif.crud.simplest
The simplest variant of CRUDController where the only data model is the entity
SimplestController(String, S) - Constructor for class dev.akif.crud.simplest.SimplestController
Constructor to provide type name and dependencies to this controller
SimplestEntity<I extends Serializable,E extends CRUDEntity<I,E> & CRUDCreateModel<I,E> & CRUDUpdateModel<I,E> & CRUDCreateDTO<I,E,E> & CRUDUpdateDTO<I,E,E>> - Class in dev.akif.crud.simplest
Simpler variant of CRUDEntity which is also a CRUDModel, a CRUDCreateModel, a CRUDUpdateModel, a CRUDDTO, a CRUDCreateDTO and a CRUDUpdateDTO
SimplestEntity() - Constructor for class dev.akif.crud.simplest.SimplestEntity
Default empty constructor
SimplestRepository<I extends Serializable,E extends SimplestEntity<I,E>> - Interface in dev.akif.crud.simplest
The simplest variant of CRUDRepository
SimplestService<I extends Serializable,E extends SimplestEntity<I,E>,R extends SimplestRepository<I,E>> - Class in dev.akif.crud.simplest
The simplest variant of CRUDService where models are entities directly
SimplestService(String, Clock, R) - Constructor for class dev.akif.crud.simplest.SimplestService
Constructor to provide type name and dependencies to this service

T

toDTO(E) - Method in class dev.akif.crud.simplest.SimplestController
 
toDTO(M) - Method in class dev.akif.crud.CRUDController
Mapper to convert from model to DTO
toDTO(M) - Method in class dev.akif.crud.simpler.SimplerController
 
toModel(E) - Method in class dev.akif.crud.CRUDService
Mapper to convert from entity to model
toModel(E) - Method in class dev.akif.crud.simplest.SimplestService
 
toString() - Method in record class dev.akif.crud.error.CRUDError
Returns a string representation of this record class.
toString() - Method in record class dev.akif.crud.Paged
Returns a string representation of this record class.
totalPages() - Method in record class dev.akif.crud.Paged
Returns the value of the totalPages record component.
type - Variable in class dev.akif.crud.CRUDController
Type name of the data this controller manages
type - Variable in class dev.akif.crud.CRUDService
Type name of the data this service manages
type() - Method in record class dev.akif.crud.error.CRUDError
Returns the value of the type record component.

U

update(I, UD) - Method in class dev.akif.crud.CRUDController
Default implementation for updating an entity with given id with given update DTO data
update(I, UM) - Method in class dev.akif.crud.CRUDService
Default implementation for updating an entity with given id with given update model data
updateByVersion(E, int) - Method in interface dev.akif.crud.CRUDRepository
Updates given entity if it is at given version
updatedAt() - Method in interface dev.akif.crud.CRUDDTO
Gets the instant at which this DTO is last updated
updatedAt() - Method in interface dev.akif.crud.CRUDModel
Gets the instant at which this model is last updated
updatedAt() - Method in class dev.akif.crud.simplest.SimplestEntity
 
updatedNow(Instant) - Method in class dev.akif.crud.CRUDEntity
Marks this entity as updated at given time, also incrementing its version
updatingFieldsOf(E) - Method in interface dev.akif.crud.CRUDUpdateModel
Applies updates contained in this model to given entity

V

version() - Method in interface dev.akif.crud.CRUDModel
Gets version of this model
version() - Method in class dev.akif.crud.simplest.SimplestEntity
 

W

withFieldsToCreate() - Method in interface dev.akif.crud.CRUDCreateDTO
Mapper to convert this create DTO into a create model
withFieldsToCreate(Instant) - Method in interface dev.akif.crud.CRUDCreateModel
Mapper to convert this model into an entity to be created
withFieldsToUpdate() - Method in interface dev.akif.crud.CRUDUpdateDTO
Mapper to convert this update DTO into a update model
A C D E F G H I L M N P R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form