Class OurTable

  • Direct Known Subclasses:
    User

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

      • OurTable

        public OurTable()
    • Method Detail

      • 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()