@Repository public class CassandraDataSetDAO extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CDSID_SEPARATOR |
| Constructor and Description |
|---|
CassandraDataSetDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssignment(String providerId,
String dataSetId,
String recordId,
String schema,
String version)
Adds representation to a data set.
|
eu.europeana.cloud.common.model.DataSet |
createDataSet(String providerId,
String dataSetId,
String description,
Date creationTime)
Creates or updates data set for a provider.
|
void |
deleteDataSet(String providerId,
String dataSetId)
Deletes data set with all its assignments.
|
eu.europeana.cloud.common.model.DataSet |
getDataSet(String providerId,
String dataSetId)
Returns data set from specified provider with specified id.
|
Collection<eu.europeana.cloud.common.model.CompoundDataSetId> |
getDataSetAssignments(String cloudId,
String schemaId,
String version)
Returns data sets to which representation (in specified or latest
version) is assigned to.
|
List<eu.europeana.cloud.common.model.DataSet> |
getDataSets(String providerId,
String thresholdDatasetId,
int limit)
Lists all data sets for a provider.
|
List<eu.europeana.cloud.common.model.Representation> |
listDataSet(String providerId,
String dataSetId,
String thresholdCloudId,
String thresholdSchema,
int limit)
Returns stubs of representations assigned to a data set.
|
void |
removeAssignment(String providerId,
String dataSetId,
String recordId,
String schema)
Removes representation from data set (regardless representation version).
|
protected static final String CDSID_SEPARATOR
public List<eu.europeana.cloud.common.model.Representation> listDataSet(String providerId, String dataSetId, String thresholdCloudId, String thresholdSchema, int limit) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) iddataSetId - data set idthresholdCloudId - parameter used to pagination, returned representations wil
have cloudId >= thresholdCloudId. Might be null.thresholdSchema - parameter used to pagination, returned representations wil
have schema >= thresholdSchema. Might be null.limit - maximum size of returned listcom.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic void addAssignment(String providerId, String dataSetId, String recordId, String schema, String version) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) iddataSetId - data set idrecordId - record idschema - representation schemaversion - representation version (might be null if newest version is to
be assigned)com.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic Collection<eu.europeana.cloud.common.model.CompoundDataSetId> getDataSetAssignments(String cloudId, String schemaId, String version) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
cloudId - record idschemaId - representation schemaversion - representation version (might be null)com.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic eu.europeana.cloud.common.model.DataSet getDataSet(String providerId, String dataSetId) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) iddataSetId - data set idcom.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic void removeAssignment(String providerId, String dataSetId, String recordId, String schema) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) iddataSetId - data set idrecordId - record's idschema - representation's schemacom.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic eu.europeana.cloud.common.model.DataSet createDataSet(String providerId, String dataSetId, String description, Date creationTime) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) iddataSetId - data set iddescription - description of data set.creationTime - creation datecom.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic List<eu.europeana.cloud.common.model.DataSet> getDataSets(String providerId, String thresholdDatasetId, int limit) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) idthresholdDatasetId - parameter used to pagination, returned representations wil
have dataSetId >= thresholdDatasetId. Might be null.limit - max size of returned data set list.com.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionpublic void deleteDataSet(String providerId, String dataSetId) throws com.datastax.driver.core.exceptions.NoHostAvailableException, com.datastax.driver.core.exceptions.QueryExecutionException
providerId - data set owner's (provider's) iddataSetId - data set idcom.datastax.driver.core.exceptions.NoHostAvailableExceptioncom.datastax.driver.core.exceptions.QueryExecutionExceptionCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.