Class LightObject

All Implemented Interfaces:
ILightObject, Serializable
Direct Known Subclasses:
ActorRole, CourseSubject, Examination, House, LightStateObject, School, SchoolClass

public class LightObject extends AbstractLightObject
Basic implementation of the ILightObject. \nThis display methods may not be override to avoid breaking the inherited behavior. Provided by the broldev.core.model project.
Since:
1.0 (Nov 27, 2007), broldev.core.model 0.0.1-SNAPSHOT dependency
Version:
1.1 (Nov 21, 2010)
Author:
Steph GAUDRY
See Also:
Serialized Form
  • Field Details

    • display

      protected String display
  • Constructor Details

    • LightObject

      public LightObject()
      Builds an instance with default values.
      See Also:
      AbstractLightObject()
    • LightObject

      public LightObject(int id, String display)
      Builds an instance with an id and a display
      Parameters:
      id - identifier of the LightObject
      display - representation of the LightObject
      See Also:
      AbstractLightObject(int, String)
  • Method Details

    • getId

      public final int getId()
      Description copied from interface: ILightObject
      Identifier of the ILightObject
      Returns:
      the id
    • setId

      public final void setId(int id)
      Parameters:
      id - the id to set
      See Also:
      ILightObject.getId()
    • getDisplay

      public final String getDisplay()
      Description copied from interface: ILightObject
      String representation of the object. This should be a concise but meaningful representation that is easy for a person to read. \nInto the ILightObject implementations, the toString() method is often used to return the values of the properties to debug.
      Returns:
      the display
    • setDisplay

      public final void setDisplay(String display)
      Description copied from interface: ILightObject
      Sets the display. \nThis general contract does not guarantee that the ILightObject.getDisplay() method will return the same string as the display argument. \nIn many subclasses of the basic implementation AbstractLightObject, the ILightObject.getDisplay() method returns a String built from a few meaningful properties. Thus, setting the display must be implemented in a way to respect the inheritance principle; the subclass behavior must be the same as expected from the supertype. \nBe careful than overriding this may produces side effects because setting the display may affects other properties. \nA good way is overriding the GenericLightObjectTest<T> class to test this. \n\nMaven dependency for the the GenericLightObjectTest<T>:
      • groupId: be.gaudry.broldev
      • artifactId: broldev.core.jpa-tests
      Parameters:
      display - String representation of the object
      See Also:
      ILightObject.getDisplay()