// Do not edit this file!  It was generated by Melati POEM's DSD preprocessor.

package org.melati.poem.test.generated;


import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;
import org.melati.poem.AccessPoemException;
import org.melati.poem.BigDecimalPoemType;
import org.melati.poem.BinaryPoemType;
import org.melati.poem.BooleanPoemType;
import org.melati.poem.Column;
import org.melati.poem.Database;
import org.melati.poem.DatePoemType;
import org.melati.poem.DefinitionSource;
import org.melati.poem.DisplayLevel;
import org.melati.poem.DoublePoemType;
import org.melati.poem.Field;
import org.melati.poem.IntegerPoemType;
import org.melati.poem.LongPoemType;
import org.melati.poem.PasswordPoemType;
import org.melati.poem.Persistent;
import org.melati.poem.PoemException;
import org.melati.poem.Searchability;
import org.melati.poem.StringPoemType;
import org.melati.poem.TimestampPoemType;
import org.melati.poem.ValidationPoemException;
import org.melati.poem.test.EverythingAbstract;
import org.melati.poem.test.EverythingDatabaseTables;
import org.melati.poem.test.EverythingTable;


/**
 * Melati POEM generated base class for 
<code>Table</code> <code>EverythingAbstract</code>.
 *
 * @see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 */

public class EverythingAbstractTableBase extends EverythingTable {

  private Column<byte[]> col_binaryfield = null;
  private Column<String> col_stringfield = null;
  private Column<String> col_passwordfield = null;
  private Column<Boolean> col_booleanfield = null;
  private Column<Date> col_datefield = null;
  private Column<Double> col_doublefield = null;
  private Column<Integer> col_integerfield = null;
  private Column<Long> col_longfield = null;
  private Column<BigDecimal> col_bigdecimalfield = null;
  private Column<Timestamp> col_timestampfield = null;

 /**
  * Constructor. 
  * 
  * @see org.melati.poem.prepro.TableDef#generateTableBaseJava 
  * @param database          the POEM database we are using
  * @param name              the name of this <code>Table</code>
  * @param definitionSource  which definition is being used
  * @throws PoemException    if anything goes wrong
  */

  public EverythingAbstractTableBase(
      Database database, String name,
      DefinitionSource definitionSource) throws PoemException {
    super(database, name, definitionSource);
  }


 /**
  * Get the database tables.
  *
  * @see org.melati.poem.prepro.TableDef#generateTableBaseJava 
  * @return the database tables
  */
  public EverythingDatabaseTables getEverythingDatabaseTables() {
    return (EverythingDatabaseTables)getDatabase();
  }

  public void init() throws PoemException {
    super.init();
    defineColumn(col_binaryfield =
        new Column<byte[]>(this, "binaryfield",
                   new BinaryPoemType(true, 13),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getBinaryfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setBinaryfield((byte[])cooked);
          }

          public Field<byte[]> asField(Persistent g) {
            return ((EverythingAbstract)g).getBinaryfieldField();
          }

          protected boolean defaultUserEditable() {
            return false;
          }

          protected boolean defaultUserCreateable() {
            return false;
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.no;
          }

          protected String defaultDisplayName() {
            return "Binaryfield";
          }

          protected int defaultDisplayOrder() {
            return 1;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getBinaryfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setBinaryfield_unsafe((byte[])raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getBinaryfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setBinaryfield((byte[])raw);
          }
        });

    defineColumn(col_stringfield =
        new Column<String>(this, "stringfield",
                   new StringPoemType(true, 23),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getStringfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setStringfield((String)cooked);
          }

          public Field<String> asField(Persistent g) {
            return ((EverythingAbstract)g).getStringfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "String Field";
          }

          protected int defaultDisplayOrder() {
            return 2;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 3;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getStringfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setStringfield_unsafe((String)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getStringfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setStringfield((String)raw);
          }
        });

    defineColumn(col_passwordfield =
        new Column<String>(this, "passwordfield",
                   new PasswordPoemType(true, 23),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getPasswordfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setPasswordfield((String)cooked);
          }

          public Field<String> asField(Persistent g) {
            return ((EverythingAbstract)g).getPasswordfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Password Field";
          }

          protected int defaultDisplayOrder() {
            return 3;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 3;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getPasswordfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setPasswordfield_unsafe((String)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getPasswordfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setPasswordfield((String)raw);
          }
        });

    defineColumn(col_booleanfield =
        new Column<Boolean>(this, "booleanfield",
                   new BooleanPoemType(true),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getBooleanfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setBooleanfield((Boolean)cooked);
          }

          public Field<Boolean> asField(Persistent g) {
            return ((EverythingAbstract)g).getBooleanfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Boolean Field";
          }

          protected int defaultDisplayOrder() {
            return 4;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getBooleanfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setBooleanfield_unsafe((Boolean)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getBooleanfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setBooleanfield((Boolean)raw);
          }
        });

    defineColumn(col_datefield =
        new Column<Date>(this, "datefield",
                   new DatePoemType(true),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getDatefield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setDatefield((Date)cooked);
          }

          public Field<Date> asField(Persistent g) {
            return ((EverythingAbstract)g).getDatefieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Date Field";
          }

          protected int defaultDisplayOrder() {
            return 5;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getDatefield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setDatefield_unsafe((Date)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getDatefield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setDatefield((Date)raw);
          }
        });

    defineColumn(col_doublefield =
        new Column<Double>(this, "doublefield",
                   new DoublePoemType(true),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getDoublefield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setDoublefield((Double)cooked);
          }

          public Field<Double> asField(Persistent g) {
            return ((EverythingAbstract)g).getDoublefieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Double Field";
          }

          protected int defaultDisplayOrder() {
            return 6;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getDoublefield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setDoublefield_unsafe((Double)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getDoublefield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setDoublefield((Double)raw);
          }
        });

    defineColumn(col_integerfield =
        new Column<Integer>(this, "integerfield",
                   new IntegerPoemType(true),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getIntegerfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setIntegerfield((Integer)cooked);
          }

          public Field<Integer> asField(Persistent g) {
            return ((EverythingAbstract)g).getIntegerfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Integer Field";
          }

          protected int defaultDisplayOrder() {
            return 7;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getIntegerfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setIntegerfield_unsafe((Integer)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getIntegerfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setIntegerfield((Integer)raw);
          }
        });

    defineColumn(col_longfield =
        new Column<Long>(this, "longfield",
                   new LongPoemType(true),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getLongfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setLongfield((Long)cooked);
          }

          public Field<Long> asField(Persistent g) {
            return ((EverythingAbstract)g).getLongfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Long Field";
          }

          protected int defaultDisplayOrder() {
            return 8;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getLongfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setLongfield_unsafe((Long)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getLongfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setLongfield((Long)raw);
          }
        });

    defineColumn(col_bigdecimalfield =
        new Column<BigDecimal>(this, "bigdecimalfield",
                   new BigDecimalPoemType(true, 22, 2),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getBigdecimalfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setBigdecimalfield((BigDecimal)cooked);
          }

          public Field<BigDecimal> asField(Persistent g) {
            return ((EverythingAbstract)g).getBigdecimalfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "BigDecimal Field";
          }

          protected int defaultDisplayOrder() {
            return 9;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getBigdecimalfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setBigdecimalfield_unsafe((BigDecimal)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getBigdecimalfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setBigdecimalfield((BigDecimal)raw);
          }
        });

    defineColumn(col_timestampfield =
        new Column<Timestamp>(this, "timestampfield",
                   new TimestampPoemType(true),
                   DefinitionSource.dsd) { 
          public Object getCooked(Persistent g)
              throws AccessPoemException, PoemException {
            return ((EverythingAbstract)g).getTimestampfield();
          }

          public void setCooked(Persistent g, Object cooked)
              throws AccessPoemException, ValidationPoemException {
            ((EverythingAbstract)g).setTimestampfield((Timestamp)cooked);
          }

          public Field<Timestamp> asField(Persistent g) {
            return ((EverythingAbstract)g).getTimestampfieldField();
          }

          protected DisplayLevel defaultDisplayLevel() {
            return DisplayLevel.summary;
          }

          protected Searchability defaultSearchability() {
            return Searchability.yes;
          }

          protected String defaultDisplayName() {
            return "Timestamp Field";
          }

          protected int defaultDisplayOrder() {
            return 10;
          }

          protected int defaultWidth() {
            return 20;
          }

          protected int defaultHeight() {
            return 1;
          }

          public Object getRaw_unsafe(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getTimestampfield_unsafe();
          }

          public void setRaw_unsafe(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setTimestampfield_unsafe((Timestamp)raw);
          }

          public Object getRaw(Persistent g)
              throws AccessPoemException {
            return ((EverythingAbstract)g).getTimestampfield();
          }

          public void setRaw(Persistent g, Object raw)
              throws AccessPoemException {
            ((EverythingAbstract)g).setTimestampfield((Timestamp)raw);
          }
        });
  }


 /**
  * Retrieves the <code>Binaryfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the binaryfield <code>Column</code>
  */
  public final Column<byte[]> getBinaryfieldColumn() {
    return col_binaryfield;
  }


 /**
  * Retrieves the <code>Stringfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the stringfield <code>Column</code>
  */
  public final Column<String> getStringfieldColumn() {
    return col_stringfield;
  }


 /**
  * Retrieves the <code>Passwordfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the passwordfield <code>Column</code>
  */
  public final Column<String> getPasswordfieldColumn() {
    return col_passwordfield;
  }


 /**
  * Retrieves the <code>Booleanfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the booleanfield <code>Column</code>
  */
  public final Column<Boolean> getBooleanfieldColumn() {
    return col_booleanfield;
  }


 /**
  * Retrieves the <code>Datefield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the datefield <code>Column</code>
  */
  public final Column<Date> getDatefieldColumn() {
    return col_datefield;
  }


 /**
  * Retrieves the <code>Doublefield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the doublefield <code>Column</code>
  */
  public final Column<Double> getDoublefieldColumn() {
    return col_doublefield;
  }


 /**
  * Retrieves the <code>Integerfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the integerfield <code>Column</code>
  */
  public final Column<Integer> getIntegerfieldColumn() {
    return col_integerfield;
  }


 /**
  * Retrieves the <code>Longfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the longfield <code>Column</code>
  */
  public final Column<Long> getLongfieldColumn() {
    return col_longfield;
  }


 /**
  * Retrieves the <code>Bigdecimalfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the bigdecimalfield <code>Column</code>
  */
  public final Column<BigDecimal> getBigdecimalfieldColumn() {
    return col_bigdecimalfield;
  }


 /**
  * Retrieves the <code>Timestampfield</code> <code>Column</code> for this 
  * <code>EverythingAbstract</code> <code>Table</code>.
  * 
  * @see org.melati.poem.prepro.FieldDef#generateColAccessor 
  * @return the timestampfield <code>Column</code>
  */
  public final Column<Timestamp> getTimestampfieldColumn() {
    return col_timestampfield;
  }


 /**
  * Retrieve the <code>EverythingAbstract</code> as a <code>EverythingAbstract</code>.
  *
  * @see org.melati.poem.prepro.TableDef#generateTableBaseJava 
  * @param troid a Table Row Oject ID
  * @return the <code>Persistent</code> identified by the <code>troid</code>
  */
  public EverythingAbstract getEverythingAbstractObject(Integer troid) {
    return (EverythingAbstract)getObject(troid);
  }


 /**
  * Retrieve the <code>EverythingAbstract</code> 
  * as a <code>EverythingAbstract</code>.
  *
  * @see org.melati.poem.prepro.TableDef#generateTableBaseJava 
  * @param troid a Table Row Object ID
  * @return the <code>Persistent</code> identified   */
  public EverythingAbstract getEverythingAbstractObject(int troid) {
    return (EverythingAbstract)getObject(troid);
  }
  protected String defaultDisplayName() {
    return "EverythingAbstract";
  }

  protected String defaultDescription() {
    return "Every datatype in one abstract table";
  }

  protected Integer defaultCacheLimit() {
    return new Integer(100);
  }

  protected String defaultCategory() {
    return "Normal";
  }

  protected int defaultDisplayOrder() {
    return 55;
  }
}

