GhDataEntity.java 792 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package hello.home.entity;
  2. import com.techempower.util.*;
  3. /**
  4. * The base class for all data entities in GeminiHello. This class provides
  5. * the implementation of the Identifiable interface so that sub-classes
  6. * only need to provide member variables and typical get/set methods.
  7. *
  8. * Development history:
  9. * 2012-04-19 - mh - Class created
  10. *
  11. * @author mhixson
  12. */
  13. public abstract class GhDataEntity
  14. implements Identifiable
  15. {
  16. /**
  17. * The identity for this object.
  18. */
  19. private int id;
  20. @Override
  21. public int getId()
  22. {
  23. return this.id;
  24. }
  25. @Override
  26. public void setId(int newIdentity)
  27. {
  28. this.id = newIdentity;
  29. }
  30. @Override
  31. public String toString()
  32. {
  33. return getClass().getSimpleName() + "[" + getId() + "]";
  34. }
  35. } // End GhDataEntity.