public void clear() {
    ContentFeatureStore featureStore = ensureFeatureStore();

    try {
      featureStore.removeFeatures(query.getFilter());
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
 public boolean addAll(FeatureCollection c) {
   ContentFeatureStore featureStore = ensureFeatureStore();
   try {
     List<FeatureId> ids;
     ids = featureStore.addFeatures(c);
     return ids.size() == c.size();
   } catch (IOException e) {
     throw new RuntimeException(e);
   }
 }
  @Override
  public void setTransaction(Transaction transaction) {
    super.setTransaction(transaction);

    if (delegate.getTransaction() != transaction) {
      delegate.setTransaction(transaction);
    }
  }