From the course: Building RESTful Web Services with DropWizard

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Finalize your data model

Finalize your data model

- [Instructor] Okay, so let's keep going with the same file. So we'll continue with writing two functions that will need to return all the elements of the database. So we're going to start with public, person and define a function that will return person like so. And let's go ahead and copy that 'cause we're going to need a lot of those. So next we're going to do the person now that we've defined it will define what it takes. So it takes a string full name, string, job title, and the integer for year born. And then what we'll need to do is this dot full name equals full name. And you can copy and paste if you want just to shorten the amount of time we're working on this this dot year born equals year born. Perfect, so now let's continue, we're going to do a function that will return the Id, so let's go ahead and do long. Get Id, like so. And this will return the Id. And let's do another one. And this one…

Contents