org.eclipse.emf.emfstore.internal.server.model.impl.api.query
Class ESRangeQueryImpl<T extends ESRangeQuery<?>,U extends RangeQuery<T>>

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.common.api.AbstractAPIImpl<U,T>
      extended by org.eclipse.emf.emfstore.internal.server.model.impl.api.query.ESHistoryQueryImpl<T,U>
          extended by org.eclipse.emf.emfstore.internal.server.model.impl.api.query.ESRangeQueryImpl<T,U>
Type Parameters:
T - a sub-type of ESRangeQueryImpl
U - a sub-type of RangeQuery
All Implemented Interfaces:
InternalAPIDelegator<T,U>, ESHistoryQuery<T>, ESRangeQuery<T>
Direct Known Subclasses:
ESModelElementQueryImpl

public class ESRangeQueryImpl<T extends ESRangeQuery<?>,U extends RangeQuery<T>>
extends ESHistoryQueryImpl<T,U>
implements ESRangeQuery<T>

Mapping between ESRangeQuery and RangeQuery.

Author:
emueller

Field Summary
 
Fields inherited from interface org.eclipse.emf.emfstore.server.model.query.ESHistoryQuery
FACTORY
 
Constructor Summary
ESRangeQueryImpl(U rangeQuery)
          Constructor.
 
Method Summary
 int getLowerLimit()
           Returns the lower limit of the range query.
 ESPrimaryVersionSpec getSource()
          Returns the ESPrimaryVersionSpec this history query is pointing to.
 int getUpperLimit()
           Returns the upper limit of the range query,
 boolean isIncludeAllVersions()
          Whether the include all versions, i.e.
 boolean isIncludeChangePackages()
          Whether ESChangePackages are included in the query.
 boolean isIncludeIncoming()
           Whether the query should consider incoming versions.
 boolean isIncludeOutgoing()
           Whether the query should include outgoing versions.
 void setIncludeAllVersions(boolean includeAllVersion)
          Determines whether to include all versions, i.e.
 void setIncludeChangePackages(boolean includeChangePackages)
          Determines whether ESChangePackages are included in the query.
 void setIncludeIncoming(boolean includeIncomingVersions)
           Determines whether the query should consider incoming versions.
 void setIncludeOutgoing(boolean includeOutgoingVersions)
           Determines whether the query should consider outgoing versions.
 void setLowerLimit(int lowerLimit)
           Sets the lower limit of the range query.
 void setSource(ESPrimaryVersionSpec versionSpec)
          Sets the version specifier this history query should be pointing to.
 void setUpperLimit(int upperLimit)
           Sets the upper limit of the range query.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.common.api.AbstractAPIImpl
equals, hashCode, toInternalAPI
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESRangeQueryImpl

public ESRangeQueryImpl(U rangeQuery)
Constructor.

Parameters:
rangeQuery - the delegate
Method Detail

getSource

public ESPrimaryVersionSpec getSource()
Returns the ESPrimaryVersionSpec this history query is pointing to.

Specified by:
getSource in interface ESHistoryQuery<T extends ESRangeQuery<?>>
Returns:
the version specifier this history query points to
See Also:
ESHistoryQuery.getSource()

setSource

public void setSource(ESPrimaryVersionSpec versionSpec)
Sets the version specifier this history query should be pointing to.

Specified by:
setSource in interface ESHistoryQuery<T extends ESRangeQuery<?>>
Parameters:
versionSpec - the version specifier the history query should be pointing to
See Also:
ESHistoryQuery.setSource(org.eclipse.emf.emfstore.server.model.versionspec.ESPrimaryVersionSpec)

setIncludeChangePackages

public void setIncludeChangePackages(boolean includeChangePackages)
Determines whether ESChangePackages are included in the query.

Specified by:
setIncludeChangePackages in interface ESHistoryQuery<T extends ESRangeQuery<?>>
Parameters:
includeChangePackages - true, if change packages should be included in the query, false otherwise
See Also:
ESHistoryQuery.setIncludeChangePackages(boolean)

isIncludeChangePackages

public boolean isIncludeChangePackages()
Whether ESChangePackages are included in the query.

Specified by:
isIncludeChangePackages in interface ESHistoryQuery<T extends ESRangeQuery<?>>
Returns:
true, if change packages are included in the query, false otherwise
See Also:
ESHistoryQuery.isIncludeChangePackages()

setIncludeAllVersions

public void setIncludeAllVersions(boolean includeAllVersion)
Determines whether to include all versions, i.e. whether branches should be considered by the history query.

Specified by:
setIncludeAllVersions in interface ESHistoryQuery<T extends ESRangeQuery<?>>
Parameters:
includeAllVersion - true, if branches should be considered, false otherwise
See Also:
ESHistoryQuery.setIncludeAllVersions(boolean)

isIncludeAllVersions

public boolean isIncludeAllVersions()
Whether the include all versions, i.e. whether branches should be considered by the history query.

Specified by:
isIncludeAllVersions in interface ESHistoryQuery<T extends ESRangeQuery<?>>
Returns:
true, if branches are considered by the query, false otherwise
See Also:
ESHistoryQuery.isIncludeAllVersions()

getUpperLimit

public int getUpperLimit()

Returns the upper limit of the range query,

The upper limit of a range query specifies how many versions after the source version will be considered by the query.

Specified by:
getUpperLimit in interface ESRangeQuery<T extends ESRangeQuery<?>>
Returns:
the upper limit of the range
See Also:
ESRangeQuery.getUpperLimit()

setUpperLimit

public void setUpperLimit(int upperLimit)

Sets the upper limit of the range query.

The upper limit of a range query specifies how many versions after the source version will be considered by the query.

Specified by:
setUpperLimit in interface ESRangeQuery<T extends ESRangeQuery<?>>
Parameters:
upperLimit - the upper limit of the query
See Also:
ESRangeQuery.setUpperLimit(int)

getLowerLimit

public int getLowerLimit()

Returns the lower limit of the range query.

The lower limit of a range query specifies how many versions ahead the source version will be considered by the query.

Specified by:
getLowerLimit in interface ESRangeQuery<T extends ESRangeQuery<?>>
Returns:
the lower limit of the range
See Also:
ESRangeQuery.getLowerLimit()

setLowerLimit

public void setLowerLimit(int lowerLimit)

Sets the lower limit of the range query.

The lower limit of a range query specifies how many versions ahead the source version will be considered by the query.

Specified by:
setLowerLimit in interface ESRangeQuery<T extends ESRangeQuery<?>>
Parameters:
lowerLimit - the lower limit of the query
See Also:
ESRangeQuery.setLowerLimit(int)

setIncludeIncoming

public void setIncludeIncoming(boolean includeIncomingVersions)

Determines whether the query should consider incoming versions.

Incoming versions are branches which have been merged into the source version of this query.

Specified by:
setIncludeIncoming in interface ESRangeQuery<T extends ESRangeQuery<?>>
Parameters:
includeIncomingVersions - should be set to true, if incoming versions should be considered, false otherwise
See Also:
ESRangeQuery.setIncludeIncoming(boolean)

isIncludeIncoming

public boolean isIncludeIncoming()

Whether the query should consider incoming versions.

Incoming versions are branches which have been merged into the source version of this query.

Specified by:
isIncludeIncoming in interface ESRangeQuery<T extends ESRangeQuery<?>>
Returns:
true, if the query includes incoming versions, false otherwise
See Also:
ESRangeQuery.isIncludeIncoming()

setIncludeOutgoing

public void setIncludeOutgoing(boolean includeOutgoingVersions)

Determines whether the query should consider outgoing versions.

Incoming versions are branches which have been merged into the source version of this query.

Specified by:
setIncludeOutgoing in interface ESRangeQuery<T extends ESRangeQuery<?>>
Parameters:
includeOutgoingVersions - should be set to true, if outgoing versions should be considered, false otherwise
See Also:
ESRangeQuery.setIncludeOutgoing(boolean)

isIncludeOutgoing

public boolean isIncludeOutgoing()

Whether the query should include outgoing versions.

Outgoing versions are branches which were created from the source version of this query.

Specified by:
isIncludeOutgoing in interface ESRangeQuery<T extends ESRangeQuery<?>>
Returns:
true, if the query includes outgoing versions, false otherwise
See Also:
ESRangeQuery.isIncludeOutgoing()


Copyright © 2015. All Rights Reserved.