1 /* 2 * 3 * Created on 16-Dec-2003 4 * 5 * @author timp@paneris.org 6 * 7 */ 8 package org.paneris.melati.site.model; 9 10 import org.melati.poem.AccessPoemException; 11 import org.melati.poem.Field; 12 import org.melati.poem.NoSuchRowPoemException; 13 14 /** 15 * An object with a template field. 16 * 17 * @author timp@paneris.org 18 * 19 */ 20 public interface Templated { 21 /** 22 * Retrieves the <code>Template</code> value, without locking, 23 * for this <code>Page</code> <code>Persistent</code>. 24 * 25 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 26 * @return the Integer template 27 */ 28 29 Integer getTemplate_unsafe(); 30 /** 31 * Sets the <code>Template</code> value directly, without checking, 32 * for this Page <code>Persistent</code>. 33 * 34 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 35 * @param cooked the pre-validated value to set 36 */ 37 38 void setTemplate_unsafe(Integer cooked); 39 /** 40 * Retrieves the Table Row Object ID. 41 * 42 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods 43 * @throws AccessPoemException 44 * if the current <code>AccessToken</code> 45 * does not confer read access rights 46 * @return the TROID as an <code>Integer</code> 47 */ 48 49 Integer getTemplateTroid() throws AccessPoemException; 50 /** 51 * Sets the Table Row Object ID. 52 * 53 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods 54 * @param raw a Table Row Object Id 55 * @throws AccessPoemException 56 * if the current <code>AccessToken</code> 57 * does not confer write access rights 58 */ 59 void setTemplateTroid(Integer raw) 60 throws AccessPoemException; 61 62 /** 63 * Retrieves the <code>Template</code> object reffered to. 64 * 65 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods 66 * @throws AccessPoemException 67 * if the current <code>AccessToken</code> 68 * does not confer read access rights 69 * @throws NoSuchRowPoemException 70 * if the <Persistent</code> has yet to be allocated a TROID 71 * @return the <code>Template</code> as a <code>Template</code> 72 */ 73 Template getTemplate() 74 throws AccessPoemException, NoSuchRowPoemException; 75 76 /** 77 * Set the Template. 78 * 79 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods 80 * @param cooked a validated <code>Template</code> 81 * @throws AccessPoemException 82 * if the current <code>AccessToken</code> 83 * does not confer write access rights 84 */ 85 void setTemplate(Template cooked) throws AccessPoemException; 86 87 /** 88 * Retrieves the <code>Template</code> value as a <code>Field</code> 89 * from this <code>Page</code> <code>Persistent</code>. 90 * 91 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator 92 * @throws AccessPoemException 93 * if the current <code>AccessToken</code> 94 * does not confer write access rights 95 * @return the Integer template 96 */ 97 Field getTemplateField() throws AccessPoemException; 98 }