protected Release addRelease() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    Release release = _persistence.create(pk);

    release.setMvccVersion(ServiceTestUtil.nextLong());

    release.setCreateDate(ServiceTestUtil.nextDate());

    release.setModifiedDate(ServiceTestUtil.nextDate());

    release.setServletContextName(ServiceTestUtil.randomString());

    release.setBuildNumber(ServiceTestUtil.nextInt());

    release.setBuildDate(ServiceTestUtil.nextDate());

    release.setVerified(ServiceTestUtil.randomBoolean());

    release.setState(ServiceTestUtil.nextInt());

    release.setTestString(ServiceTestUtil.randomString());

    _persistence.update(release);

    return release;
  }
示例#2
0
  protected PollsVote addPollsVote() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    PollsVote pollsVote = _persistence.create(pk);

    pollsVote.setUuid(ServiceTestUtil.randomString());

    pollsVote.setGroupId(ServiceTestUtil.nextLong());

    pollsVote.setCompanyId(ServiceTestUtil.nextLong());

    pollsVote.setUserId(ServiceTestUtil.nextLong());

    pollsVote.setUserName(ServiceTestUtil.randomString());

    pollsVote.setCreateDate(ServiceTestUtil.nextDate());

    pollsVote.setModifiedDate(ServiceTestUtil.nextDate());

    pollsVote.setQuestionId(ServiceTestUtil.nextLong());

    pollsVote.setChoiceId(ServiceTestUtil.nextLong());

    pollsVote.setVoteDate(ServiceTestUtil.nextDate());

    _persistence.update(pollsVote);

    return pollsVote;
  }
  protected LayoutPrototype addLayoutPrototype() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    LayoutPrototype layoutPrototype = _persistence.create(pk);

    layoutPrototype.setMvccVersion(ServiceTestUtil.nextLong());

    layoutPrototype.setUuid(ServiceTestUtil.randomString());

    layoutPrototype.setCompanyId(ServiceTestUtil.nextLong());

    layoutPrototype.setUserId(ServiceTestUtil.nextLong());

    layoutPrototype.setUserName(ServiceTestUtil.randomString());

    layoutPrototype.setCreateDate(ServiceTestUtil.nextDate());

    layoutPrototype.setModifiedDate(ServiceTestUtil.nextDate());

    layoutPrototype.setName(ServiceTestUtil.randomString());

    layoutPrototype.setDescription(ServiceTestUtil.randomString());

    layoutPrototype.setSettings(ServiceTestUtil.randomString());

    layoutPrototype.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(layoutPrototype);

    return layoutPrototype;
  }
示例#4
0
  protected MDRRuleGroup addMDRRuleGroup() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MDRRuleGroup mdrRuleGroup = _persistence.create(pk);

    mdrRuleGroup.setUuid(ServiceTestUtil.randomString());

    mdrRuleGroup.setGroupId(ServiceTestUtil.nextLong());

    mdrRuleGroup.setCompanyId(ServiceTestUtil.nextLong());

    mdrRuleGroup.setUserId(ServiceTestUtil.nextLong());

    mdrRuleGroup.setUserName(ServiceTestUtil.randomString());

    mdrRuleGroup.setCreateDate(ServiceTestUtil.nextDate());

    mdrRuleGroup.setModifiedDate(ServiceTestUtil.nextDate());

    mdrRuleGroup.setName(ServiceTestUtil.randomString());

    mdrRuleGroup.setDescription(ServiceTestUtil.randomString());

    _persistence.update(mdrRuleGroup, false);

    return mdrRuleGroup;
  }
  protected ShoppingCart addShoppingCart() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingCart shoppingCart = _persistence.create(pk);

    shoppingCart.setGroupId(ServiceTestUtil.nextLong());

    shoppingCart.setCompanyId(ServiceTestUtil.nextLong());

    shoppingCart.setUserId(ServiceTestUtil.nextLong());

    shoppingCart.setUserName(ServiceTestUtil.randomString());

    shoppingCart.setCreateDate(ServiceTestUtil.nextDate());

    shoppingCart.setModifiedDate(ServiceTestUtil.nextDate());

    shoppingCart.setItemIds(ServiceTestUtil.randomString());

    shoppingCart.setCouponCodes(ServiceTestUtil.randomString());

    shoppingCart.setAltShipping(ServiceTestUtil.nextInt());

    shoppingCart.setInsure(ServiceTestUtil.randomBoolean());

    _persistence.update(shoppingCart);

    return shoppingCart;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MDRAction newMDRAction = _persistence.create(pk);

    newMDRAction.setUuid(ServiceTestUtil.randomString());

    newMDRAction.setGroupId(ServiceTestUtil.nextLong());

    newMDRAction.setCompanyId(ServiceTestUtil.nextLong());

    newMDRAction.setUserId(ServiceTestUtil.nextLong());

    newMDRAction.setUserName(ServiceTestUtil.randomString());

    newMDRAction.setCreateDate(ServiceTestUtil.nextDate());

    newMDRAction.setModifiedDate(ServiceTestUtil.nextDate());

    newMDRAction.setClassNameId(ServiceTestUtil.nextLong());

    newMDRAction.setClassPK(ServiceTestUtil.nextLong());

    newMDRAction.setRuleGroupInstanceId(ServiceTestUtil.nextLong());

    newMDRAction.setName(ServiceTestUtil.randomString());

    newMDRAction.setDescription(ServiceTestUtil.randomString());

    newMDRAction.setType(ServiceTestUtil.randomString());

    newMDRAction.setTypeSettings(ServiceTestUtil.randomString());

    _persistence.update(newMDRAction);

    MDRAction existingMDRAction = _persistence.findByPrimaryKey(newMDRAction.getPrimaryKey());

    Assert.assertEquals(existingMDRAction.getUuid(), newMDRAction.getUuid());
    Assert.assertEquals(existingMDRAction.getActionId(), newMDRAction.getActionId());
    Assert.assertEquals(existingMDRAction.getGroupId(), newMDRAction.getGroupId());
    Assert.assertEquals(existingMDRAction.getCompanyId(), newMDRAction.getCompanyId());
    Assert.assertEquals(existingMDRAction.getUserId(), newMDRAction.getUserId());
    Assert.assertEquals(existingMDRAction.getUserName(), newMDRAction.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingMDRAction.getCreateDate()),
        Time.getShortTimestamp(newMDRAction.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingMDRAction.getModifiedDate()),
        Time.getShortTimestamp(newMDRAction.getModifiedDate()));
    Assert.assertEquals(existingMDRAction.getClassNameId(), newMDRAction.getClassNameId());
    Assert.assertEquals(existingMDRAction.getClassPK(), newMDRAction.getClassPK());
    Assert.assertEquals(
        existingMDRAction.getRuleGroupInstanceId(), newMDRAction.getRuleGroupInstanceId());
    Assert.assertEquals(existingMDRAction.getName(), newMDRAction.getName());
    Assert.assertEquals(existingMDRAction.getDescription(), newMDRAction.getDescription());
    Assert.assertEquals(existingMDRAction.getType(), newMDRAction.getType());
    Assert.assertEquals(existingMDRAction.getTypeSettings(), newMDRAction.getTypeSettings());
  }
示例#7
0
  protected MBMailingList addMBMailingList() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MBMailingList mbMailingList = _persistence.create(pk);

    mbMailingList.setUuid(ServiceTestUtil.randomString());

    mbMailingList.setGroupId(ServiceTestUtil.nextLong());

    mbMailingList.setCompanyId(ServiceTestUtil.nextLong());

    mbMailingList.setUserId(ServiceTestUtil.nextLong());

    mbMailingList.setUserName(ServiceTestUtil.randomString());

    mbMailingList.setCreateDate(ServiceTestUtil.nextDate());

    mbMailingList.setModifiedDate(ServiceTestUtil.nextDate());

    mbMailingList.setCategoryId(ServiceTestUtil.nextLong());

    mbMailingList.setEmailAddress(ServiceTestUtil.randomString());

    mbMailingList.setInProtocol(ServiceTestUtil.randomString());

    mbMailingList.setInServerName(ServiceTestUtil.randomString());

    mbMailingList.setInServerPort(ServiceTestUtil.nextInt());

    mbMailingList.setInUseSSL(ServiceTestUtil.randomBoolean());

    mbMailingList.setInUserName(ServiceTestUtil.randomString());

    mbMailingList.setInPassword(ServiceTestUtil.randomString());

    mbMailingList.setInReadInterval(ServiceTestUtil.nextInt());

    mbMailingList.setOutEmailAddress(ServiceTestUtil.randomString());

    mbMailingList.setOutCustom(ServiceTestUtil.randomBoolean());

    mbMailingList.setOutServerName(ServiceTestUtil.randomString());

    mbMailingList.setOutServerPort(ServiceTestUtil.nextInt());

    mbMailingList.setOutUseSSL(ServiceTestUtil.randomBoolean());

    mbMailingList.setOutUserName(ServiceTestUtil.randomString());

    mbMailingList.setOutPassword(ServiceTestUtil.randomString());

    mbMailingList.setAllowAnonymous(ServiceTestUtil.randomBoolean());

    mbMailingList.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(mbMailingList);

    return mbMailingList;
  }
  protected DLFileVersion addDLFileVersion() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DLFileVersion dlFileVersion = _persistence.create(pk);

    dlFileVersion.setUuid(ServiceTestUtil.randomString());

    dlFileVersion.setGroupId(ServiceTestUtil.nextLong());

    dlFileVersion.setCompanyId(ServiceTestUtil.nextLong());

    dlFileVersion.setUserId(ServiceTestUtil.nextLong());

    dlFileVersion.setUserName(ServiceTestUtil.randomString());

    dlFileVersion.setCreateDate(ServiceTestUtil.nextDate());

    dlFileVersion.setModifiedDate(ServiceTestUtil.nextDate());

    dlFileVersion.setRepositoryId(ServiceTestUtil.nextLong());

    dlFileVersion.setFolderId(ServiceTestUtil.nextLong());

    dlFileVersion.setFileEntryId(ServiceTestUtil.nextLong());

    dlFileVersion.setTreePath(ServiceTestUtil.randomString());

    dlFileVersion.setExtension(ServiceTestUtil.randomString());

    dlFileVersion.setMimeType(ServiceTestUtil.randomString());

    dlFileVersion.setTitle(ServiceTestUtil.randomString());

    dlFileVersion.setDescription(ServiceTestUtil.randomString());

    dlFileVersion.setChangeLog(ServiceTestUtil.randomString());

    dlFileVersion.setExtraSettings(ServiceTestUtil.randomString());

    dlFileVersion.setFileEntryTypeId(ServiceTestUtil.nextLong());

    dlFileVersion.setVersion(ServiceTestUtil.randomString());

    dlFileVersion.setSize(ServiceTestUtil.nextLong());

    dlFileVersion.setChecksum(ServiceTestUtil.randomString());

    dlFileVersion.setStatus(ServiceTestUtil.nextInt());

    dlFileVersion.setStatusByUserId(ServiceTestUtil.nextLong());

    dlFileVersion.setStatusByUserName(ServiceTestUtil.randomString());

    dlFileVersion.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(dlFileVersion);

    return dlFileVersion;
  }
  @Test
  public void testCountByLtD_S() {
    try {
      _persistence.countByLtD_S(ServiceTestUtil.nextDate(), ServiceTestUtil.nextInt());

      _persistence.countByLtD_S(ServiceTestUtil.nextDate(), 0);
    } catch (Exception e) {
      Assert.fail(e.getMessage());
    }
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    LayoutPrototype newLayoutPrototype = _persistence.create(pk);

    newLayoutPrototype.setMvccVersion(ServiceTestUtil.nextLong());

    newLayoutPrototype.setUuid(ServiceTestUtil.randomString());

    newLayoutPrototype.setCompanyId(ServiceTestUtil.nextLong());

    newLayoutPrototype.setUserId(ServiceTestUtil.nextLong());

    newLayoutPrototype.setUserName(ServiceTestUtil.randomString());

    newLayoutPrototype.setCreateDate(ServiceTestUtil.nextDate());

    newLayoutPrototype.setModifiedDate(ServiceTestUtil.nextDate());

    newLayoutPrototype.setName(ServiceTestUtil.randomString());

    newLayoutPrototype.setDescription(ServiceTestUtil.randomString());

    newLayoutPrototype.setSettings(ServiceTestUtil.randomString());

    newLayoutPrototype.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(newLayoutPrototype);

    LayoutPrototype existingLayoutPrototype =
        _persistence.findByPrimaryKey(newLayoutPrototype.getPrimaryKey());

    Assert.assertEquals(
        existingLayoutPrototype.getMvccVersion(), newLayoutPrototype.getMvccVersion());
    Assert.assertEquals(existingLayoutPrototype.getUuid(), newLayoutPrototype.getUuid());
    Assert.assertEquals(
        existingLayoutPrototype.getLayoutPrototypeId(), newLayoutPrototype.getLayoutPrototypeId());
    Assert.assertEquals(existingLayoutPrototype.getCompanyId(), newLayoutPrototype.getCompanyId());
    Assert.assertEquals(existingLayoutPrototype.getUserId(), newLayoutPrototype.getUserId());
    Assert.assertEquals(existingLayoutPrototype.getUserName(), newLayoutPrototype.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingLayoutPrototype.getCreateDate()),
        Time.getShortTimestamp(newLayoutPrototype.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingLayoutPrototype.getModifiedDate()),
        Time.getShortTimestamp(newLayoutPrototype.getModifiedDate()));
    Assert.assertEquals(existingLayoutPrototype.getName(), newLayoutPrototype.getName());
    Assert.assertEquals(
        existingLayoutPrototype.getDescription(), newLayoutPrototype.getDescription());
    Assert.assertEquals(existingLayoutPrototype.getSettings(), newLayoutPrototype.getSettings());
    Assert.assertEquals(existingLayoutPrototype.getActive(), newLayoutPrototype.getActive());
  }
  protected DLFolder addDLFolder() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DLFolder dlFolder = _persistence.create(pk);

    dlFolder.setUuid(ServiceTestUtil.randomString());

    dlFolder.setGroupId(ServiceTestUtil.nextLong());

    dlFolder.setCompanyId(ServiceTestUtil.nextLong());

    dlFolder.setUserId(ServiceTestUtil.nextLong());

    dlFolder.setUserName(ServiceTestUtil.randomString());

    dlFolder.setCreateDate(ServiceTestUtil.nextDate());

    dlFolder.setModifiedDate(ServiceTestUtil.nextDate());

    dlFolder.setRepositoryId(ServiceTestUtil.nextLong());

    dlFolder.setMountPoint(ServiceTestUtil.randomBoolean());

    dlFolder.setParentFolderId(ServiceTestUtil.nextLong());

    dlFolder.setName(ServiceTestUtil.randomString());

    dlFolder.setDescription(ServiceTestUtil.randomString());

    dlFolder.setLastPostDate(ServiceTestUtil.nextDate());

    dlFolder.setDefaultFileEntryTypeId(ServiceTestUtil.nextLong());

    dlFolder.setHidden(ServiceTestUtil.randomBoolean());

    dlFolder.setOverrideFileEntryTypes(ServiceTestUtil.randomBoolean());

    dlFolder.setStatus(ServiceTestUtil.nextInt());

    dlFolder.setStatusByUserId(ServiceTestUtil.nextLong());

    dlFolder.setStatusByUserName(ServiceTestUtil.randomString());

    dlFolder.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(dlFolder);

    return dlFolder;
  }
示例#12
0
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    PollsVote newPollsVote = _persistence.create(pk);

    newPollsVote.setUuid(ServiceTestUtil.randomString());

    newPollsVote.setGroupId(ServiceTestUtil.nextLong());

    newPollsVote.setCompanyId(ServiceTestUtil.nextLong());

    newPollsVote.setUserId(ServiceTestUtil.nextLong());

    newPollsVote.setUserName(ServiceTestUtil.randomString());

    newPollsVote.setCreateDate(ServiceTestUtil.nextDate());

    newPollsVote.setModifiedDate(ServiceTestUtil.nextDate());

    newPollsVote.setQuestionId(ServiceTestUtil.nextLong());

    newPollsVote.setChoiceId(ServiceTestUtil.nextLong());

    newPollsVote.setVoteDate(ServiceTestUtil.nextDate());

    _persistence.update(newPollsVote);

    PollsVote existingPollsVote = _persistence.findByPrimaryKey(newPollsVote.getPrimaryKey());

    Assert.assertEquals(existingPollsVote.getUuid(), newPollsVote.getUuid());
    Assert.assertEquals(existingPollsVote.getVoteId(), newPollsVote.getVoteId());
    Assert.assertEquals(existingPollsVote.getGroupId(), newPollsVote.getGroupId());
    Assert.assertEquals(existingPollsVote.getCompanyId(), newPollsVote.getCompanyId());
    Assert.assertEquals(existingPollsVote.getUserId(), newPollsVote.getUserId());
    Assert.assertEquals(existingPollsVote.getUserName(), newPollsVote.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingPollsVote.getCreateDate()),
        Time.getShortTimestamp(newPollsVote.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingPollsVote.getModifiedDate()),
        Time.getShortTimestamp(newPollsVote.getModifiedDate()));
    Assert.assertEquals(existingPollsVote.getQuestionId(), newPollsVote.getQuestionId());
    Assert.assertEquals(existingPollsVote.getChoiceId(), newPollsVote.getChoiceId());
    Assert.assertEquals(
        Time.getShortTimestamp(existingPollsVote.getVoteDate()),
        Time.getShortTimestamp(newPollsVote.getVoteDate()));
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExpandoRow newExpandoRow = _persistence.create(pk);

    newExpandoRow.setCompanyId(ServiceTestUtil.nextLong());

    newExpandoRow.setModifiedDate(ServiceTestUtil.nextDate());

    newExpandoRow.setTableId(ServiceTestUtil.nextLong());

    newExpandoRow.setClassPK(ServiceTestUtil.nextLong());

    _persistence.update(newExpandoRow);

    ExpandoRow existingExpandoRow = _persistence.findByPrimaryKey(newExpandoRow.getPrimaryKey());

    Assert.assertEquals(existingExpandoRow.getRowId(), newExpandoRow.getRowId());
    Assert.assertEquals(existingExpandoRow.getCompanyId(), newExpandoRow.getCompanyId());
    Assert.assertEquals(
        Time.getShortTimestamp(existingExpandoRow.getModifiedDate()),
        Time.getShortTimestamp(newExpandoRow.getModifiedDate()));
    Assert.assertEquals(existingExpandoRow.getTableId(), newExpandoRow.getTableId());
    Assert.assertEquals(existingExpandoRow.getClassPK(), newExpandoRow.getClassPK());
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingCart newShoppingCart = _persistence.create(pk);

    newShoppingCart.setGroupId(ServiceTestUtil.nextLong());

    newShoppingCart.setCompanyId(ServiceTestUtil.nextLong());

    newShoppingCart.setUserId(ServiceTestUtil.nextLong());

    newShoppingCart.setUserName(ServiceTestUtil.randomString());

    newShoppingCart.setCreateDate(ServiceTestUtil.nextDate());

    newShoppingCart.setModifiedDate(ServiceTestUtil.nextDate());

    newShoppingCart.setItemIds(ServiceTestUtil.randomString());

    newShoppingCart.setCouponCodes(ServiceTestUtil.randomString());

    newShoppingCart.setAltShipping(ServiceTestUtil.nextInt());

    newShoppingCart.setInsure(ServiceTestUtil.randomBoolean());

    _persistence.update(newShoppingCart);

    ShoppingCart existingShoppingCart =
        _persistence.findByPrimaryKey(newShoppingCart.getPrimaryKey());

    Assert.assertEquals(existingShoppingCart.getCartId(), newShoppingCart.getCartId());
    Assert.assertEquals(existingShoppingCart.getGroupId(), newShoppingCart.getGroupId());
    Assert.assertEquals(existingShoppingCart.getCompanyId(), newShoppingCart.getCompanyId());
    Assert.assertEquals(existingShoppingCart.getUserId(), newShoppingCart.getUserId());
    Assert.assertEquals(existingShoppingCart.getUserName(), newShoppingCart.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingCart.getCreateDate()),
        Time.getShortTimestamp(newShoppingCart.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingCart.getModifiedDate()),
        Time.getShortTimestamp(newShoppingCart.getModifiedDate()));
    Assert.assertEquals(existingShoppingCart.getItemIds(), newShoppingCart.getItemIds());
    Assert.assertEquals(existingShoppingCart.getCouponCodes(), newShoppingCart.getCouponCodes());
    Assert.assertEquals(existingShoppingCart.getAltShipping(), newShoppingCart.getAltShipping());
    Assert.assertEquals(existingShoppingCart.getInsure(), newShoppingCart.getInsure());
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    Release newRelease = _persistence.create(pk);

    newRelease.setMvccVersion(ServiceTestUtil.nextLong());

    newRelease.setCreateDate(ServiceTestUtil.nextDate());

    newRelease.setModifiedDate(ServiceTestUtil.nextDate());

    newRelease.setServletContextName(ServiceTestUtil.randomString());

    newRelease.setBuildNumber(ServiceTestUtil.nextInt());

    newRelease.setBuildDate(ServiceTestUtil.nextDate());

    newRelease.setVerified(ServiceTestUtil.randomBoolean());

    newRelease.setState(ServiceTestUtil.nextInt());

    newRelease.setTestString(ServiceTestUtil.randomString());

    _persistence.update(newRelease);

    Release existingRelease = _persistence.findByPrimaryKey(newRelease.getPrimaryKey());

    Assert.assertEquals(existingRelease.getMvccVersion(), newRelease.getMvccVersion());
    Assert.assertEquals(existingRelease.getReleaseId(), newRelease.getReleaseId());
    Assert.assertEquals(
        Time.getShortTimestamp(existingRelease.getCreateDate()),
        Time.getShortTimestamp(newRelease.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingRelease.getModifiedDate()),
        Time.getShortTimestamp(newRelease.getModifiedDate()));
    Assert.assertEquals(
        existingRelease.getServletContextName(), newRelease.getServletContextName());
    Assert.assertEquals(existingRelease.getBuildNumber(), newRelease.getBuildNumber());
    Assert.assertEquals(
        Time.getShortTimestamp(existingRelease.getBuildDate()),
        Time.getShortTimestamp(newRelease.getBuildDate()));
    Assert.assertEquals(existingRelease.getVerified(), newRelease.getVerified());
    Assert.assertEquals(existingRelease.getState(), newRelease.getState());
    Assert.assertEquals(existingRelease.getTestString(), newRelease.getTestString());
  }
示例#16
0
  protected ExportImportConfiguration addExportImportConfiguration() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExportImportConfiguration exportImportConfiguration = _persistence.create(pk);

    exportImportConfiguration.setMvccVersion(ServiceTestUtil.nextLong());

    exportImportConfiguration.setGroupId(ServiceTestUtil.nextLong());

    exportImportConfiguration.setCompanyId(ServiceTestUtil.nextLong());

    exportImportConfiguration.setUserId(ServiceTestUtil.nextLong());

    exportImportConfiguration.setUserName(ServiceTestUtil.randomString());

    exportImportConfiguration.setCreateDate(ServiceTestUtil.nextDate());

    exportImportConfiguration.setModifiedDate(ServiceTestUtil.nextDate());

    exportImportConfiguration.setName(ServiceTestUtil.randomString());

    exportImportConfiguration.setDescription(ServiceTestUtil.randomString());

    exportImportConfiguration.setType(ServiceTestUtil.nextInt());

    exportImportConfiguration.setSettings(ServiceTestUtil.randomString());

    exportImportConfiguration.setStatus(ServiceTestUtil.nextInt());

    exportImportConfiguration.setStatusByUserId(ServiceTestUtil.nextLong());

    exportImportConfiguration.setStatusByUserName(ServiceTestUtil.randomString());

    exportImportConfiguration.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(exportImportConfiguration);

    return exportImportConfiguration;
  }
  protected MDRAction addMDRAction() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MDRAction mdrAction = _persistence.create(pk);

    mdrAction.setUuid(ServiceTestUtil.randomString());

    mdrAction.setGroupId(ServiceTestUtil.nextLong());

    mdrAction.setCompanyId(ServiceTestUtil.nextLong());

    mdrAction.setUserId(ServiceTestUtil.nextLong());

    mdrAction.setUserName(ServiceTestUtil.randomString());

    mdrAction.setCreateDate(ServiceTestUtil.nextDate());

    mdrAction.setModifiedDate(ServiceTestUtil.nextDate());

    mdrAction.setClassNameId(ServiceTestUtil.nextLong());

    mdrAction.setClassPK(ServiceTestUtil.nextLong());

    mdrAction.setRuleGroupInstanceId(ServiceTestUtil.nextLong());

    mdrAction.setName(ServiceTestUtil.randomString());

    mdrAction.setDescription(ServiceTestUtil.randomString());

    mdrAction.setType(ServiceTestUtil.randomString());

    mdrAction.setTypeSettings(ServiceTestUtil.randomString());

    _persistence.update(mdrAction);

    return mdrAction;
  }
  protected ExpandoRow addExpandoRow() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExpandoRow expandoRow = _persistence.create(pk);

    expandoRow.setCompanyId(ServiceTestUtil.nextLong());

    expandoRow.setModifiedDate(ServiceTestUtil.nextDate());

    expandoRow.setTableId(ServiceTestUtil.nextLong());

    expandoRow.setClassPK(ServiceTestUtil.nextLong());

    _persistence.update(expandoRow);

    return expandoRow;
  }
示例#19
0
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MBMailingList newMBMailingList = _persistence.create(pk);

    newMBMailingList.setUuid(ServiceTestUtil.randomString());

    newMBMailingList.setGroupId(ServiceTestUtil.nextLong());

    newMBMailingList.setCompanyId(ServiceTestUtil.nextLong());

    newMBMailingList.setUserId(ServiceTestUtil.nextLong());

    newMBMailingList.setUserName(ServiceTestUtil.randomString());

    newMBMailingList.setCreateDate(ServiceTestUtil.nextDate());

    newMBMailingList.setModifiedDate(ServiceTestUtil.nextDate());

    newMBMailingList.setCategoryId(ServiceTestUtil.nextLong());

    newMBMailingList.setEmailAddress(ServiceTestUtil.randomString());

    newMBMailingList.setInProtocol(ServiceTestUtil.randomString());

    newMBMailingList.setInServerName(ServiceTestUtil.randomString());

    newMBMailingList.setInServerPort(ServiceTestUtil.nextInt());

    newMBMailingList.setInUseSSL(ServiceTestUtil.randomBoolean());

    newMBMailingList.setInUserName(ServiceTestUtil.randomString());

    newMBMailingList.setInPassword(ServiceTestUtil.randomString());

    newMBMailingList.setInReadInterval(ServiceTestUtil.nextInt());

    newMBMailingList.setOutEmailAddress(ServiceTestUtil.randomString());

    newMBMailingList.setOutCustom(ServiceTestUtil.randomBoolean());

    newMBMailingList.setOutServerName(ServiceTestUtil.randomString());

    newMBMailingList.setOutServerPort(ServiceTestUtil.nextInt());

    newMBMailingList.setOutUseSSL(ServiceTestUtil.randomBoolean());

    newMBMailingList.setOutUserName(ServiceTestUtil.randomString());

    newMBMailingList.setOutPassword(ServiceTestUtil.randomString());

    newMBMailingList.setAllowAnonymous(ServiceTestUtil.randomBoolean());

    newMBMailingList.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(newMBMailingList);

    MBMailingList existingMBMailingList =
        _persistence.findByPrimaryKey(newMBMailingList.getPrimaryKey());

    Assert.assertEquals(existingMBMailingList.getUuid(), newMBMailingList.getUuid());
    Assert.assertEquals(
        existingMBMailingList.getMailingListId(), newMBMailingList.getMailingListId());
    Assert.assertEquals(existingMBMailingList.getGroupId(), newMBMailingList.getGroupId());
    Assert.assertEquals(existingMBMailingList.getCompanyId(), newMBMailingList.getCompanyId());
    Assert.assertEquals(existingMBMailingList.getUserId(), newMBMailingList.getUserId());
    Assert.assertEquals(existingMBMailingList.getUserName(), newMBMailingList.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingMBMailingList.getCreateDate()),
        Time.getShortTimestamp(newMBMailingList.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingMBMailingList.getModifiedDate()),
        Time.getShortTimestamp(newMBMailingList.getModifiedDate()));
    Assert.assertEquals(existingMBMailingList.getCategoryId(), newMBMailingList.getCategoryId());
    Assert.assertEquals(
        existingMBMailingList.getEmailAddress(), newMBMailingList.getEmailAddress());
    Assert.assertEquals(existingMBMailingList.getInProtocol(), newMBMailingList.getInProtocol());
    Assert.assertEquals(
        existingMBMailingList.getInServerName(), newMBMailingList.getInServerName());
    Assert.assertEquals(
        existingMBMailingList.getInServerPort(), newMBMailingList.getInServerPort());
    Assert.assertEquals(existingMBMailingList.getInUseSSL(), newMBMailingList.getInUseSSL());
    Assert.assertEquals(existingMBMailingList.getInUserName(), newMBMailingList.getInUserName());
    Assert.assertEquals(existingMBMailingList.getInPassword(), newMBMailingList.getInPassword());
    Assert.assertEquals(
        existingMBMailingList.getInReadInterval(), newMBMailingList.getInReadInterval());
    Assert.assertEquals(
        existingMBMailingList.getOutEmailAddress(), newMBMailingList.getOutEmailAddress());
    Assert.assertEquals(existingMBMailingList.getOutCustom(), newMBMailingList.getOutCustom());
    Assert.assertEquals(
        existingMBMailingList.getOutServerName(), newMBMailingList.getOutServerName());
    Assert.assertEquals(
        existingMBMailingList.getOutServerPort(), newMBMailingList.getOutServerPort());
    Assert.assertEquals(existingMBMailingList.getOutUseSSL(), newMBMailingList.getOutUseSSL());
    Assert.assertEquals(existingMBMailingList.getOutUserName(), newMBMailingList.getOutUserName());
    Assert.assertEquals(existingMBMailingList.getOutPassword(), newMBMailingList.getOutPassword());
    Assert.assertEquals(
        existingMBMailingList.getAllowAnonymous(), newMBMailingList.getAllowAnonymous());
    Assert.assertEquals(existingMBMailingList.getActive(), newMBMailingList.getActive());
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DLFileVersion newDLFileVersion = _persistence.create(pk);

    newDLFileVersion.setUuid(ServiceTestUtil.randomString());

    newDLFileVersion.setGroupId(ServiceTestUtil.nextLong());

    newDLFileVersion.setCompanyId(ServiceTestUtil.nextLong());

    newDLFileVersion.setUserId(ServiceTestUtil.nextLong());

    newDLFileVersion.setUserName(ServiceTestUtil.randomString());

    newDLFileVersion.setCreateDate(ServiceTestUtil.nextDate());

    newDLFileVersion.setModifiedDate(ServiceTestUtil.nextDate());

    newDLFileVersion.setRepositoryId(ServiceTestUtil.nextLong());

    newDLFileVersion.setFolderId(ServiceTestUtil.nextLong());

    newDLFileVersion.setFileEntryId(ServiceTestUtil.nextLong());

    newDLFileVersion.setTreePath(ServiceTestUtil.randomString());

    newDLFileVersion.setExtension(ServiceTestUtil.randomString());

    newDLFileVersion.setMimeType(ServiceTestUtil.randomString());

    newDLFileVersion.setTitle(ServiceTestUtil.randomString());

    newDLFileVersion.setDescription(ServiceTestUtil.randomString());

    newDLFileVersion.setChangeLog(ServiceTestUtil.randomString());

    newDLFileVersion.setExtraSettings(ServiceTestUtil.randomString());

    newDLFileVersion.setFileEntryTypeId(ServiceTestUtil.nextLong());

    newDLFileVersion.setVersion(ServiceTestUtil.randomString());

    newDLFileVersion.setSize(ServiceTestUtil.nextLong());

    newDLFileVersion.setChecksum(ServiceTestUtil.randomString());

    newDLFileVersion.setStatus(ServiceTestUtil.nextInt());

    newDLFileVersion.setStatusByUserId(ServiceTestUtil.nextLong());

    newDLFileVersion.setStatusByUserName(ServiceTestUtil.randomString());

    newDLFileVersion.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(newDLFileVersion);

    DLFileVersion existingDLFileVersion =
        _persistence.findByPrimaryKey(newDLFileVersion.getPrimaryKey());

    Assert.assertEquals(existingDLFileVersion.getUuid(), newDLFileVersion.getUuid());
    Assert.assertEquals(
        existingDLFileVersion.getFileVersionId(), newDLFileVersion.getFileVersionId());
    Assert.assertEquals(existingDLFileVersion.getGroupId(), newDLFileVersion.getGroupId());
    Assert.assertEquals(existingDLFileVersion.getCompanyId(), newDLFileVersion.getCompanyId());
    Assert.assertEquals(existingDLFileVersion.getUserId(), newDLFileVersion.getUserId());
    Assert.assertEquals(existingDLFileVersion.getUserName(), newDLFileVersion.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFileVersion.getCreateDate()),
        Time.getShortTimestamp(newDLFileVersion.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFileVersion.getModifiedDate()),
        Time.getShortTimestamp(newDLFileVersion.getModifiedDate()));
    Assert.assertEquals(
        existingDLFileVersion.getRepositoryId(), newDLFileVersion.getRepositoryId());
    Assert.assertEquals(existingDLFileVersion.getFolderId(), newDLFileVersion.getFolderId());
    Assert.assertEquals(existingDLFileVersion.getFileEntryId(), newDLFileVersion.getFileEntryId());
    Assert.assertEquals(existingDLFileVersion.getTreePath(), newDLFileVersion.getTreePath());
    Assert.assertEquals(existingDLFileVersion.getExtension(), newDLFileVersion.getExtension());
    Assert.assertEquals(existingDLFileVersion.getMimeType(), newDLFileVersion.getMimeType());
    Assert.assertEquals(existingDLFileVersion.getTitle(), newDLFileVersion.getTitle());
    Assert.assertEquals(existingDLFileVersion.getDescription(), newDLFileVersion.getDescription());
    Assert.assertEquals(existingDLFileVersion.getChangeLog(), newDLFileVersion.getChangeLog());
    Assert.assertEquals(
        existingDLFileVersion.getExtraSettings(), newDLFileVersion.getExtraSettings());
    Assert.assertEquals(
        existingDLFileVersion.getFileEntryTypeId(), newDLFileVersion.getFileEntryTypeId());
    Assert.assertEquals(existingDLFileVersion.getVersion(), newDLFileVersion.getVersion());
    Assert.assertEquals(existingDLFileVersion.getSize(), newDLFileVersion.getSize());
    Assert.assertEquals(existingDLFileVersion.getChecksum(), newDLFileVersion.getChecksum());
    Assert.assertEquals(existingDLFileVersion.getStatus(), newDLFileVersion.getStatus());
    Assert.assertEquals(
        existingDLFileVersion.getStatusByUserId(), newDLFileVersion.getStatusByUserId());
    Assert.assertEquals(
        existingDLFileVersion.getStatusByUserName(), newDLFileVersion.getStatusByUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFileVersion.getStatusDate()),
        Time.getShortTimestamp(newDLFileVersion.getStatusDate()));
  }
  protected PasswordPolicy addPasswordPolicy() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    PasswordPolicy passwordPolicy = _persistence.create(pk);

    passwordPolicy.setCompanyId(ServiceTestUtil.nextLong());

    passwordPolicy.setUserId(ServiceTestUtil.nextLong());

    passwordPolicy.setUserName(ServiceTestUtil.randomString());

    passwordPolicy.setCreateDate(ServiceTestUtil.nextDate());

    passwordPolicy.setModifiedDate(ServiceTestUtil.nextDate());

    passwordPolicy.setDefaultPolicy(ServiceTestUtil.randomBoolean());

    passwordPolicy.setName(ServiceTestUtil.randomString());

    passwordPolicy.setDescription(ServiceTestUtil.randomString());

    passwordPolicy.setChangeable(ServiceTestUtil.randomBoolean());

    passwordPolicy.setChangeRequired(ServiceTestUtil.randomBoolean());

    passwordPolicy.setMinAge(ServiceTestUtil.nextLong());

    passwordPolicy.setCheckSyntax(ServiceTestUtil.randomBoolean());

    passwordPolicy.setAllowDictionaryWords(ServiceTestUtil.randomBoolean());

    passwordPolicy.setMinAlphanumeric(ServiceTestUtil.nextInt());

    passwordPolicy.setMinLength(ServiceTestUtil.nextInt());

    passwordPolicy.setMinLowerCase(ServiceTestUtil.nextInt());

    passwordPolicy.setMinNumbers(ServiceTestUtil.nextInt());

    passwordPolicy.setMinSymbols(ServiceTestUtil.nextInt());

    passwordPolicy.setMinUpperCase(ServiceTestUtil.nextInt());

    passwordPolicy.setHistory(ServiceTestUtil.randomBoolean());

    passwordPolicy.setHistoryCount(ServiceTestUtil.nextInt());

    passwordPolicy.setExpireable(ServiceTestUtil.randomBoolean());

    passwordPolicy.setMaxAge(ServiceTestUtil.nextLong());

    passwordPolicy.setWarningTime(ServiceTestUtil.nextLong());

    passwordPolicy.setGraceLimit(ServiceTestUtil.nextInt());

    passwordPolicy.setLockout(ServiceTestUtil.randomBoolean());

    passwordPolicy.setMaxFailure(ServiceTestUtil.nextInt());

    passwordPolicy.setLockoutDuration(ServiceTestUtil.nextLong());

    passwordPolicy.setRequireUnlock(ServiceTestUtil.randomBoolean());

    passwordPolicy.setResetFailureCount(ServiceTestUtil.nextLong());

    passwordPolicy.setResetTicketMaxAge(ServiceTestUtil.nextLong());

    _persistence.update(passwordPolicy, false);

    return passwordPolicy;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    PasswordPolicy newPasswordPolicy = _persistence.create(pk);

    newPasswordPolicy.setCompanyId(ServiceTestUtil.nextLong());

    newPasswordPolicy.setUserId(ServiceTestUtil.nextLong());

    newPasswordPolicy.setUserName(ServiceTestUtil.randomString());

    newPasswordPolicy.setCreateDate(ServiceTestUtil.nextDate());

    newPasswordPolicy.setModifiedDate(ServiceTestUtil.nextDate());

    newPasswordPolicy.setDefaultPolicy(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setName(ServiceTestUtil.randomString());

    newPasswordPolicy.setDescription(ServiceTestUtil.randomString());

    newPasswordPolicy.setChangeable(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setChangeRequired(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setMinAge(ServiceTestUtil.nextLong());

    newPasswordPolicy.setCheckSyntax(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setAllowDictionaryWords(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setMinAlphanumeric(ServiceTestUtil.nextInt());

    newPasswordPolicy.setMinLength(ServiceTestUtil.nextInt());

    newPasswordPolicy.setMinLowerCase(ServiceTestUtil.nextInt());

    newPasswordPolicy.setMinNumbers(ServiceTestUtil.nextInt());

    newPasswordPolicy.setMinSymbols(ServiceTestUtil.nextInt());

    newPasswordPolicy.setMinUpperCase(ServiceTestUtil.nextInt());

    newPasswordPolicy.setHistory(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setHistoryCount(ServiceTestUtil.nextInt());

    newPasswordPolicy.setExpireable(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setMaxAge(ServiceTestUtil.nextLong());

    newPasswordPolicy.setWarningTime(ServiceTestUtil.nextLong());

    newPasswordPolicy.setGraceLimit(ServiceTestUtil.nextInt());

    newPasswordPolicy.setLockout(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setMaxFailure(ServiceTestUtil.nextInt());

    newPasswordPolicy.setLockoutDuration(ServiceTestUtil.nextLong());

    newPasswordPolicy.setRequireUnlock(ServiceTestUtil.randomBoolean());

    newPasswordPolicy.setResetFailureCount(ServiceTestUtil.nextLong());

    newPasswordPolicy.setResetTicketMaxAge(ServiceTestUtil.nextLong());

    _persistence.update(newPasswordPolicy, false);

    PasswordPolicy existingPasswordPolicy =
        _persistence.findByPrimaryKey(newPasswordPolicy.getPrimaryKey());

    Assert.assertEquals(
        existingPasswordPolicy.getPasswordPolicyId(), newPasswordPolicy.getPasswordPolicyId());
    Assert.assertEquals(existingPasswordPolicy.getCompanyId(), newPasswordPolicy.getCompanyId());
    Assert.assertEquals(existingPasswordPolicy.getUserId(), newPasswordPolicy.getUserId());
    Assert.assertEquals(existingPasswordPolicy.getUserName(), newPasswordPolicy.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingPasswordPolicy.getCreateDate()),
        Time.getShortTimestamp(newPasswordPolicy.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingPasswordPolicy.getModifiedDate()),
        Time.getShortTimestamp(newPasswordPolicy.getModifiedDate()));
    Assert.assertEquals(
        existingPasswordPolicy.getDefaultPolicy(), newPasswordPolicy.getDefaultPolicy());
    Assert.assertEquals(existingPasswordPolicy.getName(), newPasswordPolicy.getName());
    Assert.assertEquals(
        existingPasswordPolicy.getDescription(), newPasswordPolicy.getDescription());
    Assert.assertEquals(existingPasswordPolicy.getChangeable(), newPasswordPolicy.getChangeable());
    Assert.assertEquals(
        existingPasswordPolicy.getChangeRequired(), newPasswordPolicy.getChangeRequired());
    Assert.assertEquals(existingPasswordPolicy.getMinAge(), newPasswordPolicy.getMinAge());
    Assert.assertEquals(
        existingPasswordPolicy.getCheckSyntax(), newPasswordPolicy.getCheckSyntax());
    Assert.assertEquals(
        existingPasswordPolicy.getAllowDictionaryWords(),
        newPasswordPolicy.getAllowDictionaryWords());
    Assert.assertEquals(
        existingPasswordPolicy.getMinAlphanumeric(), newPasswordPolicy.getMinAlphanumeric());
    Assert.assertEquals(existingPasswordPolicy.getMinLength(), newPasswordPolicy.getMinLength());
    Assert.assertEquals(
        existingPasswordPolicy.getMinLowerCase(), newPasswordPolicy.getMinLowerCase());
    Assert.assertEquals(existingPasswordPolicy.getMinNumbers(), newPasswordPolicy.getMinNumbers());
    Assert.assertEquals(existingPasswordPolicy.getMinSymbols(), newPasswordPolicy.getMinSymbols());
    Assert.assertEquals(
        existingPasswordPolicy.getMinUpperCase(), newPasswordPolicy.getMinUpperCase());
    Assert.assertEquals(existingPasswordPolicy.getHistory(), newPasswordPolicy.getHistory());
    Assert.assertEquals(
        existingPasswordPolicy.getHistoryCount(), newPasswordPolicy.getHistoryCount());
    Assert.assertEquals(existingPasswordPolicy.getExpireable(), newPasswordPolicy.getExpireable());
    Assert.assertEquals(existingPasswordPolicy.getMaxAge(), newPasswordPolicy.getMaxAge());
    Assert.assertEquals(
        existingPasswordPolicy.getWarningTime(), newPasswordPolicy.getWarningTime());
    Assert.assertEquals(existingPasswordPolicy.getGraceLimit(), newPasswordPolicy.getGraceLimit());
    Assert.assertEquals(existingPasswordPolicy.getLockout(), newPasswordPolicy.getLockout());
    Assert.assertEquals(existingPasswordPolicy.getMaxFailure(), newPasswordPolicy.getMaxFailure());
    Assert.assertEquals(
        existingPasswordPolicy.getLockoutDuration(), newPasswordPolicy.getLockoutDuration());
    Assert.assertEquals(
        existingPasswordPolicy.getRequireUnlock(), newPasswordPolicy.getRequireUnlock());
    Assert.assertEquals(
        existingPasswordPolicy.getResetFailureCount(), newPasswordPolicy.getResetFailureCount());
    Assert.assertEquals(
        existingPasswordPolicy.getResetTicketMaxAge(), newPasswordPolicy.getResetTicketMaxAge());
  }
  protected JournalArticle addJournalArticle() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    JournalArticle journalArticle = _persistence.create(pk);

    journalArticle.setUuid(ServiceTestUtil.randomString());

    journalArticle.setResourcePrimKey(ServiceTestUtil.nextLong());

    journalArticle.setGroupId(ServiceTestUtil.nextLong());

    journalArticle.setCompanyId(ServiceTestUtil.nextLong());

    journalArticle.setUserId(ServiceTestUtil.nextLong());

    journalArticle.setUserName(ServiceTestUtil.randomString());

    journalArticle.setCreateDate(ServiceTestUtil.nextDate());

    journalArticle.setModifiedDate(ServiceTestUtil.nextDate());

    journalArticle.setFolderId(ServiceTestUtil.nextLong());

    journalArticle.setClassNameId(ServiceTestUtil.nextLong());

    journalArticle.setClassPK(ServiceTestUtil.nextLong());

    journalArticle.setTreePath(ServiceTestUtil.randomString());

    journalArticle.setArticleId(ServiceTestUtil.randomString());

    journalArticle.setVersion(ServiceTestUtil.nextDouble());

    journalArticle.setTitle(ServiceTestUtil.randomString());

    journalArticle.setUrlTitle(ServiceTestUtil.randomString());

    journalArticle.setDescription(ServiceTestUtil.randomString());

    journalArticle.setContent(ServiceTestUtil.randomString());

    journalArticle.setType(ServiceTestUtil.randomString());

    journalArticle.setStructureId(ServiceTestUtil.randomString());

    journalArticle.setTemplateId(ServiceTestUtil.randomString());

    journalArticle.setLayoutUuid(ServiceTestUtil.randomString());

    journalArticle.setDisplayDate(ServiceTestUtil.nextDate());

    journalArticle.setExpirationDate(ServiceTestUtil.nextDate());

    journalArticle.setReviewDate(ServiceTestUtil.nextDate());

    journalArticle.setIndexable(ServiceTestUtil.randomBoolean());

    journalArticle.setSmallImage(ServiceTestUtil.randomBoolean());

    journalArticle.setSmallImageId(ServiceTestUtil.nextLong());

    journalArticle.setSmallImageURL(ServiceTestUtil.randomString());

    journalArticle.setStatus(ServiceTestUtil.nextInt());

    journalArticle.setStatusByUserId(ServiceTestUtil.nextLong());

    journalArticle.setStatusByUserName(ServiceTestUtil.randomString());

    journalArticle.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(journalArticle);

    return journalArticle;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DLFolder newDLFolder = _persistence.create(pk);

    newDLFolder.setUuid(ServiceTestUtil.randomString());

    newDLFolder.setGroupId(ServiceTestUtil.nextLong());

    newDLFolder.setCompanyId(ServiceTestUtil.nextLong());

    newDLFolder.setUserId(ServiceTestUtil.nextLong());

    newDLFolder.setUserName(ServiceTestUtil.randomString());

    newDLFolder.setCreateDate(ServiceTestUtil.nextDate());

    newDLFolder.setModifiedDate(ServiceTestUtil.nextDate());

    newDLFolder.setRepositoryId(ServiceTestUtil.nextLong());

    newDLFolder.setMountPoint(ServiceTestUtil.randomBoolean());

    newDLFolder.setParentFolderId(ServiceTestUtil.nextLong());

    newDLFolder.setName(ServiceTestUtil.randomString());

    newDLFolder.setDescription(ServiceTestUtil.randomString());

    newDLFolder.setLastPostDate(ServiceTestUtil.nextDate());

    newDLFolder.setDefaultFileEntryTypeId(ServiceTestUtil.nextLong());

    newDLFolder.setHidden(ServiceTestUtil.randomBoolean());

    newDLFolder.setOverrideFileEntryTypes(ServiceTestUtil.randomBoolean());

    newDLFolder.setStatus(ServiceTestUtil.nextInt());

    newDLFolder.setStatusByUserId(ServiceTestUtil.nextLong());

    newDLFolder.setStatusByUserName(ServiceTestUtil.randomString());

    newDLFolder.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(newDLFolder);

    DLFolder existingDLFolder = _persistence.findByPrimaryKey(newDLFolder.getPrimaryKey());

    Assert.assertEquals(existingDLFolder.getUuid(), newDLFolder.getUuid());
    Assert.assertEquals(existingDLFolder.getFolderId(), newDLFolder.getFolderId());
    Assert.assertEquals(existingDLFolder.getGroupId(), newDLFolder.getGroupId());
    Assert.assertEquals(existingDLFolder.getCompanyId(), newDLFolder.getCompanyId());
    Assert.assertEquals(existingDLFolder.getUserId(), newDLFolder.getUserId());
    Assert.assertEquals(existingDLFolder.getUserName(), newDLFolder.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFolder.getCreateDate()),
        Time.getShortTimestamp(newDLFolder.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFolder.getModifiedDate()),
        Time.getShortTimestamp(newDLFolder.getModifiedDate()));
    Assert.assertEquals(existingDLFolder.getRepositoryId(), newDLFolder.getRepositoryId());
    Assert.assertEquals(existingDLFolder.getMountPoint(), newDLFolder.getMountPoint());
    Assert.assertEquals(existingDLFolder.getParentFolderId(), newDLFolder.getParentFolderId());
    Assert.assertEquals(existingDLFolder.getName(), newDLFolder.getName());
    Assert.assertEquals(existingDLFolder.getDescription(), newDLFolder.getDescription());
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFolder.getLastPostDate()),
        Time.getShortTimestamp(newDLFolder.getLastPostDate()));
    Assert.assertEquals(
        existingDLFolder.getDefaultFileEntryTypeId(), newDLFolder.getDefaultFileEntryTypeId());
    Assert.assertEquals(existingDLFolder.getHidden(), newDLFolder.getHidden());
    Assert.assertEquals(
        existingDLFolder.getOverrideFileEntryTypes(), newDLFolder.getOverrideFileEntryTypes());
    Assert.assertEquals(existingDLFolder.getStatus(), newDLFolder.getStatus());
    Assert.assertEquals(existingDLFolder.getStatusByUserId(), newDLFolder.getStatusByUserId());
    Assert.assertEquals(existingDLFolder.getStatusByUserName(), newDLFolder.getStatusByUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingDLFolder.getStatusDate()),
        Time.getShortTimestamp(newDLFolder.getStatusDate()));
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    JournalArticle newJournalArticle = _persistence.create(pk);

    newJournalArticle.setUuid(ServiceTestUtil.randomString());

    newJournalArticle.setResourcePrimKey(ServiceTestUtil.nextLong());

    newJournalArticle.setGroupId(ServiceTestUtil.nextLong());

    newJournalArticle.setCompanyId(ServiceTestUtil.nextLong());

    newJournalArticle.setUserId(ServiceTestUtil.nextLong());

    newJournalArticle.setUserName(ServiceTestUtil.randomString());

    newJournalArticle.setCreateDate(ServiceTestUtil.nextDate());

    newJournalArticle.setModifiedDate(ServiceTestUtil.nextDate());

    newJournalArticle.setFolderId(ServiceTestUtil.nextLong());

    newJournalArticle.setClassNameId(ServiceTestUtil.nextLong());

    newJournalArticle.setClassPK(ServiceTestUtil.nextLong());

    newJournalArticle.setTreePath(ServiceTestUtil.randomString());

    newJournalArticle.setArticleId(ServiceTestUtil.randomString());

    newJournalArticle.setVersion(ServiceTestUtil.nextDouble());

    newJournalArticle.setTitle(ServiceTestUtil.randomString());

    newJournalArticle.setUrlTitle(ServiceTestUtil.randomString());

    newJournalArticle.setDescription(ServiceTestUtil.randomString());

    newJournalArticle.setContent(ServiceTestUtil.randomString());

    newJournalArticle.setType(ServiceTestUtil.randomString());

    newJournalArticle.setStructureId(ServiceTestUtil.randomString());

    newJournalArticle.setTemplateId(ServiceTestUtil.randomString());

    newJournalArticle.setLayoutUuid(ServiceTestUtil.randomString());

    newJournalArticle.setDisplayDate(ServiceTestUtil.nextDate());

    newJournalArticle.setExpirationDate(ServiceTestUtil.nextDate());

    newJournalArticle.setReviewDate(ServiceTestUtil.nextDate());

    newJournalArticle.setIndexable(ServiceTestUtil.randomBoolean());

    newJournalArticle.setSmallImage(ServiceTestUtil.randomBoolean());

    newJournalArticle.setSmallImageId(ServiceTestUtil.nextLong());

    newJournalArticle.setSmallImageURL(ServiceTestUtil.randomString());

    newJournalArticle.setStatus(ServiceTestUtil.nextInt());

    newJournalArticle.setStatusByUserId(ServiceTestUtil.nextLong());

    newJournalArticle.setStatusByUserName(ServiceTestUtil.randomString());

    newJournalArticle.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(newJournalArticle);

    JournalArticle existingJournalArticle =
        _persistence.findByPrimaryKey(newJournalArticle.getPrimaryKey());

    Assert.assertEquals(existingJournalArticle.getUuid(), newJournalArticle.getUuid());
    Assert.assertEquals(existingJournalArticle.getId(), newJournalArticle.getId());
    Assert.assertEquals(
        existingJournalArticle.getResourcePrimKey(), newJournalArticle.getResourcePrimKey());
    Assert.assertEquals(existingJournalArticle.getGroupId(), newJournalArticle.getGroupId());
    Assert.assertEquals(existingJournalArticle.getCompanyId(), newJournalArticle.getCompanyId());
    Assert.assertEquals(existingJournalArticle.getUserId(), newJournalArticle.getUserId());
    Assert.assertEquals(existingJournalArticle.getUserName(), newJournalArticle.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingJournalArticle.getCreateDate()),
        Time.getShortTimestamp(newJournalArticle.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingJournalArticle.getModifiedDate()),
        Time.getShortTimestamp(newJournalArticle.getModifiedDate()));
    Assert.assertEquals(existingJournalArticle.getFolderId(), newJournalArticle.getFolderId());
    Assert.assertEquals(
        existingJournalArticle.getClassNameId(), newJournalArticle.getClassNameId());
    Assert.assertEquals(existingJournalArticle.getClassPK(), newJournalArticle.getClassPK());
    Assert.assertEquals(existingJournalArticle.getTreePath(), newJournalArticle.getTreePath());
    Assert.assertEquals(existingJournalArticle.getArticleId(), newJournalArticle.getArticleId());
    AssertUtils.assertEquals(existingJournalArticle.getVersion(), newJournalArticle.getVersion());
    Assert.assertEquals(existingJournalArticle.getTitle(), newJournalArticle.getTitle());
    Assert.assertEquals(existingJournalArticle.getUrlTitle(), newJournalArticle.getUrlTitle());
    Assert.assertEquals(
        existingJournalArticle.getDescription(), newJournalArticle.getDescription());
    Assert.assertEquals(existingJournalArticle.getContent(), newJournalArticle.getContent());
    Assert.assertEquals(existingJournalArticle.getType(), newJournalArticle.getType());
    Assert.assertEquals(
        existingJournalArticle.getStructureId(), newJournalArticle.getStructureId());
    Assert.assertEquals(existingJournalArticle.getTemplateId(), newJournalArticle.getTemplateId());
    Assert.assertEquals(existingJournalArticle.getLayoutUuid(), newJournalArticle.getLayoutUuid());
    Assert.assertEquals(
        Time.getShortTimestamp(existingJournalArticle.getDisplayDate()),
        Time.getShortTimestamp(newJournalArticle.getDisplayDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingJournalArticle.getExpirationDate()),
        Time.getShortTimestamp(newJournalArticle.getExpirationDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingJournalArticle.getReviewDate()),
        Time.getShortTimestamp(newJournalArticle.getReviewDate()));
    Assert.assertEquals(existingJournalArticle.getIndexable(), newJournalArticle.getIndexable());
    Assert.assertEquals(existingJournalArticle.getSmallImage(), newJournalArticle.getSmallImage());
    Assert.assertEquals(
        existingJournalArticle.getSmallImageId(), newJournalArticle.getSmallImageId());
    Assert.assertEquals(
        existingJournalArticle.getSmallImageURL(), newJournalArticle.getSmallImageURL());
    Assert.assertEquals(existingJournalArticle.getStatus(), newJournalArticle.getStatus());
    Assert.assertEquals(
        existingJournalArticle.getStatusByUserId(), newJournalArticle.getStatusByUserId());
    Assert.assertEquals(
        existingJournalArticle.getStatusByUserName(), newJournalArticle.getStatusByUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingJournalArticle.getStatusDate()),
        Time.getShortTimestamp(newJournalArticle.getStatusDate()));
  }
示例#26
0
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExportImportConfiguration newExportImportConfiguration = _persistence.create(pk);

    newExportImportConfiguration.setMvccVersion(ServiceTestUtil.nextLong());

    newExportImportConfiguration.setGroupId(ServiceTestUtil.nextLong());

    newExportImportConfiguration.setCompanyId(ServiceTestUtil.nextLong());

    newExportImportConfiguration.setUserId(ServiceTestUtil.nextLong());

    newExportImportConfiguration.setUserName(ServiceTestUtil.randomString());

    newExportImportConfiguration.setCreateDate(ServiceTestUtil.nextDate());

    newExportImportConfiguration.setModifiedDate(ServiceTestUtil.nextDate());

    newExportImportConfiguration.setName(ServiceTestUtil.randomString());

    newExportImportConfiguration.setDescription(ServiceTestUtil.randomString());

    newExportImportConfiguration.setType(ServiceTestUtil.nextInt());

    newExportImportConfiguration.setSettings(ServiceTestUtil.randomString());

    newExportImportConfiguration.setStatus(ServiceTestUtil.nextInt());

    newExportImportConfiguration.setStatusByUserId(ServiceTestUtil.nextLong());

    newExportImportConfiguration.setStatusByUserName(ServiceTestUtil.randomString());

    newExportImportConfiguration.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(newExportImportConfiguration);

    ExportImportConfiguration existingExportImportConfiguration =
        _persistence.findByPrimaryKey(newExportImportConfiguration.getPrimaryKey());

    Assert.assertEquals(
        existingExportImportConfiguration.getMvccVersion(),
        newExportImportConfiguration.getMvccVersion());
    Assert.assertEquals(
        existingExportImportConfiguration.getExportImportConfigurationId(),
        newExportImportConfiguration.getExportImportConfigurationId());
    Assert.assertEquals(
        existingExportImportConfiguration.getGroupId(), newExportImportConfiguration.getGroupId());
    Assert.assertEquals(
        existingExportImportConfiguration.getCompanyId(),
        newExportImportConfiguration.getCompanyId());
    Assert.assertEquals(
        existingExportImportConfiguration.getUserId(), newExportImportConfiguration.getUserId());
    Assert.assertEquals(
        existingExportImportConfiguration.getUserName(),
        newExportImportConfiguration.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingExportImportConfiguration.getCreateDate()),
        Time.getShortTimestamp(newExportImportConfiguration.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingExportImportConfiguration.getModifiedDate()),
        Time.getShortTimestamp(newExportImportConfiguration.getModifiedDate()));
    Assert.assertEquals(
        existingExportImportConfiguration.getName(), newExportImportConfiguration.getName());
    Assert.assertEquals(
        existingExportImportConfiguration.getDescription(),
        newExportImportConfiguration.getDescription());
    Assert.assertEquals(
        existingExportImportConfiguration.getType(), newExportImportConfiguration.getType());
    Assert.assertEquals(
        existingExportImportConfiguration.getSettings(),
        newExportImportConfiguration.getSettings());
    Assert.assertEquals(
        existingExportImportConfiguration.getStatus(), newExportImportConfiguration.getStatus());
    Assert.assertEquals(
        existingExportImportConfiguration.getStatusByUserId(),
        newExportImportConfiguration.getStatusByUserId());
    Assert.assertEquals(
        existingExportImportConfiguration.getStatusByUserName(),
        newExportImportConfiguration.getStatusByUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingExportImportConfiguration.getStatusDate()),
        Time.getShortTimestamp(newExportImportConfiguration.getStatusDate()));
  }
  protected ShoppingOrder addShoppingOrder() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingOrder shoppingOrder = _persistence.create(pk);

    shoppingOrder.setGroupId(ServiceTestUtil.nextLong());

    shoppingOrder.setCompanyId(ServiceTestUtil.nextLong());

    shoppingOrder.setUserId(ServiceTestUtil.nextLong());

    shoppingOrder.setUserName(ServiceTestUtil.randomString());

    shoppingOrder.setCreateDate(ServiceTestUtil.nextDate());

    shoppingOrder.setModifiedDate(ServiceTestUtil.nextDate());

    shoppingOrder.setNumber(ServiceTestUtil.randomString());

    shoppingOrder.setTax(ServiceTestUtil.nextDouble());

    shoppingOrder.setShipping(ServiceTestUtil.nextDouble());

    shoppingOrder.setAltShipping(ServiceTestUtil.randomString());

    shoppingOrder.setRequiresShipping(ServiceTestUtil.randomBoolean());

    shoppingOrder.setInsure(ServiceTestUtil.randomBoolean());

    shoppingOrder.setInsurance(ServiceTestUtil.nextDouble());

    shoppingOrder.setCouponCodes(ServiceTestUtil.randomString());

    shoppingOrder.setCouponDiscount(ServiceTestUtil.nextDouble());

    shoppingOrder.setBillingFirstName(ServiceTestUtil.randomString());

    shoppingOrder.setBillingLastName(ServiceTestUtil.randomString());

    shoppingOrder.setBillingEmailAddress(ServiceTestUtil.randomString());

    shoppingOrder.setBillingCompany(ServiceTestUtil.randomString());

    shoppingOrder.setBillingStreet(ServiceTestUtil.randomString());

    shoppingOrder.setBillingCity(ServiceTestUtil.randomString());

    shoppingOrder.setBillingState(ServiceTestUtil.randomString());

    shoppingOrder.setBillingZip(ServiceTestUtil.randomString());

    shoppingOrder.setBillingCountry(ServiceTestUtil.randomString());

    shoppingOrder.setBillingPhone(ServiceTestUtil.randomString());

    shoppingOrder.setShipToBilling(ServiceTestUtil.randomBoolean());

    shoppingOrder.setShippingFirstName(ServiceTestUtil.randomString());

    shoppingOrder.setShippingLastName(ServiceTestUtil.randomString());

    shoppingOrder.setShippingEmailAddress(ServiceTestUtil.randomString());

    shoppingOrder.setShippingCompany(ServiceTestUtil.randomString());

    shoppingOrder.setShippingStreet(ServiceTestUtil.randomString());

    shoppingOrder.setShippingCity(ServiceTestUtil.randomString());

    shoppingOrder.setShippingState(ServiceTestUtil.randomString());

    shoppingOrder.setShippingZip(ServiceTestUtil.randomString());

    shoppingOrder.setShippingCountry(ServiceTestUtil.randomString());

    shoppingOrder.setShippingPhone(ServiceTestUtil.randomString());

    shoppingOrder.setCcName(ServiceTestUtil.randomString());

    shoppingOrder.setCcType(ServiceTestUtil.randomString());

    shoppingOrder.setCcNumber(ServiceTestUtil.randomString());

    shoppingOrder.setCcExpMonth(ServiceTestUtil.nextInt());

    shoppingOrder.setCcExpYear(ServiceTestUtil.nextInt());

    shoppingOrder.setCcVerNumber(ServiceTestUtil.randomString());

    shoppingOrder.setComments(ServiceTestUtil.randomString());

    shoppingOrder.setPpTxnId(ServiceTestUtil.randomString());

    shoppingOrder.setPpPaymentStatus(ServiceTestUtil.randomString());

    shoppingOrder.setPpPaymentGross(ServiceTestUtil.nextDouble());

    shoppingOrder.setPpReceiverEmail(ServiceTestUtil.randomString());

    shoppingOrder.setPpPayerEmail(ServiceTestUtil.randomString());

    shoppingOrder.setSendOrderEmail(ServiceTestUtil.randomBoolean());

    shoppingOrder.setSendShippingEmail(ServiceTestUtil.randomBoolean());

    _persistence.update(shoppingOrder);

    return shoppingOrder;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingOrder newShoppingOrder = _persistence.create(pk);

    newShoppingOrder.setGroupId(ServiceTestUtil.nextLong());

    newShoppingOrder.setCompanyId(ServiceTestUtil.nextLong());

    newShoppingOrder.setUserId(ServiceTestUtil.nextLong());

    newShoppingOrder.setUserName(ServiceTestUtil.randomString());

    newShoppingOrder.setCreateDate(ServiceTestUtil.nextDate());

    newShoppingOrder.setModifiedDate(ServiceTestUtil.nextDate());

    newShoppingOrder.setNumber(ServiceTestUtil.randomString());

    newShoppingOrder.setTax(ServiceTestUtil.nextDouble());

    newShoppingOrder.setShipping(ServiceTestUtil.nextDouble());

    newShoppingOrder.setAltShipping(ServiceTestUtil.randomString());

    newShoppingOrder.setRequiresShipping(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setInsure(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setInsurance(ServiceTestUtil.nextDouble());

    newShoppingOrder.setCouponCodes(ServiceTestUtil.randomString());

    newShoppingOrder.setCouponDiscount(ServiceTestUtil.nextDouble());

    newShoppingOrder.setBillingFirstName(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingLastName(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingEmailAddress(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingCompany(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingStreet(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingCity(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingState(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingZip(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingCountry(ServiceTestUtil.randomString());

    newShoppingOrder.setBillingPhone(ServiceTestUtil.randomString());

    newShoppingOrder.setShipToBilling(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setShippingFirstName(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingLastName(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingEmailAddress(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingCompany(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingStreet(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingCity(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingState(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingZip(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingCountry(ServiceTestUtil.randomString());

    newShoppingOrder.setShippingPhone(ServiceTestUtil.randomString());

    newShoppingOrder.setCcName(ServiceTestUtil.randomString());

    newShoppingOrder.setCcType(ServiceTestUtil.randomString());

    newShoppingOrder.setCcNumber(ServiceTestUtil.randomString());

    newShoppingOrder.setCcExpMonth(ServiceTestUtil.nextInt());

    newShoppingOrder.setCcExpYear(ServiceTestUtil.nextInt());

    newShoppingOrder.setCcVerNumber(ServiceTestUtil.randomString());

    newShoppingOrder.setComments(ServiceTestUtil.randomString());

    newShoppingOrder.setPpTxnId(ServiceTestUtil.randomString());

    newShoppingOrder.setPpPaymentStatus(ServiceTestUtil.randomString());

    newShoppingOrder.setPpPaymentGross(ServiceTestUtil.nextDouble());

    newShoppingOrder.setPpReceiverEmail(ServiceTestUtil.randomString());

    newShoppingOrder.setPpPayerEmail(ServiceTestUtil.randomString());

    newShoppingOrder.setSendOrderEmail(ServiceTestUtil.randomBoolean());

    newShoppingOrder.setSendShippingEmail(ServiceTestUtil.randomBoolean());

    _persistence.update(newShoppingOrder);

    ShoppingOrder existingShoppingOrder =
        _persistence.findByPrimaryKey(newShoppingOrder.getPrimaryKey());

    Assert.assertEquals(existingShoppingOrder.getOrderId(), newShoppingOrder.getOrderId());
    Assert.assertEquals(existingShoppingOrder.getGroupId(), newShoppingOrder.getGroupId());
    Assert.assertEquals(existingShoppingOrder.getCompanyId(), newShoppingOrder.getCompanyId());
    Assert.assertEquals(existingShoppingOrder.getUserId(), newShoppingOrder.getUserId());
    Assert.assertEquals(existingShoppingOrder.getUserName(), newShoppingOrder.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingOrder.getCreateDate()),
        Time.getShortTimestamp(newShoppingOrder.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingOrder.getModifiedDate()),
        Time.getShortTimestamp(newShoppingOrder.getModifiedDate()));
    Assert.assertEquals(existingShoppingOrder.getNumber(), newShoppingOrder.getNumber());
    AssertUtils.assertEquals(existingShoppingOrder.getTax(), newShoppingOrder.getTax());
    AssertUtils.assertEquals(existingShoppingOrder.getShipping(), newShoppingOrder.getShipping());
    Assert.assertEquals(existingShoppingOrder.getAltShipping(), newShoppingOrder.getAltShipping());
    Assert.assertEquals(
        existingShoppingOrder.getRequiresShipping(), newShoppingOrder.getRequiresShipping());
    Assert.assertEquals(existingShoppingOrder.getInsure(), newShoppingOrder.getInsure());
    AssertUtils.assertEquals(existingShoppingOrder.getInsurance(), newShoppingOrder.getInsurance());
    Assert.assertEquals(existingShoppingOrder.getCouponCodes(), newShoppingOrder.getCouponCodes());
    AssertUtils.assertEquals(
        existingShoppingOrder.getCouponDiscount(), newShoppingOrder.getCouponDiscount());
    Assert.assertEquals(
        existingShoppingOrder.getBillingFirstName(), newShoppingOrder.getBillingFirstName());
    Assert.assertEquals(
        existingShoppingOrder.getBillingLastName(), newShoppingOrder.getBillingLastName());
    Assert.assertEquals(
        existingShoppingOrder.getBillingEmailAddress(), newShoppingOrder.getBillingEmailAddress());
    Assert.assertEquals(
        existingShoppingOrder.getBillingCompany(), newShoppingOrder.getBillingCompany());
    Assert.assertEquals(
        existingShoppingOrder.getBillingStreet(), newShoppingOrder.getBillingStreet());
    Assert.assertEquals(existingShoppingOrder.getBillingCity(), newShoppingOrder.getBillingCity());
    Assert.assertEquals(
        existingShoppingOrder.getBillingState(), newShoppingOrder.getBillingState());
    Assert.assertEquals(existingShoppingOrder.getBillingZip(), newShoppingOrder.getBillingZip());
    Assert.assertEquals(
        existingShoppingOrder.getBillingCountry(), newShoppingOrder.getBillingCountry());
    Assert.assertEquals(
        existingShoppingOrder.getBillingPhone(), newShoppingOrder.getBillingPhone());
    Assert.assertEquals(
        existingShoppingOrder.getShipToBilling(), newShoppingOrder.getShipToBilling());
    Assert.assertEquals(
        existingShoppingOrder.getShippingFirstName(), newShoppingOrder.getShippingFirstName());
    Assert.assertEquals(
        existingShoppingOrder.getShippingLastName(), newShoppingOrder.getShippingLastName());
    Assert.assertEquals(
        existingShoppingOrder.getShippingEmailAddress(),
        newShoppingOrder.getShippingEmailAddress());
    Assert.assertEquals(
        existingShoppingOrder.getShippingCompany(), newShoppingOrder.getShippingCompany());
    Assert.assertEquals(
        existingShoppingOrder.getShippingStreet(), newShoppingOrder.getShippingStreet());
    Assert.assertEquals(
        existingShoppingOrder.getShippingCity(), newShoppingOrder.getShippingCity());
    Assert.assertEquals(
        existingShoppingOrder.getShippingState(), newShoppingOrder.getShippingState());
    Assert.assertEquals(existingShoppingOrder.getShippingZip(), newShoppingOrder.getShippingZip());
    Assert.assertEquals(
        existingShoppingOrder.getShippingCountry(), newShoppingOrder.getShippingCountry());
    Assert.assertEquals(
        existingShoppingOrder.getShippingPhone(), newShoppingOrder.getShippingPhone());
    Assert.assertEquals(existingShoppingOrder.getCcName(), newShoppingOrder.getCcName());
    Assert.assertEquals(existingShoppingOrder.getCcType(), newShoppingOrder.getCcType());
    Assert.assertEquals(existingShoppingOrder.getCcNumber(), newShoppingOrder.getCcNumber());
    Assert.assertEquals(existingShoppingOrder.getCcExpMonth(), newShoppingOrder.getCcExpMonth());
    Assert.assertEquals(existingShoppingOrder.getCcExpYear(), newShoppingOrder.getCcExpYear());
    Assert.assertEquals(existingShoppingOrder.getCcVerNumber(), newShoppingOrder.getCcVerNumber());
    Assert.assertEquals(existingShoppingOrder.getComments(), newShoppingOrder.getComments());
    Assert.assertEquals(existingShoppingOrder.getPpTxnId(), newShoppingOrder.getPpTxnId());
    Assert.assertEquals(
        existingShoppingOrder.getPpPaymentStatus(), newShoppingOrder.getPpPaymentStatus());
    AssertUtils.assertEquals(
        existingShoppingOrder.getPpPaymentGross(), newShoppingOrder.getPpPaymentGross());
    Assert.assertEquals(
        existingShoppingOrder.getPpReceiverEmail(), newShoppingOrder.getPpReceiverEmail());
    Assert.assertEquals(
        existingShoppingOrder.getPpPayerEmail(), newShoppingOrder.getPpPayerEmail());
    Assert.assertEquals(
        existingShoppingOrder.getSendOrderEmail(), newShoppingOrder.getSendOrderEmail());
    Assert.assertEquals(
        existingShoppingOrder.getSendShippingEmail(), newShoppingOrder.getSendShippingEmail());
  }