lariat

Morphia extension that transparently archives old versions of entities allowing for rollbacks

License

License

Categories

Categories

Ant Build Tools
GroupId

GroupId

com.antwerkz.lariat
ArtifactId

ArtifactId

lariat
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

lariat
Morphia extension that transparently archives old versions of entities allowing for rollbacks
Project URL

Project URL

https://github.com/evanchooly/lariat
Source Code Management

Source Code Management

https://github.com/evanchooly/lariat

Download lariat

How to add to project

<!-- https://jarcasting.com/artifacts/com.antwerkz.lariat/lariat/ -->
<dependency>
    <groupId>com.antwerkz.lariat</groupId>
    <artifactId>lariat</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.antwerkz.lariat/lariat/
implementation 'com.antwerkz.lariat:lariat:0.2'
// https://jarcasting.com/artifacts/com.antwerkz.lariat/lariat/
implementation ("com.antwerkz.lariat:lariat:0.2")
'com.antwerkz.lariat:lariat:jar:0.2'
<dependency org="com.antwerkz.lariat" name="lariat" rev="0.2">
  <artifact name="lariat" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.antwerkz.lariat', module='lariat', version='0.2')
)
libraryDependencies += "com.antwerkz.lariat" % "lariat" % "0.2"
[com.antwerkz.lariat/lariat "0.2"]

Dependencies

test (2)

Group / Artifact Type Version
org.testng : testng jar 6.8.1
com.jayway.awaitility : awaitility jar 1.6.1

Project Modules

There are no modules declared in this project.

Lariat

A semi-experimental extension to morphia that transparently archives old versions of your entities and allows for rollbacks to previous states. e.g., the class below will be archived in to the collection records_archive and will keep only the last 3 versions. More docs and examples are (probably) on the way but for now see LariatTest.java.

    @Entity("records")
    public class Record {
        public static final int MAX_ARCHIVE_COUNT = 3;

        @Id
        private ObjectId id;
        private String name;
        private String content;
        @Version
        @Archived(count = Record.MAX_ARCHIVE_COUNT)
        private long version;
    }

Versions

Version
0.2
0.1