Create a private setter to set the current State

This method sets the entity's state value from a State object. Note that the method is private.

Figure 1. Creating a private setter to set the current State
/**
       * Sets the state codetable code field from the State object
       * supplied.
       *
       * @param value
       *          the State supplied
       */
     private void setState(
     final State<MYLIFECYCLEENTITYSTATEEntry> state) {
      getDtls().state = state.getValue().getCode();
      }