Tabnine Logo
KeyValueOperations.delete
Code IndexAdd Tabnine to your IDE (free)

How to use
delete
method
in
org.springframework.data.keyvalue.core.KeyValueOperations

Best Java code snippets using org.springframework.data.keyvalue.core.KeyValueOperations.delete (Showing top 7 results out of 315)

origin: spring-projects/spring-data-keyvalue

  @Override
  public void deleteAll() {
    operations.delete(entityInformation.getJavaType());
  }
}
origin: spring-projects/spring-data-keyvalue

@Override
public void deleteById(ID id) {
  operations.delete(id, entityInformation.getJavaType());
}
origin: org.springframework.data/spring-data-keyvalue

  @Override
  public void deleteAll() {
    operations.delete(entityInformation.getJavaType());
  }
}
origin: apache/servicemix-bundles

  @Override
  public void deleteAll() {
    operations.delete(entityInformation.getJavaType());
  }
}
origin: org.springframework.data/spring-data-keyvalue

@Override
public void deleteById(ID id) {
  operations.delete(id, entityInformation.getJavaType());
}
origin: apache/servicemix-bundles

@Override
public void deleteById(ID id) {
  operations.delete(id, entityInformation.getJavaType());
}
origin: com.hazelcast/spring-data-hazelcast

/**
 * Execute a "delete" query, not really a query more of an operation.
 * <p>
 *
 * @param query       The query to run
 * @param queryMethod Used here to find the type of object to match the query
 * @return Collection of deleted objects or the number of deleted objects
 */
private Object executeDeleteQuery(final KeyValueQuery<?> query, final QueryMethod queryMethod) {
  Iterable<?> resultSet = this.keyValueOperations.find(query, queryMethod.getEntityInformation().getJavaType());
  Iterator<?> iterator = resultSet.iterator();
  List<Object> result = new ArrayList<>();
  while (iterator.hasNext()) {
    result.add(this.keyValueOperations.delete(iterator.next()));
  }
  if (queryMethod.isCollectionQuery()) {
    return result;
  } else if (long.class.equals(queryMethod.getReturnedObjectType()) || Long.class
      .equals(queryMethod.getReturnedObjectType())) {
    return result.size();
  } else {
    throw new UnsupportedOperationException(String.format(
        "Illegal returned type: %s. The operation 'deleteBy' accepts only 'long' and 'Collection' as the returned "
            + "object type", queryMethod.getReturnedObjectType()));
  }
}
org.springframework.data.keyvalue.coreKeyValueOperationsdelete

Javadoc

Remove all elements of type. Respects KeySpace if present and therefore removes all elements that can be assigned to requested type.

Popular methods of KeyValueOperations

  • getMappingContext
  • count
    Total number of elements matching given query. Respects KeySpace if present and therefore counts all
  • find
    Get all elements matching the given query. Respects KeySpace if present and therefore returns all e
  • destroy
  • findAll
    Get all elements ordered by sort. Respects KeySpace if present and therefore returns all elements th
  • findById
    Get element of given type with given id. Respects KeySpace if present and therefore returns all elem
  • findInRange
    Get all elements in given range ordered by sort. Respects KeySpace if present and therefore returns
  • insert
    Add object with given id.
  • update

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JFrame (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now