Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Created April 4, 2016 03:00
Show Gist options
  • Select an option

  • Save cosbor11/fa64adaf3f4aa5e45656e7bc025f2b66 to your computer and use it in GitHub Desktop.

Select an option

Save cosbor11/fa64adaf3f4aa5e45656e7bc025f2b66 to your computer and use it in GitHub Desktop.
Crete and save Book data for index example
// 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