@Override
  protected void OnEntityChanged() {
    super.OnEntityChanged();

    getSearchCommand().Execute();
    UpdateActionAvailability();
  }
  @Override
  protected void AsyncSearch() {
    super.AsyncSearch();

    setAsyncResult(
        Frontend.RegisterQuery(
            VdcQueryType.GetTemplateInterfacesByTemplateId,
            new GetVmTemplateParameters(getEntityStronglyTyped().getId())));
    setItems(getAsyncResult().getData());
  }
  @Override
  protected void SyncSearch() {
    if (getEntity() == null) {
      return;
    }

    super.SyncSearch(
        VdcQueryType.GetTemplateInterfacesByTemplateId,
        new GetVmTemplateParameters(getEntityStronglyTyped().getId()));
  }
  @Override
  public void ExecuteCommand(UICommand command) {
    super.ExecuteCommand(command);

    if (command == getNewCommand()) {
      New();
    } else if (command == getEditCommand()) {
      Edit();
    } else if (command == getRemoveCommand()) {
      remove();
    } else if (StringHelper.stringsEqual(command.getName(), "OnSave")) {
      OnSave();
    } else if (StringHelper.stringsEqual(command.getName(), "Cancel")) {
      Cancel();
    } else if (StringHelper.stringsEqual(command.getName(), "OnRemove")) {
      OnRemove();
    }
  }
  @Override
  protected void AsyncSearch() {
    super.AsyncSearch();

    setAsyncResult(
        Frontend.RegisterQuery(
            VdcQueryType.GetAllNetworksByClusterId,
            new VdsGroupQueryParamenters(getEntity().getID())));
    setItems(getAsyncResult().getData());
  }
  @Override
  public void ExecuteCommand(UICommand command) {
    super.ExecuteCommand(command);

    if (command == getManageCommand()) {
      Manage();
    } else if (command == getSetAsDisplayCommand()) {
      SetAsDisplay();
    } else if (StringHelper.stringsEqual(command.getName(), "OnManage")) {
      OnManage();
    } else if (StringHelper.stringsEqual(command.getName(), "New")) {
      New();
    } else if (StringHelper.stringsEqual(command.getName(), "OnSave")) {
      OnSave();
    } else if (StringHelper.stringsEqual(command.getName(), "Cancel")) {
      Cancel();
    }
  }
  @Override
  protected void SyncSearch() {
    if (getEntity() == null) {
      return;
    }

    super.SyncSearch();

    AsyncQuery _asyncQuery = new AsyncQuery();
    _asyncQuery.setModel(this);
    _asyncQuery.asyncCallback =
        new INewAsyncCallback() {
          public void OnSuccess(Object model, Object ReturnValue) {
            SearchableListModel searchableListModel = (SearchableListModel) model;
            searchableListModel.setItems(
                (java.util.ArrayList<network>)
                    ((VdcQueryReturnValue) ReturnValue).getReturnValue());
          }
        };

    VdsGroupQueryParamenters tempVar = new VdsGroupQueryParamenters(getEntity().getID());
    tempVar.setRefresh(getIsQueryFirstTime());
    Frontend.RunQuery(VdcQueryType.GetAllNetworksByClusterId, tempVar, _asyncQuery);
  }
 @Override
 public void Search() {
   if (getEntityStronglyTyped() != null) {
     super.Search();
   }
 }
 @Override
 protected void OnSelectedItemChanged() {
   super.OnSelectedItemChanged();
   UpdateActionAvailability();
 }
 @Override
 public void Search() {
   if (getEntity() != null) {
     super.Search();
   }
 }
 @Override
 protected void OnEntityChanged() {
   super.OnEntityChanged();
   getSearchCommand().Execute();
 }
 public void setEntity(VDSGroup value) {
   super.setEntity(value);
 }