Class SourceSystemPersonView


  • public class SourceSystemPersonView
    extends java.lang.Object
    Source system person view plays the role of an existing class. Its interface provides "the wrong" methods, thus it has to be adapted for being used in the target scenario.
    Semantics as well as data structure is not sufficient.
    This is the ADAPTEE in ADAPTER pattern.
    Author:
    Karl Eilebrecht
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String comment
      detail information
      java.lang.String firstName
      name of person
      java.lang.String lastName
      last name of person
      long number
      identifies this record
    • Constructor Summary

      Constructors 
      Constructor Description
      SourceSystemPersonView​(long number, java.lang.String firstName, java.lang.String lastName, java.lang.String comment)
      Constructs new item, used in source system
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      deletes the person
      boolean isInvalid()
      returns whether this record is invalid
      void setInvalid()
      Sets this record invalid
      void setValid()
      Sets this record valid
      • Methods inherited from class java.lang.Object

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

      • number

        public final long number
        identifies this record
      • firstName

        public final java.lang.String firstName
        name of person
      • lastName

        public final java.lang.String lastName
        last name of person
      • comment

        public final java.lang.String comment
        detail information
    • Constructor Detail

      • SourceSystemPersonView

        public SourceSystemPersonView​(long number,
                                      java.lang.String firstName,
                                      java.lang.String lastName,
                                      java.lang.String comment)
        Constructs new item, used in source system
        Parameters:
        number - identifier
        firstName - person's first name
        lastName - person's last name
        comment - details
    • Method Detail

      • isInvalid

        public boolean isInvalid()
        returns whether this record is invalid
        Returns:
        true if record is invalid
      • setInvalid

        public void setInvalid()
        Sets this record invalid
      • setValid

        public void setValid()
        Sets this record valid
      • delete

        public void delete()
        deletes the person