@Test public void Linear_Versions() { Product product = new Product(); product.name = "name"; product.price = new BigDecimal("1.1"); product.status = IN_STOCK; product.statusDate = new DateTime(); ObjectVersion<Void> version = versionManager.versionBuilder(product).build(); assertThat(version.changeset.size(), equalTo(5)); defaultMergeNoConflicts(product); product.price = new BigDecimal("2.0"); version = versionManager.versionBuilder(product).build(); assertThat(version.changeset.size(), equalTo(1)); defaultMergeNoConflicts(product); product.name = "nextgen"; product.status = PRE_ORDER; product.statusDate = new DateTime(); version = versionManager.versionBuilder(product).build(); assertThat(version.changeset.size(), equalTo(3)); defaultMergeNoConflicts(product); product.name = null; version = versionManager.versionBuilder(product).build(); assertThat(version.changeset.size(), equalTo(1)); defaultMergeNoConflicts(product); }
public ManagedObjectVersionBuilder<M> versionBuilder(O object) { ManagedObjectVersionBuilder<M> builder = new ManagedObjectVersionBuilder<M>(this, serializer.toPropertyMap(object)); builder.parents(heads); return builder; }
ObjectVersionManager { public ManagedObjectVersionBuilder<M> versionBuilder(O object) { ManagedObjectVersionBuilder<M> builder = new ManagedObjectVersionBuilder<M>(this, serializer.toPropertyMap(object)); builder.parents(heads); return builder; } }
ObjectVersionManager { public ManagedObjectVersionBuilder<M> versionBuilder(O object) { ManagedObjectVersionBuilder<M> builder = new ManagedObjectVersionBuilder<M>(this, serializer.toPropertyMap(object)); builder.parents(heads); return builder; } ObjectVersionManager(Class<O> clazz);  ObjectVersionManager(ObjectSerializer<O> serializer, boolean useSchemaFilter); }
ObjectVersionManager { public ManagedObjectVersionBuilder<M> versionBuilder(O object) { ManagedObjectVersionBuilder<M> builder = new ManagedObjectVersionBuilder<M>(this, serializer.toPropertyMap(object)); builder.parents(heads); return builder; } ObjectVersionManager(Class<O> clazz);  ObjectVersionManager(ObjectSerializer<O> serializer, boolean useSchemaFilter); ObjectVersionManager<O, M> init(); ObjectVersionManager<O, M> init(Iterable<ObjectVersion<M>> versions); ObjectVersionManager<O, M> init(VersionGraph<PropertyPath, Object, M> versionGraph); ManagedObjectVersionBuilder<M> versionBuilder(O object); MergeObject<O, M> mergeBranches(String... branches); MergeObject<O, M> mergeBranches(Collection<String> branches); MergeObject<O, M> mergeRevisions(Collection<Revision> revisions); VersionNode<PropertyPath, Object, M> commit(Version<PropertyPath, Object, M> version); VersionGraph<PropertyPath, Object, M> getVersionGraph(); Set<Revision> getHeads(); VersionNode<PropertyPath, Object, M> getVersionNode(Revision revision); Set<String> getBranches(); Schema<ValueType> getSchema(); boolean isEmpty(); }
ObjectVersionManager { public ManagedObjectVersionBuilder<M> versionBuilder(O object) { ManagedObjectVersionBuilder<M> builder = new ManagedObjectVersionBuilder<M>(this, serializer.toPropertyMap(object)); builder.parents(heads); return builder; } ObjectVersionManager(Class<O> clazz);  ObjectVersionManager(ObjectSerializer<O> serializer, boolean useSchemaFilter); ObjectVersionManager<O, M> init(); ObjectVersionManager<O, M> init(Iterable<ObjectVersion<M>> versions); ObjectVersionManager<O, M> init(VersionGraph<PropertyPath, Object, M> versionGraph); ManagedObjectVersionBuilder<M> versionBuilder(O object); MergeObject<O, M> mergeBranches(String... branches); MergeObject<O, M> mergeBranches(Collection<String> branches); MergeObject<O, M> mergeRevisions(Collection<Revision> revisions); VersionNode<PropertyPath, Object, M> commit(Version<PropertyPath, Object, M> version); VersionGraph<PropertyPath, Object, M> getVersionGraph(); Set<Revision> getHeads(); VersionNode<PropertyPath, Object, M> getVersionNode(Revision revision); Set<String> getBranches(); Schema<ValueType> getSchema(); boolean isEmpty();  }