Class OurTable

java.lang.Object
edu.wisc.game.reflect.OurTable
Direct Known Subclasses:
User

public abstract class OurTable
extends Object
All our entities (corresponding to table rows) implement this.
  • Constructor Summary

    Constructors 
    Constructor Description
    OurTable()  
  • Method Summary

    Modifier and Type Method Description
    void fetchVecs()
    This is meant to cause JPA load vectors that are not automatically loaded.
    long getLongId()
    A very cludgy way to call getId() regardless of whether it's returning int or long
    boolean ignores​(String fieldName)
    In some classes, certain fields should not be displayed or modified unless certain conditions apply.
    String reflectToString()  
    boolean validate​(javax.persistence.EntityManager em, StringBuffer errmsg)
    Validates a recently created entry, before it has been put into the database.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • validate

      public boolean validate​(javax.persistence.EntityManager em, StringBuffer errmsg)
      Validates a recently created entry, before it has been put into the database. Adds any error message text to errmsg.
      Returns:
      true if ok
    • fetchVecs

      public void fetchVecs()
      This is meant to cause JPA load vectors that are not automatically loaded. The idea is, they can be accessible through this object even after the EntityManager is closed.
    • getLongId

      public long getLongId()
      A very cludgy way to call getId() regardless of whether it's returning int or long
    • ignores

      public boolean ignores​(String fieldName)
      In some classes, certain fields should not be displayed or modified unless certain conditions apply. E.g., some fields of a User object only applies in certain programs. Implementing classes override this method as needed to impose appropriate restrictions.
    • reflectToString

      public String reflectToString()