src/main/java/org/beigesoft/replicator/service/SrvEntityFieldUserTomcatRepl.java
@Override
  public final void fill(final Map<String, Object> pAddParam,
    final Object pEntity, final String pFieldName,
      final String pFieldStrValue) throws Exception {
    if (!UserRoleTomcat.class.isAssignableFrom(pEntity.getClass())) {
      throw new ExceptionWithCode(ExceptionWithCode
        .CONFIGURATION_MISTAKE, "It's wrong service to fill that field: "
          + pEntity + "/" + pFieldName + "/" + pFieldStrValue);
    }
    UserRoleTomcat userRoleTomcat = (UserRoleTomcat) pEntity;
    if ("NULL".equals(pFieldStrValue)) {
      userRoleTomcat.setItsUser(null);
      return;
    }
    try {
      UserTomcat ownedEntity = new UserTomcat();
      ownedEntity.setItsUser(pFieldStrValue);
      userRoleTomcat.setItsUser(ownedEntity);
    } catch (Exception ex) {
      throw new ExceptionWithCode(ExceptionWithCode
        .WRONG_PARAMETER, "Can not fill field: " + pEntity + "/" + pFieldName
          + "/" + pFieldStrValue + ", " + ex.getMessage(), ex);
    }
  }
@Override
  public final void fill(final Map<String, Object> pAddParam,
    final Object pEntity, final String pFieldName,
      final String pFieldStrValue) throws Exception {
    if (!UserRoleTomcat.class.isAssignableFrom(pEntity.getClass())) {
      throw new ExceptionWithCode(ExceptionWithCode
        .CONFIGURATION_MISTAKE, "It's wrong service to fill that field: "
          + pEntity + "/" + pFieldName + "/" + pFieldStrValue);
    }
    UserRoleTomcat userRoleTomcat = (UserRoleTomcat) pEntity;
    if ("NULL".equals(pFieldStrValue)) {
      userRoleTomcat.setItsUser(null);
      return;
    }
    try {
      UserTomcat ownedEntity = new UserTomcat();
      ownedEntity.setItsUser(pFieldStrValue);
      userRoleTomcat.setItsUser(ownedEntity);
    } catch (Exception ex) {
      throw new ExceptionWithCode(ExceptionWithCode
        .WRONG_PARAMETER, "Can not fill field: " + pEntity + "/" + pFieldName
          + "/" + pFieldStrValue + ", " + ex.getMessage(), ex);
    }
  }
<p>
Fill given field of given entity according value represented as
string.
</p>
@param pAddParam additional params
@param pEntity Entity.
@param pFieldName Field Name
@param pFieldStrValue Field value
@throws Exception - an exception