Interface BusinessObject


public interface BusinessObject
  • Each/every business object interface should extends this BusinessObject interface (and preferably nothing else). Don't build hierarchies among the business object interfaces. If some interfaces have common properties they can/should extend some common package-private (not public) interface that does not exted BusinessObject.
  • Every interface should have an inner abstract static class named Logic. These classes contain static business logic methods defined in terms of the interfaces. Those methods are the real reason the business object interfaces exist. Do NOT add anything to the interfaces that is not required by any of the business logic methods!
  • Try to avoid defining relationships to other BusinessObject in the interfaces, particularly to-many relationships. Prefer having the logic methods take collections as input parameters.
  • Method Details

    • getEmptyList

      static <E> List<E> getEmptyList()
    • getEmptyMap

      static <K, V> Map<K,V> getEmptyMap()
    • getEmptySet

      static <E> Set<E> getEmptySet()
    • makeSingleEntryList

      static <E> List<E> makeSingleEntryList(E listEntry)
    • makeSingleEntryMap

      static <K, V> Map<K,V> makeSingleEntryMap(K mpEntryKey, V mapEntryValue)
    • makeSingleEntrySet

      static <E> Set<E> makeSingleEntrySet(E setEntry)
    • toDisplayString

      String toDisplayString()