View Javadoc

1   package org.paneris.melati.site.model;
2   
3   import org.paneris.melati.site.model.generated.UploadedDocumentTableBase;
4   import org.melati.poem.DefinitionSource;
5   import org.melati.poem.Database;
6   import org.melati.poem.PoemException;
7   
8   /**
9    * Melati POEM generated, programmer modifiable stub 
10   * for a <code>UploadedDocumentTable</code> object.
11   * <p>
12   * Description: 
13   *   A document uploaded by a user. 
14   * </p>
15   *
16   * 
17   * <table> 
18   * <tr><th colspan='3'>
19   * Field summary for SQL table <code>UploadedDocument</code>
20   * </th></tr>
21   * <tr><th>Name</th><th>Type</th><th>Description</th></tr>
22   * <tr><td> id </td><td> Integer </td><td> &nbsp; </td></tr> 
23   * <tr><td> url </td><td> String </td><td> The name of the file, as uploaded 
24   * </td></tr> 
25   * </table> 
26   * 
27   * @see  org.melati.poem.prepro.TableDef#generateTableJava 
28   */
29  public class UploadedDocumentTable extends UploadedDocumentTableBase {
30  
31   /**
32    * Constructor.
33    * 
34    * @see org.melati.poem.prepro.TableDef#generateTableJava 
35    * @param database          the POEM database we are using
36    * @param name              the name of this <code>Table</code>
37    * @param definitionSource  which definition is being used
38    * @throws PoemException    if anything goes wrong
39    */
40    public UploadedDocumentTable(
41        Database database, String name,
42        DefinitionSource definitionSource) throws PoemException {
43      super(database, name, definitionSource);
44    }
45  
46    // programmer's domain-specific code here
47    
48    /**
49     * @return the relative url 
50     */
51    public String getRelativeUrl() {
52      return "/docs";
53    }
54  
55  }
56