blob: 99f7a782569786726aa96620b2fcc261b927d9d0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
* Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Simon McDuff - initial API and implementation
* Eike Stepper - maintenance
*/
package org.eclipse.emf.cdo.common.util;
import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.CDOCommonView;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import java.util.Map;
/**
* Encapsulates all the transferrable information that fully specifies a query from a {@link CDOCommonView view} to a
* {@link CDOCommonRepository repository}.
*
* @author Simon McDuff
* @since 3.0
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface CDOQueryInfo
{
public static final int UNLIMITED_RESULTS = -1;
/**
* The name of a {@link Boolean} typed {@link #getParameters() parameter} to influence automatic response flushing (the default) after each query result.
*
* @since 4.2
*/
public static final String PARAM_DISABLE_RESPONSE_FLUSHING = "disable.response.flushing";
/**
* Returns the language identifier of this query, never <code>null</code>.
*/
public String getQueryLanguage();
/**
* Returns the query string of this query or <code>null</code> if no query string has been set.
*/
public String getQueryString();
/**
* Returns the parameters of this query as a map.
*/
public Map<String, Object> getParameters();
/**
* Returns the context object, or <code>null</code> if no context is bound.
*
* @since 4.0
*/
public Object getContext();
/**
* Returns the maximum number of results to retrieve or {@link #UNLIMITED_RESULTS} for no limitation.
*/
public int getMaxResults();
/**
* Returns <code>true</code> if the view of this query had legacy mode enabled at the time this query was created,
* <code>false</code> otherwise.
*
* @since 4.0
* @deprecated As of 4.2 the legacy mode is always enabled.
*/
@Deprecated
public boolean isLegacyModeEnabled();
/**
* Returns the {@link CDOChangeSetData change set} to be considered if this query has been created by a dirty
* transaction, <code>null</code> otherwise.
*
* @since 4.0
*/
public CDOChangeSetData getChangeSetData();
}
|