Created
April 4, 2016 02:58
-
-
Save cosbor11/ce4c0e9ce6affbb099e1c018d9ce605a to your computer and use it in GitHub Desktop.
Define a Book entity with an indexed field genre
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
| @Entity | |
| public class Book extends ManagedEntity implements IManagedEntity | |
| { | |
| @Identifier(generator = IdentifierGenerator.SEQUENCE) | |
| @Attribute | |
| protected long bookId; | |
| @Attribute | |
| protected String title; | |
| @Index | |
| @Attribute | |
| protected String genre; | |
| @Attribute | |
| protected String description; | |
| // Getters and setters | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment