Created
April 4, 2016 03:00
-
-
Save cosbor11/fa64adaf3f4aa5e45656e7bc025f2b66 to your computer and use it in GitHub Desktop.
Crete and save Book data for index example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create test data | |
| Book harryPotter = new Book(); | |
| harryPotter.setTitle("Harry Potter, Deathly Hallows"); | |
| harryPotter.setDescription("Story about a kid that has abnormal creepy powers that seeks revenge on a poor innocent guy named Voldomort."); | |
| harryPotter.setGenre("CHILDREN"); | |
| Book theGiver = new Book(); | |
| theGiver.setTitle("The Giver"); | |
| theGiver.setDescription("Something about a whole community of color blind people."); | |
| theGiver.setGenre("CHILDREN"); | |
| Book twilight = new Book(); | |
| twilight.setTitle("Twilight"); | |
| twilight.setGenre("CHILDREN"); | |
| twilight.setDescription("Book that lead to awful teenie bopper vampire movie."); | |
| Book longWayDown = new Book(); | |
| longWayDown.setTitle("Long Way Down"); | |
| longWayDown.setGenre("TRAVEL"); | |
| longWayDown.setDescription("Boring story about something I cant remember."); | |
| // Save book data | |
| manager.saveEntity(harryPotter); | |
| manager.saveEntity(theGiver); | |
| manager.saveEntity(twilight); | |
| manager.saveEntity(longWayDown); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment