Index
All Classes and Interfaces|All Packages
A
- apply(String) - Method in class net.daveray.rewardsapi.func.CalculatePointsFunction
-
Points rules (amount - 50) x 1 + (amount - 100) x 1
- apply(List<Map<String, Object>>) - Method in class net.daveray.rewardsapi.func.MonthlyRewardsFunction
C
- CalculatePointsFunction - Class in net.daveray.rewardsapi.func
-
CalculatePointsFunction calculate the total points for a transaction using the formula
- CalculatePointsFunction() - Constructor for class net.daveray.rewardsapi.func.CalculatePointsFunction
- canEqual(Object) - Method in class net.daveray.rewardsapi.data.Transactions
- catchNotFoundExceptions() - Method in class net.daveray.rewardsapi.rest.ErrorController
-
Wraps HttpStatus.NOT_FOUND and re-throws as RuntimeException
D
- DataLoader - Class in net.daveray.rewardsapi.util
-
DataLoader loads batch data into the database using the repository by reading a file in src/main/resources/rewards-api_transaction-list.json if the file is not present, calls DataWrangler to generate the file
- DataLoader() - Constructor for class net.daveray.rewardsapi.util.DataLoader
- DataWrangler - Class in net.daveray.rewardsapi.util
-
DataWrangler generates sample data for transactions
- DataWrangler() - Constructor for class net.daveray.rewardsapi.util.DataWrangler
E
- equals(Object) - Method in class net.daveray.rewardsapi.data.Transactions
- error() - Method in class net.daveray.rewardsapi.rest.RewardsController
- ErrorController - Class in net.daveray.rewardsapi.rest
-
ErrorController to catch unknown errors causing 404 responses to be thrown by spring-mvc or the RestController
- ErrorController() - Constructor for class net.daveray.rewardsapi.rest.ErrorController
G
- generateJsonDatafile(Path) - Static method in class net.daveray.rewardsapi.util.DataWrangler
- getAmount() - Method in class net.daveray.rewardsapi.data.Transactions
- getCustomerId() - Method in class net.daveray.rewardsapi.data.Transactions
- getId() - Method in class net.daveray.rewardsapi.data.Transactions
- getLemois() - Method in class net.daveray.rewardsapi.data.Transactions
- getMonid() - Method in class net.daveray.rewardsapi.data.Transactions
- getName() - Method in class net.daveray.rewardsapi.data.Transactions
- getUnixtime() - Method in class net.daveray.rewardsapi.data.Transactions
- getVersion() - Method in class net.daveray.rewardsapi.data.Transactions
- GlobalExceptionHandler - Class in net.daveray.rewardsapi.rest
-
GlobalExceptionHandler handles exceptions thrown by the RestController by preparing a suitable JSON Map and returning a ResponseEntity
- GlobalExceptionHandler() - Constructor for class net.daveray.rewardsapi.rest.GlobalExceptionHandler
H
- hashCode() - Method in class net.daveray.rewardsapi.data.Transactions
M
- main(String[]) - Static method in class net.daveray.rewardsapi.RewardsApiApplication
- MonthlyRewardsFunction - Class in net.daveray.rewardsapi.func
-
MonthlyRewardsFunction provides the business logic to transform a transaction query into an ApiResult.
- MonthlyRewardsFunction() - Constructor for class net.daveray.rewardsapi.func.MonthlyRewardsFunction
N
- net.daveray.rewardsapi - package net.daveray.rewardsapi
- net.daveray.rewardsapi.data - package net.daveray.rewardsapi.data
- net.daveray.rewardsapi.func - package net.daveray.rewardsapi.func
- net.daveray.rewardsapi.rest - package net.daveray.rewardsapi.rest
- net.daveray.rewardsapi.srvc - package net.daveray.rewardsapi.srvc
- net.daveray.rewardsapi.util - package net.daveray.rewardsapi.util
Q
- QueryService - Class in net.daveray.rewardsapi.srvc
-
QueryService provides JDBC flavored persistence contains the sql queries and executes prepared statements returning data to the RewardsService
- QueryService() - Constructor for class net.daveray.rewardsapi.srvc.QueryService
R
- rewardsAll() - Method in class net.daveray.rewardsapi.rest.RewardsController
- rewardsAll() - Method in class net.daveray.rewardsapi.srvc.QueryService
- rewardsAll() - Method in class net.daveray.rewardsapi.srvc.RewardsService
- rewardsAllMonths(String) - Method in class net.daveray.rewardsapi.rest.RewardsController
- rewardsAllMonths(String) - Method in class net.daveray.rewardsapi.srvc.QueryService
- rewardsAllMonths(String) - Method in class net.daveray.rewardsapi.srvc.RewardsService
- RewardsApiApplication - Class in net.daveray.rewardsapi
-
RewardsApi SpringBoot Application
- RewardsApiApplication(ResourceLoader) - Constructor for class net.daveray.rewardsapi.RewardsApiApplication
- RewardsController - Class in net.daveray.rewardsapi.rest
-
RewardsController is the RestController for the API provides the Rest API endpoints - http://localhost:8080/api/v1/rewards - http://localhost:8080/api/v1/rewards/{month} - http://localhost:8080/api/v1/rewards/{month}/{customerId} - http://localhost:8080/api/v1/rewards/{firstMonth}/{customerId}/{lastMonth}
- RewardsController() - Constructor for class net.daveray.rewardsapi.rest.RewardsController
- RewardsService - Class in net.daveray.rewardsapi.srvc
-
RewardsService contains the primary business logic at the service layer calls the QueryService to retrieve transaction data returns apiResponse to the RestController
- RewardsService() - Constructor for class net.daveray.rewardsapi.srvc.RewardsService
- rewardsSingle(String, String) - Method in class net.daveray.rewardsapi.rest.RewardsController
- rewardsSingle(String, String) - Method in class net.daveray.rewardsapi.srvc.QueryService
- rewardsSingle(String, String) - Method in class net.daveray.rewardsapi.srvc.RewardsService
- rewardsSingleMonths(int, String, int) - Method in class net.daveray.rewardsapi.srvc.QueryService
- rewardsSingleMonths(String, String, String) - Method in class net.daveray.rewardsapi.rest.RewardsController
- rewardsSingleMonths(String, String, String) - Method in class net.daveray.rewardsapi.srvc.RewardsService
- run(String...) - Method in class net.daveray.rewardsapi.util.DataLoader
S
- setAmount(String) - Method in class net.daveray.rewardsapi.data.Transactions
- setCustomerId(Integer) - Method in class net.daveray.rewardsapi.data.Transactions
- setId(String) - Method in class net.daveray.rewardsapi.data.Transactions
- setLemois(String) - Method in class net.daveray.rewardsapi.data.Transactions
- setMonid(String) - Method in class net.daveray.rewardsapi.data.Transactions
- setName(String) - Method in class net.daveray.rewardsapi.data.Transactions
- setUnixtime(Long) - Method in class net.daveray.rewardsapi.data.Transactions
- setVersion(Integer) - Method in class net.daveray.rewardsapi.data.Transactions
T
- toString() - Method in class net.daveray.rewardsapi.data.Transactions
- TransactionRepository - Interface in net.daveray.rewardsapi.data
-
TransactionRepository used by the DataLoader to load the tranaction batch at application startup
- Transactions - Class in net.daveray.rewardsapi.data
-
JDBC style @Table with lombok style @Data and @NoArgsConstructor to support Jackson
- Transactions() - Constructor for class net.daveray.rewardsapi.data.Transactions
All Classes and Interfaces|All Packages