示例#1
0
  /**
   * Update and persist the tag type per specified update request.
   *
   * @param tagTypeEntity the tag type entity
   * @param request the tag type update request
   */
  private void updateTagTypeEntity(TagTypeEntity tagTypeEntity, TagTypeUpdateRequest request) {
    tagTypeEntity.setDisplayName(request.getDisplayName());
    tagTypeEntity.setOrderNumber(request.getTagTypeOrder());

    // Persist and refresh the entity.
    tagTypeDao.saveAndRefresh(tagTypeEntity);
  }
示例#2
0
 /**
  * Creates and persists a new tag type entity.
  *
  * @param tagTypeCode the tag type code
  * @param displayName the display name
  * @param tagTypeOrder the tag type order number
  * @return the newly created tag type entity
  */
 private TagTypeEntity createTagTypeEntity(
     String tagTypeCode, String displayName, int tagTypeOrder) {
   TagTypeEntity tagTypeEntity = new TagTypeEntity();
   tagTypeEntity.setCode(tagTypeCode);
   tagTypeEntity.setDisplayName(displayName);
   tagTypeEntity.setOrderNumber(tagTypeOrder);
   return tagTypeDao.saveAndRefresh(tagTypeEntity);
 }