com.gentics.api.lib.datasource
Class AbstractVersioningDatasource
java.lang.Object
com.gentics.api.lib.datasource.AbstractDatasource
com.gentics.api.lib.datasource.AbstractVersioningDatasource
- All Implemented Interfaces:
- Datasource, VersioningDatasource, Cloneable
public abstract class AbstractVersioningDatasource
- extends AbstractDatasource
- implements VersioningDatasource
Abstract basic implementation for versioning datasources. Implementors should
rather override this class than implement the interface Datasource
directly in order to
- Use default implementation
- Reduce implementation modification effort when the interface might
change in future releases.
Method Summary |
int |
getCount(DatasourceFilter filter)
Get the number of objects in the datasource that match the given filter |
int |
getCount(DatasourceFilter filter,
int versionTimestamp)
Get the number of resolvables matching the given filter at the
versionTimestamp |
int |
getCount(DatasourceFilter filter,
Map specificParameters)
Get the number of objects in the datasource that match the given filter |
Collection |
getResult(DatasourceFilter filter,
String[] prefillAttributes,
int versionTimestamp)
Get the resolvables matching the given datasource filter at the timestamp |
Collection |
getResult(DatasourceFilter filter,
String[] prefillAttributes,
int start,
int count,
Datasource.Sorting[] sortedColumns,
int versionTimestamp)
Get the resolvables matching the given datasource filter at the timestamp |
Collection |
getResult(DatasourceFilter filter,
String[] prefillAttributes,
int start,
int count,
Datasource.Sorting[] sortedColumns,
Map specificParameters)
Get the resolvables from the datasource that match the given datasource filter. |
Methods inherited from class com.gentics.api.lib.datasource.AbstractDatasource |
clone, getCount, getId, getResult, getResult, getResult, getResult, getResult, hasChanged, isValidAttribute, setId |
Methods inherited from interface com.gentics.api.lib.datasource.Datasource |
clone, createDatasourceFilter, getCount, getCount2, getHandlePool, getId, getResult, getResult, getResult, getResult, getResult, getResult, hasChanged, hasChanged, isValidAttribute, setAttributeNames, setRuleTree |
AbstractVersioningDatasource
public AbstractVersioningDatasource(String id)
getCount
public int getCount(DatasourceFilter filter,
Map specificParameters)
throws DatasourceException
- Description copied from interface:
Datasource
- Get the number of objects in the datasource that match the given filter
- Specified by:
getCount
in interface Datasource
- Parameters:
filter
- datasource filterspecificParameters
- map of specific parameters, which will be
interpreted by some specific Datasources, may be null or empty (no
specific parameters)
- Returns:
- number of objects that match the filter
- Throws:
DatasourceException
- See Also:
Datasource.createDatasourceFilter(Expression)
getCount
public int getCount(DatasourceFilter filter)
throws DatasourceException
- Description copied from interface:
Datasource
- Get the number of objects in the datasource that match the given filter
- Specified by:
getCount
in interface Datasource
- Overrides:
getCount
in class AbstractDatasource
- Parameters:
filter
- datasource filter
- Returns:
- number of objects that match the filter
- Throws:
DatasourceException
- See Also:
Datasource.createDatasourceFilter(Expression)
getCount
public int getCount(DatasourceFilter filter,
int versionTimestamp)
throws DatasourceException
- Description copied from interface:
VersioningDatasource
- Get the number of resolvables matching the given filter at the
versionTimestamp
- Specified by:
getCount
in interface VersioningDatasource
- Parameters:
filter
- datasource filterversionTimestamp
- version timestamp, -1 for current versions
- Returns:
- number of resolvables matching the datasource filter at the
versionTimestamp
- Throws:
DatasourceException
getResult
public Collection getResult(DatasourceFilter filter,
String[] prefillAttributes,
int versionTimestamp)
throws DatasourceException
- Description copied from interface:
VersioningDatasource
- Get the resolvables matching the given datasource filter at the timestamp
- Specified by:
getResult
in interface VersioningDatasource
- Parameters:
filter
- datasource filterprefillAttributes
- array of attribute names to prefill (null or empty for no prefilling)versionTimestamp
- version timestamp (-1 for current versions)
- Returns:
- collection of resolvables matching the datasource filter at the
given versionTimestamp
- Throws:
DatasourceException
getResult
public Collection getResult(DatasourceFilter filter,
String[] prefillAttributes,
int start,
int count,
Datasource.Sorting[] sortedColumns,
int versionTimestamp)
throws DatasourceException
- Description copied from interface:
VersioningDatasource
- Get the resolvables matching the given datasource filter at the timestamp
- Specified by:
getResult
in interface VersioningDatasource
- Parameters:
filter
- datasource filterprefillAttributes
- array of attribute names to prefill (null or empty for no prefilling)start
- index of the first returned objectcount
- maximum number of objects returned, -1 for all objectssortedColumns
- sorted columns, may be null (no sorting used)versionTimestamp
- version timestamp (-1 for current versions)
- Returns:
- collection of resolvables matching the datasource filter at the
given versionTimestamp
- Throws:
DatasourceException
getResult
public Collection getResult(DatasourceFilter filter,
String[] prefillAttributes,
int start,
int count,
Datasource.Sorting[] sortedColumns,
Map specificParameters)
throws DatasourceException
- Description copied from interface:
Datasource
- Get the resolvables from the datasource that match the given datasource filter.
- Specified by:
getResult
in interface Datasource
- Parameters:
filter
- datasource filterprefillAttributes
- array of attribute names to prefill (null or empty for no prefilling)start
- index of the first object to returncount
- maximum number of objects to return (-1 for all objects).sortedColumns
- possible sorting (may be null for "no sorting")specificParameters
- map of specific parameters, which will be
interpreted by some specific Datasources, may be null or empty (no
specific parameters)
- Returns:
- collection of resolvables matching the filter
- Throws:
DatasourceException
- See Also:
Datasource.createDatasourceFilter(Expression)
Copyright © 2013 Gentics Software GmbH. All Rights Reserved.