Versioned IDs are namespace-aware identifiers that support simple value incrementation while storing a high degree of information. They offer application developers an easy way to build complex, version-sensitive domain models with strong IDs that are:
- Categorical
- Human-readable
- Incrementable
- Immutable
- Serializable
- Sortable
- Time-specific (to nanosecond)
- Start by including the Versioned IDs library in your project. Here's an example of including it as a Maven compile dependency:
<dependency>
<groupId>io.github.davejoyce</groupId>
<artifactId>versioned-ids</artifactId>
<version>1.1.2</version>
</dependency>
- Choose one of the 3 basic ID types depending upon the level of time-sensitivity in your domain model.
You need: | Choose: |
---|---|
categorical organization of IDs | NamespaceId<T> |
...and storage of creation/effective time | TemporalNamespaceId<T> |
...and storage of update/fixing time | BiTemporalNamespaceId<T> |
- Does the type you selected store enough information, or do you need more? The classes in this library support extension and composition!
Project documentation (including API documentation)
For bugs, questions, and discussions please use the project's issues.
Copyright 2017 David Joyce
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.