Created
October 28, 2012 08:35
-
-
Save stephanos/3968069 to your computer and use it in GitHub Desktop.
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
| public class ClassDeclarationSyntaxInJava { | |
| public abstract class AbstractDTO { | |
| private final Long id; | |
| public AbstractDTO(Long id) { | |
| this.id = id; | |
| } | |
| public Long getId() { | |
| return id; | |
| } | |
| } | |
| public class CustomerDTO extends AbstractDTO { | |
| private String name; | |
| private List<String> roles; | |
| public CustomerDTO(Long id, String name, List<String> roles) { | |
| super(id); | |
| this.name = name; | |
| this.roles = roles; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| public List<String> getRoles() { | |
| return roles; | |
| } | |
| public void setRoles(List<String> roles) { | |
| this.roles = roles; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment