Skip to content

Commit

Permalink
SIS-39: fix - commented out 'generateFakeDate' to make code compilable
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblykat committed Mar 25, 2024
1 parent 93ffc23 commit fc24109
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions src/main/java/sg/com/smartinventory/utility/DataLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ public DataLoader(CustomerRepository customerRepository, ProductRepository produ

@PostConstruct
public void loadData() {
// Clear all data.
clearTableData();
// // Clear all data.
// clearTableData();

// Create fake data.
generateFakeData();
}
// // Create fake data.
// generateFakeData();
// }

public void clearTableData() {
// public void clearTableData() {
// Clear all data.
customerRepository.deleteAll();
productRepository.deleteAll();
reviewRepository.deleteAll();
}
// }

// <<<<<<< SIS-39
// <<<<<<< SIS-39
// = = = CUSTOMER DATA = = =
Customer customer1 = customerRepository
.save(new Customer("John", "Doe", "USA", "123 Main St", 123456, 12345678,
Expand All @@ -62,20 +62,25 @@ public void clearTableData() {
Customer customer5 = customerRepository
.save(new Customer("David", "Wilson", "Germany", "654 Pine Rd", 987655, 36985214,
"[email protected]"));
// =======
// public void generateFakeData() {
// // Create fake data.
// customerRepository.save(new Customer("John", "Doe", "USA", "123 Main St", 123456, 12345678,
// "[email protected]"));
// customerRepository.save(new Customer("Alice", "Smith", "Canada", "456 Maple Ave", 543210, 98765432,
// "[email protected]"));
// customerRepository.save(new Customer("Michael", "Johnson", "UK", "789 Oak Rd", 567890, 98761234,
// "[email protected]"));
// customerRepository.save(new Customer("Emily", "Brown", "Australia", "321 Elm St", 135790, 45678912,
// "[email protected]"));
// customerRepository.save(new Customer("David", "Wilson", "Germany", "654 Pine Rd", 987655, 36985214,
// "[email protected]"));
// >>>>>>> main
// =======
// public void generateFakeData() {
// // Create fake data.
// customerRepository.save(new Customer("John", "Doe", "USA", "123 Main St",
// 123456, 12345678,
// "[email protected]"));
// customerRepository.save(new Customer("Alice", "Smith", "Canada", "456 Maple
// Ave", 543210, 98765432,
// "[email protected]"));
// customerRepository.save(new Customer("Michael", "Johnson", "UK", "789 Oak
// Rd", 567890, 98761234,
// "[email protected]"));
// customerRepository.save(new Customer("Emily", "Brown", "Australia", "321 Elm
// St", 135790, 45678912,
// "[email protected]"));
// customerRepository.save(new Customer("David", "Wilson", "Germany", "654 Pine
// Rd", 987655, 36985214,
// "[email protected]"));
// >>>>>>> main

// = = = REVIEW DATA = = =
// Adding review data (note that the "same" review object is being used in all,
Expand Down

0 comments on commit fc24109

Please sign in to comment.