本文整理了Java中org.apache.isis.core.metamodel.adapter.version.Version.getUtcTimestamp()
方法的一些代码示例,展示了Version.getUtcTimestamp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getUtcTimestamp()
方法的具体详情如下:
包路径:org.apache.isis.core.metamodel.adapter.version.Version
类名称:Version
方法名:getUtcTimestamp
暂无
代码示例来源:origin: org.apache.isis.core/isis-core-metamodel
@Test
public void persistentRootWithVersionAndUserAndTimestamp() {
final String oidStr = "CUS:123^90809:fredbloggs:1231231232";
final RootOid rootOid = oidMarshaller.unmarshal(oidStr, RootOid.class);
assertThat(rootOid.isTransient(), is(false));
assertThat(rootOid.getObjectSpecId(), is(ObjectSpecId.of("CUS")));
assertThat(rootOid.getIdentifier(), is("123"));
assertThat(rootOid.getVersion().getSequence(), is(90809L));
assertThat(rootOid.getVersion().getUser(), is("fredbloggs"));
assertThat(rootOid.getVersion().getUtcTimestamp(), is(1231231232L));
final Oid oid = oidMarshaller.unmarshal(oidStr, Oid.class);
assertThat(oid, equalTo((Oid)rootOid));
}
代码示例来源:origin: org.apache.isis.core/isis-core-plugins-jdo-datanucleus-5
private void allowUnimportantMethodCallsOn(final Version version) {
context.checking(new Expectations() {
{
allowing(version).getSequence();
allowing(version).getUtcTimestamp();
allowing(version).sequence();
allowing(version).getUser();
allowing(version).hasTimestamp();
allowing(version).getTime();
will(returnValue(new Date()));
allowing(mockAuthenticationSession).getUserName();
will(returnValue("fredbloggs"));
}
});
}
内容来源于网络,如有侵权,请联系作者删除!