コード例 #1
0
  @Override
  public Release toEntityModel() {
    ReleaseImpl releaseImpl = new ReleaseImpl();

    releaseImpl.setMvccVersion(mvccVersion);
    releaseImpl.setReleaseId(releaseId);

    if (createDate == Long.MIN_VALUE) {
      releaseImpl.setCreateDate(null);
    } else {
      releaseImpl.setCreateDate(new Date(createDate));
    }

    if (modifiedDate == Long.MIN_VALUE) {
      releaseImpl.setModifiedDate(null);
    } else {
      releaseImpl.setModifiedDate(new Date(modifiedDate));
    }

    if (servletContextName == null) {
      releaseImpl.setServletContextName(StringPool.BLANK);
    } else {
      releaseImpl.setServletContextName(servletContextName);
    }

    if (schemaVersion == null) {
      releaseImpl.setSchemaVersion(StringPool.BLANK);
    } else {
      releaseImpl.setSchemaVersion(schemaVersion);
    }

    releaseImpl.setBuildNumber(buildNumber);

    if (buildDate == Long.MIN_VALUE) {
      releaseImpl.setBuildDate(null);
    } else {
      releaseImpl.setBuildDate(new Date(buildDate));
    }

    releaseImpl.setVerified(verified);
    releaseImpl.setState(state);

    if (testString == null) {
      releaseImpl.setTestString(StringPool.BLANK);
    } else {
      releaseImpl.setTestString(testString);
    }

    releaseImpl.resetOriginalValues();

    return releaseImpl;
  }
コード例 #2
0
  @Override
  public Object clone() {
    ReleaseImpl releaseImpl = new ReleaseImpl();

    releaseImpl.setReleaseId(getReleaseId());
    releaseImpl.setCreateDate(getCreateDate());
    releaseImpl.setModifiedDate(getModifiedDate());
    releaseImpl.setServletContextName(getServletContextName());
    releaseImpl.setBuildNumber(getBuildNumber());
    releaseImpl.setBuildDate(getBuildDate());
    releaseImpl.setVerified(getVerified());
    releaseImpl.setState(getState());
    releaseImpl.setTestString(getTestString());

    releaseImpl.resetOriginalValues();

    return releaseImpl;
  }