Search in sources :

Example 16 with SearchParameters

use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getClusterListByName.

public void getClusterListByName(AsyncQuery<List<Cluster>> aQuery, String name) {
    aQuery.converterCallback = new ListConverter<>();
    Frontend.getInstance().runQuery(QueryType.Search, // $NON-NLS-1$ //$NON-NLS-2$
    new SearchParameters("Cluster: name=" + name + " sortby name", SearchType.Cluster), aQuery);
}
Also used : SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters)

Example 17 with SearchParameters

use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getVolumeList.

public void getVolumeList(AsyncQuery<List<GlusterVolumeEntity>> aQuery, String clusterName, boolean doRefresh) {
    if ((ApplicationModeHelper.getUiMode().getValue() & ApplicationMode.GlusterOnly.getValue()) == 0) {
        aQuery.getAsyncCallback().onSuccess(new ArrayList<GlusterVolumeEntity>());
        return;
    }
    aQuery.converterCallback = new ListConverter<>();
    SearchParameters searchParameters;
    searchParameters = // $NON-NLS-1$
    clusterName == null ? // $NON-NLS-1$
    new SearchParameters("Volumes:", SearchType.GlusterVolume) : // $NON-NLS-1$
    new SearchParameters("Volumes: cluster.name=" + clusterName, SearchType.GlusterVolume);
    searchParameters.setMaxCount(9999);
    if (!doRefresh) {
        searchParameters.withoutRefresh();
    }
    Frontend.getInstance().runQuery(QueryType.Search, searchParameters, aQuery);
}
Also used : SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) GlusterVolumeEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)

Example 18 with SearchParameters

use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getStorageDomainList.

public void getStorageDomainList(AsyncQuery<List<StorageDomain>> aQuery) {
    aQuery.converterCallback = new ListConverter<>();
    // $NON-NLS-1$
    SearchParameters searchParams = new SearchParameters("Storage:", SearchType.StorageDomain);
    searchParams.setMaxCount(9999);
    Frontend.getInstance().runQuery(QueryType.Search, searchParams, aQuery);
}
Also used : SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters)

Example 19 with SearchParameters

use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getDataCenterListByName.

public void getDataCenterListByName(AsyncQuery<List<StoragePool>> aQuery, String name) {
    aQuery.converterCallback = new ListConverter<>();
    Frontend.getInstance().runQuery(QueryType.Search, // $NON-NLS-1$ //$NON-NLS-2$
    new SearchParameters("DataCenter: name=" + name + " sortby name", SearchType.StoragePool), aQuery);
}
Also used : SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters)

Example 20 with SearchParameters

use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.

the class StorageListModel method syncSearch.

@Override
protected void syncSearch() {
    SearchParameters tempVar = new SearchParameters(applySortOptions(getSearchString()), SearchType.StorageDomain, isCaseSensitiveSearch());
    tempVar.setMaxCount(getSearchPageSize());
    super.syncSearch(QueryType.Search, tempVar);
}
Also used : SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters)

Aggregations

SearchParameters (org.ovirt.engine.core.common.queries.SearchParameters)58 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)19 Test (org.junit.Test)17 QueryParametersBase (org.ovirt.engine.core.common.queries.QueryParametersBase)17 ArrayList (java.util.ArrayList)15 QueryType (org.ovirt.engine.core.common.queries.QueryType)12 StatusCodeException (com.google.gwt.user.client.rpc.StatusCodeException)9 SearchType (org.ovirt.engine.core.common.interfaces.SearchType)7 Frontend (org.ovirt.engine.ui.frontend.Frontend)7 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)7 List (java.util.List)6 Guid (org.ovirt.engine.core.compat.Guid)6 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)6 VDS (org.ovirt.engine.core.common.businessentities.VDS)5 PropertyChangedEventArgs (org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)5 UIConstants (org.ovirt.engine.ui.uicompat.UIConstants)5 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)4 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)4 ListModel (org.ovirt.engine.ui.uicommonweb.models.ListModel)4 EnumTranslator (org.ovirt.engine.ui.uicompat.EnumTranslator)4