public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
      long folderId,
      java.lang.String name,
      java.lang.String description,
      long defaultFileEntryTypeId,
      Long[] fileEntryTypeIds,
      boolean overrideFileEntryTypes,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.documentlibrary.model.DLFolder returnValue =
          DLFolderServiceUtil.updateFolder(
              folderId,
              name,
              description,
              defaultFileEntryTypeId,
              ListUtil.toList(fileEntryTypeIds),
              overrideFileEntryTypes,
              serviceContext);

      return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
      long groupId, long parentFolderId, java.lang.String name) throws RemoteException {
    try {
      com.liferay.portlet.documentlibrary.model.DLFolder returnValue =
          DLFolderServiceUtil.getFolder(groupId, parentFolderId, name);

      return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(long folderId)
      throws RemoteException {
    try {
      com.liferay.portlet.documentlibrary.model.DLFolder returnValue =
          DLFolderServiceUtil.getFolder(folderId);

      return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static com.liferay.portlet.documentlibrary.model.DLFolderSoap moveFolder(
      long folderId, long parentFolderId, com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.documentlibrary.model.DLFolder returnValue =
          DLFolderServiceUtil.moveFolder(folderId, parentFolderId, serviceContext);

      return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static com.liferay.portlet.documentlibrary.model.DLFolderSoap[] getMountFolders(
      long groupId,
      long parentFolderId,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator obc)
      throws RemoteException {
    try {
      java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> returnValue =
          DLFolderServiceUtil.getMountFolders(groupId, parentFolderId, start, end, obc);

      return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModels(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
      long groupId,
      long repositoryId,
      boolean mountPoint,
      long parentFolderId,
      java.lang.String name,
      java.lang.String description,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.documentlibrary.model.DLFolder returnValue =
          DLFolderServiceUtil.addFolder(
              groupId, repositoryId, mountPoint, parentFolderId, name, description, serviceContext);

      return com.liferay.portlet.documentlibrary.model.DLFolderSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static DLFolderSoap toSoapModel(DLFolder model) {
    DLFolderSoap soapModel = new DLFolderSoap();

    soapModel.setUuid(model.getUuid());
    soapModel.setFolderId(model.getFolderId());
    soapModel.setGroupId(model.getGroupId());
    soapModel.setCompanyId(model.getCompanyId());
    soapModel.setUserId(model.getUserId());
    soapModel.setUserName(model.getUserName());
    soapModel.setCreateDate(model.getCreateDate());
    soapModel.setModifiedDate(model.getModifiedDate());
    soapModel.setRepositoryId(model.getRepositoryId());
    soapModel.setMountPoint(model.getMountPoint());
    soapModel.setParentFolderId(model.getParentFolderId());
    soapModel.setTreePath(model.getTreePath());
    soapModel.setName(model.getName());
    soapModel.setDescription(model.getDescription());
    soapModel.setLastPostDate(model.getLastPostDate());
    soapModel.setDefaultFileEntryTypeId(model.getDefaultFileEntryTypeId());
    soapModel.setHidden(model.getHidden());
    soapModel.setOverrideFileEntryTypes(model.getOverrideFileEntryTypes());
    soapModel.setStatus(model.getStatus());
    soapModel.setStatusByUserId(model.getStatusByUserId());
    soapModel.setStatusByUserName(model.getStatusByUserName());
    soapModel.setStatusDate(model.getStatusDate());

    return soapModel;
  }
  /**
   * Converts the soap model instance into a normal model instance.
   *
   * @param soapModel the soap model instance to convert
   * @return the normal model instance
   */
  public static DLFolder toModel(DLFolderSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    DLFolder model = new DLFolderImpl();

    model.setUuid(soapModel.getUuid());
    model.setFolderId(soapModel.getFolderId());
    model.setGroupId(soapModel.getGroupId());
    model.setCompanyId(soapModel.getCompanyId());
    model.setUserId(soapModel.getUserId());
    model.setUserName(soapModel.getUserName());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setRepositoryId(soapModel.getRepositoryId());
    model.setMountPoint(soapModel.getMountPoint());
    model.setParentFolderId(soapModel.getParentFolderId());
    model.setTreePath(soapModel.getTreePath());
    model.setName(soapModel.getName());
    model.setDescription(soapModel.getDescription());
    model.setLastPostDate(soapModel.getLastPostDate());
    model.setDefaultFileEntryTypeId(soapModel.getDefaultFileEntryTypeId());
    model.setHidden(soapModel.getHidden());
    model.setRestrictionType(soapModel.getRestrictionType());
    model.setLastPublishDate(soapModel.getLastPublishDate());
    model.setStatus(soapModel.getStatus());
    model.setStatusByUserId(soapModel.getStatusByUserId());
    model.setStatusByUserName(soapModel.getStatusByUserName());
    model.setStatusDate(soapModel.getStatusDate());

    return model;
  }