com.atlassian.jira.project.version.Version.getSequence()方法的使用及代码示例

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

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

Version.getSequence介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.jira/jira-api

@Override
  public Comparable getValue(final Version entity)
  {
    return entity.getSequence();
  }
},

代码示例来源:origin: com.atlassian.jira/jira-core

public int compare(final Version version, final Version version1)
  {
    return version.getSequence().compareTo(version1.getSequence());
  }
});

代码示例来源:origin: com.atlassian.jira/jira-core

public int compare(final Version version, final Version version1)
  {
    return version.getSequence().compareTo(version1.getSequence());
  }
});

代码示例来源:origin: com.atlassian.jira/jira-core

private long getMaxVersionSequence(final Long projectId)
{
  long maxSequence = 1L;
  for (final Version version : getVersions(projectId))
  {
    if ((version.getSequence() != null) && (version.getSequence() >= maxSequence))
    {
      maxSequence = version.getSequence() + 1L;
    }
  }
  return maxSequence;
}

代码示例来源:origin: com.atlassian.jira/jira-core

private Version getLastVersion(final Long projectId)
{
  long maxSequence = 0L;
  Version lastVersion = null;
  for (final Version version : getVersions(projectId))
  {
    if ((version.getSequence() != null) && (version.getSequence() >= maxSequence))
    {
      maxSequence = version.getSequence();
      lastVersion = version;
    }
  }
  return lastVersion;
}

代码示例来源:origin: com.atlassian.jira/jira-core

private void moveVersionSequences(final Long scheduleAfterVersion)
{
  final Version startVersion = getVersion(scheduleAfterVersion);
  final Collection<Version> versions = getVersions(startVersion.getProjectId());
  final List<Version> versionsChanged = Lists.newArrayListWithCapacity(versions.size());
  for (final Version version : versions)
  {
    if (version.getSequence() > startVersion.getSequence())
    {
      final Long newSequence = version.getSequence() + 1L;
      versionsChanged.add(new VersionBuilderImpl(version).sequence(newSequence).build());
    }
  }
  versionStore.storeVersions(versionsChanged);
}

代码示例来源:origin: com.atlassian.jira/jira-core

/**
 * Given a re-ordered list of versions, commit the changes to the backend datastore.
 */
public void storeReorderedVersionList(final List<Version> versions)
{
  final List<Version> versionsChanged = Lists.newArrayListWithCapacity(versions.size());
  for (int i = 0; i < versions.size(); i++)
  {
    final Version version = versions.get(i);
    final long expectedSequenceNumber = i + 1L;
    if (expectedSequenceNumber != version.getSequence())
    {
      versionsChanged.add(new VersionBuilderImpl(version).sequence(expectedSequenceNumber).build());
    }
  }
  versionStore.storeVersions(versionsChanged);
}

代码示例来源:origin: com.atlassian.jira/jira-core

private void moveAllVersionSequences(final Long project)
{
  final Collection<Version> versions = getVersions(project);
  final List<Version> versionsChanged = Lists.newArrayListWithCapacity(versions.size());
  for (final Version version : versions)
  {
    final Long newSequence = version.getSequence() + 1L;
    versionsChanged.add(new VersionBuilderImpl(version).sequence(newSequence).build());
  }
  versionStore.storeVersions(versionsChanged);
}

代码示例来源:origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public static RemoteVersion[] convertVersionsToRemoteObject(Collection versions)
{
  RemoteVersion[] result = new RemoteVersion[versions.size()];
  int count = 0;
  for (Iterator iterator = versions.iterator(); iterator.hasNext();)
  {
    Version version = (Version) iterator.next();
    result[count++] = new RemoteVersion(version.getId().toString(), version.getName(), version.isReleased()
        , version.isArchived(), version.getSequence(), version.getReleaseDate());
  }
  return result;
}

代码示例来源:origin: com.atlassian.jira/jira-api

int sequenceComparison = v1.getSequence().compareTo(v2.getSequence());
if (sequenceComparison != 0)

代码示例来源:origin: com.atlassian.jira/jira-core

public VersionBuilderImpl(Version version)
{
  this.version = version;
  this.projectId = version.getProjectId();
  this.sequence = version.getSequence();
  this.name = version.getName();
  this.description = version.getDescription();
  this.startDate = version.getStartDate();
  this.releaseDate = version.getReleaseDate();
  this.released = version.isReleased();
  this.archived = version.isArchived();
}

代码示例来源:origin: com.atlassian.jira/jira-core

final Long newSequence = getVersion(scheduleAfterVersion).getSequence() + 1L;
builder.sequence(newSequence);

代码示例来源:origin: com.atlassian.jira/jira-core

public Map<String, Object> fieldMapFrom(Version value)
{
  FieldMap map = new FieldMap();
  map.add("project", value.getProjectId());
  map.add("id", value.getId());
  map.add("name", value.getName());
  map.add("description", value.getDescription());
  map.add("sequence", value.getSequence());
  map.add("archived", value.isArchived() ? "true" : null);
  map.add("released", value.isReleased() ? "true" : null);
  map.add("releasedate", copyDate(value.getReleaseDate()));
  map.add("startdate", copyDate(value.getStartDate()));
  return map;
}

相关文章