Search in sources :

Example 1 with PartitionWSQueryImpl

use of org.apache.gora.query.ws.impl.PartitionWSQueryImpl in project gora by apache.

the class CassandraStore method getPartitions.

/**
 * {@inheritDoc}
 */
@Override
public List<PartitionQuery<K, T>> getPartitions(Query<K, T> query) throws GoraException {
    try {
        List<PartitionQuery<K, T>> partitions = new ArrayList<>();
        PartitionWSQueryImpl<K, T> pqi = new PartitionWSQueryImpl<>(query);
        pqi.setDataStore(this);
        partitions.add(pqi);
        return partitions;
    } catch (Exception e) {
        throw new GoraException(e);
    }
}
Also used : PartitionWSQueryImpl(org.apache.gora.query.ws.impl.PartitionWSQueryImpl) GoraException(org.apache.gora.util.GoraException) ArrayList(java.util.ArrayList) PartitionQuery(org.apache.gora.query.PartitionQuery) IOException(java.io.IOException) GoraException(org.apache.gora.util.GoraException)

Aggregations

IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 PartitionQuery (org.apache.gora.query.PartitionQuery)1 PartitionWSQueryImpl (org.apache.gora.query.ws.impl.PartitionWSQueryImpl)1 GoraException (org.apache.gora.util.GoraException)1