本文整理匯總了Java中org.javers.core.diff.changetype.NewObject類的典型用法代碼示例。如果您正苦於以下問題:Java NewObject類的具體用法?Java NewObject怎麽用?Java NewObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NewObject類屬於org.javers.core.diff.changetype包,在下文中一共展示了NewObject類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fromJson
import org.javers.core.diff.changetype.NewObject; //導入依賴的package包/類
@Override
public NewObject fromJson(JsonElement json, JsonDeserializationContext context) {
JsonObject jsonObject = (JsonObject) json;
CommitMetadata commitMetadata = deserializeCommitMetadata(jsonObject, context);
return new NewObject(deserializeAffectedCdoId(jsonObject,context), Optional.empty(), ofNullable(commitMetadata));
}
示例2: addInitialChanges
import org.javers.core.diff.changetype.NewObject; //導入依賴的package包/類
private void addInitialChanges(List<Change> changes, CdoSnapshot initialSnapshot) {
CdoSnapshot emptySnapshot = CdoSnapshotBuilder.emptyCopyOf(initialSnapshot).build();
Diff diff = diffFactory.create(snapshotGraph(emptySnapshot), snapshotGraph(initialSnapshot),
commitMetadata(initialSnapshot));
NewObject newObjectChange =
new NewObject(initialSnapshot.getGlobalId(), empty(), of(initialSnapshot.getCommitMetadata()));
changes.addAll(diff.getChanges());
changes.add(newObjectChange);
}
示例3: getValueType
import org.javers.core.diff.changetype.NewObject; //導入依賴的package包/類
@Override
public Class getValueType() {
return NewObject.class;
}
示例4: getChangeSet
import org.javers.core.diff.changetype.NewObject; //導入依賴的package包/類
@Override
public Set<Change> getChangeSet(GraphPair graphPair) {
return Sets.transform(graphPair.getOnlyOnRight(), input ->
new NewObject(input.getGlobalId(), input.wrappedCdo()));
}
示例5: onNewObject
import org.javers.core.diff.changetype.NewObject; //導入依賴的package包/類
@Override
public void onNewObject(NewObject newObject) {
appendln(" new object: " + newObject.getAffectedGlobalId());
}