Class BaseObject


  • public class BaseObject
    extends java.lang.Object
    This is the base paper object, which can represents all the fields of a database row - plus anything else that is added. This works together with BaseTable, if an instance representation is required.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String _rcsid  
      protected java.util.HashMap fields  
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseObject()
      Construct an empty one.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear the current object.
      java.lang.Object getValue​(java.lang.String fieldName)
      Get a field by name.
      java.util.Iterator listFields()
      Get the list of fields that currently have values.
      void setValue​(java.lang.String fieldName, java.lang.Object fieldValue)
      Set a field by name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fields

        protected java.util.HashMap fields
    • Constructor Detail

      • BaseObject

        public BaseObject()
        Construct an empty one.
    • Method Detail

      • clear

        public void clear()
        Clear the current object.
      • listFields

        public java.util.Iterator listFields()
        Get the list of fields that currently have values.
        Returns:
        an iterator of the current non-null fields.
      • getValue

        public java.lang.Object getValue​(java.lang.String fieldName)
        Get a field by name.
        Parameters:
        fieldName - is the name of the field.
        Returns:
        the field value, or null if it is not set.
      • setValue

        public void setValue​(java.lang.String fieldName,
                             java.lang.Object fieldValue)
        Set a field by name.
        Parameters:
        fieldName - is the name of the field.
        fieldValue - is the value, or null if the field should be removed.