Commit Graph

13 Commits

Author SHA1 Message Date
Martin Macko
95c56c8dd4 DATAKV-114 - Fixed NullPointerException in SpelQueryEngine.
Original pull request: #15.
2015-11-02 06:31:28 +01:00
Oliver Gierke
3371a6b7a2 DATAKV-104 - Polishing.
Moved configuration setters under constructors of KeyValueTemplate.

Original pull request: #12.
2015-05-19 17:49:12 +02:00
Christoph Strobl
fe50d6b242 DATAKV-104 - Refactor event handling according to design in Spring Data MongoDB.
We now favor dedicated types over event type enum and allow events to be generically typed. We favor ApplicationEventPublisherAware over ApplicationContextAware. By default we now publish all events and allow user to opt out.

Original pull request: #12.
2015-05-19 17:49:12 +02:00
Oliver Gierke
e3733ab9b5 DATAKV-105 - Polishing.
Moved KeySpaceResolver interfaces into mapping package. Let defaulting happen in BasicKeyValuePersistentEntity so that ClassNameKeySpaceResolver can be made package protected.

FowardingCloseableIterator is now generically typed and not bound to Map.Entry.

Original pull request: #11.
2015-05-19 17:36:00 +02:00
Christoph Strobl
f19a6c0faf DATAKV-105 - Polish implementation after recent addition of features.
Remove obsolete method hasKeyspace() from KeyValueAdapter. Transition from List to Iterable for find methods in KeyValueTemplate.

We now offer a plug able KeySpace resolution by providing a KeySpaceResolver via the KeyValueMappingContext. By default an AnnotationBasedKeySpaceResolver will be used to examine the type for @KeySpace. In case of non explicit keySpace we fall back to using the class' fully-qualified name as the default key space.

Key space resolution is now fixed on resolving @KeySpace on a given PersistentEntity. In case no annotation key space can be found we by default fall back to a class name based key space. It is possible to configure the fallback via the MappingContext.

Refactored names & visibility of types required for tests.
Removed shortcut for returning results not having an explicit key space, since we now can no longer rely on the type name strategy dividing non explicit types into separate key spaces.

Original pull request: #11.
2015-05-19 17:35:56 +02:00
Christoph Strobl
02759f58ea DATAKV-99 - Polishing.
Removed dedicated Entry<K,V> interface, since Map.Entry<K,V> is already sufficient. Favoured CloseableIterator over KeyValueIterator since it offers no additional functionality but less generic parameter clutter.
Added missing JavaDoc.
2015-05-13 12:53:44 +02:00
Christoph Strobl
952a901164 DATAKV-101 - Favor Iterable over Collection types for KeyValueOperations.
Change return types for Adapter and Operations from Collection types to Iterable. Added count(keyspace) to KeyValueAdapter.

Original pull request: #8.
2015-05-11 11:39:56 +02:00
Christoph Strobl
16dc4b5e7d DATAKV-99 - Add KeyValueIterator.
We now offer the possibility to iterate through available key/value pairs via a KeyValueIterator. The default implementation for java.util.Map based Adapters is a ForwardingKeyValueIterator delegating to the underlying entrySet iterator.

Original pull request: #7.
2015-05-11 11:26:31 +02:00
Christoph Strobl
07b3a1547c DATAKV-91 - Add support for sending application events.
We now allow definition of event types to be published via the application context.

Original pull request: #5.
2015-05-05 16:09:31 +02:00
Oliver Gierke
8f1bc111b4 DATAKV-95 - Added exists(…) method to QuerydslKeyValueRepository.
Renamed QueryDsl… classes to Querydsl… for consistency. Restructured test cases for repositories to make better use of generics.
2015-02-03 11:50:16 +01:00
Christoph Strobl
ff1338a99c DATAKV-86 - Move configuration infrastructure for Map-based repositories.
We removed the EnableKeyValueRepositories in favor of store specific implementations. In this case EnableMapRepositories.

The configuration now defaults a KeyValueTemplate with a MapKeyValueAdapter but allows overriding the template in a bean named keyValueTemplate.
2014-12-01 16:13:01 +01:00
Christoph Strobl
5f62882a3e DATAKV-89 - KeyValueTemplate now throws DuplicateKeyException.
We now throw DuplicateKeyException instead of InvalidDataAccessApiUsageException in case an object with given id already exists.

Original pull request: spring-projects/spring-data-commons#106.
2014-11-27 14:30:22 +01:00
Oliver Gierke
42a13a7403 DATAKV-85 - Ported key-value infrastructure from Spring Data Commons. 2014-11-27 14:19:30 +01:00