View Javadoc

1   package org.paneris.bibliomania;
2   
3   import org.melati.poem.Database;
4   import org.melati.poem.DefinitionSource;
5   import org.melati.poem.PoemException;
6   import org.paneris.bibliomania.generated.SectionGroupTableBase;
7   
8   public class SectionGroupTable<T extends SectionGroup> extends SectionGroupTableBase<SectionGroup> {
9   
10    public SectionGroupTable(
11        Database database, String name,
12        DefinitionSource definitionSource) throws PoemException {
13      super(database, name, definitionSource);
14    }
15  
16    public SectionGroup ensure(
17        String themecolour,
18        String imagename, String image1file, String image2file,
19        String imagenum, String displayname, String subtext, boolean generic,
20        String urlprefix) {
21      SectionGroup s = (SectionGroup)newPersistent();
22      s.setThemecolour(themecolour);
23      s.setImagename(imagename);
24      s.setImage1file(image1file);
25      s.setImage2file(image2file);
26      s.setImagenum(imagenum);
27      s.setDisplayname(displayname);
28      s.setSubtext(subtext);
29      s.setGeneric(generic);
30      s.setUrlprefix(urlprefix);
31      s.setPath(imagename);       // FIXME!!
32      s.setDeleted(false);
33      
34      return (SectionGroup)getDisplaynameColumn().ensure(s);
35    }
36  }