View Javadoc
1   package com.atlassian.activeobjects.test.model;
2   
3   import net.java.ao.Accessor;
4   import net.java.ao.ManyToMany;
5   import net.java.ao.Mutator;
6   import net.java.ao.RawEntity;
7   import net.java.ao.schema.NotNull;
8   import net.java.ao.schema.PrimaryKey;
9   import net.java.ao.schema.StringLength;
10  
11  import java.util.Date;
12  
13  public interface Book extends RawEntity<Long> {
14      @PrimaryKey
15      @NotNull
16      long getIsbn();
17  
18      void setIsbn(long isbn);
19  
20      @StringLength(255)
21      String getTitle();
22  
23      @StringLength(255)
24      void setTitle(String name);
25  
26      @StringLength(StringLength.UNLIMITED)
27      String getAbstract();
28  
29      @StringLength(StringLength.UNLIMITED)
30      void setAbstract(String bookAbstract);
31  
32      double getPrice();
33  
34      void setPrice(double price);
35  
36      /**
37       * Whether this has been read by the user.
38       */
39      @Accessor("IS_READ")
40      boolean isRead();
41  
42      @Mutator("IS_READ")
43      void setRead(boolean read);
44  
45      Date getPublished();
46  
47      void setPublished(Date date);
48  
49      Integer getNumberOfPages();
50  
51      void setNumberOfPages(Integer pages);
52  
53      @ManyToMany(Authorship.class)
54      Author[] getAuthors();
55  }