org.apache.isis.core.metamodel.adapter.version.Version.sequence()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.apache.isis.core.metamodel.adapter.version.Version.sequence()方法的一些代码示例,展示了Version.sequence()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.sequence()方法的具体详情如下:
包路径:org.apache.isis.core.metamodel.adapter.version.Version
类名称:Version
方法名:sequence

Version.sequence介绍

[英]Returns the sequence for printing/display
[中]返回打印/显示的顺序

代码示例

代码示例来源:origin: org.apache.isis.viewer/scimpi-dispatcher

@Override
public String mapVersion(final Version version) {
  // SerialNumberVersion v = (SerialNumberVersion) version;
  // return Long.toHexString(v.getSequence());
  return version.sequence();
}

代码示例来源:origin: org.apache.isis.runtimes.dflt/runtime

protected void toString(final ToString str) {
  str.append(resolveState.code());
  final Oid oid = getOid();
  if (oid != null) {
    str.append(":");
    str.append(oid.toString());
  } else {
    str.append(":-");
  }
  str.setAddComma();
  if (getSpecificationNoLoad() == null) {
    str.append("class", getObject().getClass().getName());
  } else {
    str.append("specification", getSpecification().getShortIdentifier());
  }
  str.append("version", version == null ? null : version.sequence());
}

代码示例来源:origin: org.apache.isis.core/isis-core-runtime

protected void toString(final ToString str) {
  str.append(aggregateResolveStateCode());
  final Oid oid = getOid();
  if (oid != null) {
    str.append(":");
    str.append(oid.toString());
  } else {
    str.append(":-");
  }
  str.setAddComma();
  if (getSpecificationNoLoad() == null) {
    str.append("class", getObject().getClass().getName());
  } else {
    str.append("specification", getSpecification().getShortIdentifier());
  }
  if(getOid() != null) {
    final Version version = getOid().getVersion();
    str.append("version", version != null ? version.sequence() : null);
  }
}

代码示例来源:origin: org.apache.isis.core/isis-core-metamodel

@Test
public void sequence_and_toString() throws Exception {
  final Version testVersion = new Version(extended);
  
  assertTrue(testVersion.sequence().length() > 0);
  assertTrue(testVersion.getSequence() == 0);
  assertTrue(testVersion.toString().length() > 0);
  assertTrue(testVersion.equals(testVersion));
  assertFalse(testVersion.equals(version));
}

代码示例来源: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"));
    }
  });
}

相关文章