@Override
  public HostRoleCommand createExisting(HostRoleCommandEntity hostRoleCommandEntity) {
    return new HostRoleCommand(hostRoleCommandEntity,
        injector.getInstance(HostDAO.class),
        injector.getInstance(ExecutionCommandDAO.class),
        injector.getInstance(ExecutionCommandWrapperFactory.class));
  }
Constructor via factory
@param hostRoleCommandEntity Object to copy fields from.
@return An instance constructed from the input object.
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleCommandFactoryImpl.java