1 package org.paneris.bibliomania; 2 3 4 import org.paneris.bibliomania.generated.UnitTableBase; 5 import org.melati.poem.DefinitionSource; 6 import org.melati.poem.Database; 7 import org.melati.poem.PoemException; 8 9 /** 10 * Melati POEM generated, programmer modifiable stub 11 * for a <code>UnitTable</code> object. 12 * 13 * 14 * <table> 15 * <tr><th colspan='3'> 16 * Field summary for SQL table <code>Unit</code> 17 * </th></tr> 18 * <tr><th>Name</th><th>Type</th><th>Description</th></tr> 19 * <tr><td> path </td><td> String </td><td> The path to this unit in the 20 * local filesystem, relative to the application's workspace </td></tr> 21 * <tr><td> deleted </td><td> Boolean </td><td> Whether or not to include 22 * this Unit </td></tr> 23 * <tr><td> lastencached </td><td> Timestamp </td><td> When the unit was 24 * encached; cleared when the unit is updated </td></tr> 25 * <tr><td> layout </td><td> Layout </td><td> The name of the layout for this 26 * Unit </td></tr> 27 * <tr><td> messageboard </td><td> Board </td><td> A messageboard on which 28 * this unit can be discussed </td></tr> 29 * </table> 30 * 31 * see org.melati.poem.prepro.TableDef#generateTableJava 32 */ 33 public class UnitTable<T extends Unit> extends UnitTableBase<Unit> { 34 35 /** 36 * Constructor. 37 * 38 * see org.melati.poem.prepro.TableDef#generateTableJava 39 * @param database the POEM database we are using 40 * @param name the name of this <code>Table</code> 41 * @param definitionSource which definition is being used 42 * @throws PoemException if anything goes wrong 43 */ 44 public UnitTable( 45 Database database, String name, 46 DefinitionSource definitionSource) throws PoemException { 47 super(database, name, definitionSource); 48 } 49 50 // programmer's domain-specific code here 51 52 53 public Unit unitWithPath(String path) { 54 return (Unit)getPathColumn().firstWhereEq(path); 55 } 56 } 57