Tupl Support
Overview
This library intended to provide a set of support interfaces with default implementations as well as set of DAO exceptions, specific to Tupl operations.
These interfaces can be inherited by certain DAO (data access object) in order to provide easier access to Tupl operations, such as accessing the indexes or operating with transactions.
This library includes the following modules:
tupl-test-support- utility methods for Tupl integration tests.tupl-support- helpers for creating Tupl data access objects.tupl-protobuf-support- extension oftupl-supportproviding helpers, that combine protocol buffers support withtupl-support.
Key entities
TuplTransactionManagerand its descendantStandardTuplTransactionManagerwhich is a central interface, around which every DAO revolves. This interface provides a contract for accessing Tupl transactions which is then used by all extension interfaces, provided intupl-support.Key- wrapper on top of byte arrays that intended to represent Tupl keysDaoExceptionand its descendants - provides a common set of exceptions, thrown from Tupl DAOs.TuplLoadSupportandByteArrayResultMapper- base entities that provide support for uniform data retrieval from Tupl databases.TuplUpdateSupport- helper interface with default methods that provide support for insert, update and delete operations.PersistenceMapDao- a contract, that exposes access to Tupl index in a form of a Map-alike interface, these methods include get, put and enumerate operations. **PersistenceMapDao.newStringMap- String-to-String implementation ofPersistenceMapDao**StandardPersistentMapDao- standard abstract base forPersistenceMapDao. **ProtobufModelPersistentMapDaofromtupl-protobuf-support- support for protocol buffer messages DAO.
Samples
See sample DAO implementation in BookDaoImpl
See persistent map tests in:
How to use
Add jar dependency in your pom.xml:
<dependency>
<groupId>com.truward.tupl</groupId>
<artifactId>tupl-support</artifactId>
<version>1.1.3/version>
</dependency>