com.oracle.email.dao

## Class UserFolderDAO

- java.lang.Object
- - com.oracle.email.dao.BaseDAO
  - - com.oracle.email.dao.UserFolderDAO

-     public class UserFolderDAO
      extends BaseDAO

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserFolderDAO()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addFolders(java.lang.String userId, java.util.List<java.lang.String> folderNames)` This method add folders for a userId.
    `void` | `createTable()` Each DAO class need to define how to create the table
    `java.lang.String` | `getFolderId(java.lang.String userId, java.lang.String folderName)` Get primary id of the folder when userId and folder name is passed as argument
    `java.util.List<FolderTO>` | `getFolders(java.lang.String userId)` Get all the folders for a UserId
    `static void` | `main(java.lang.String[] args)`

    - ### Methods inherited from class com.oracle.email.dao.BaseDAO

      `getHostPort, getKVStore, getStoreName, getTable, getTableAPI, getTableRows, setHostPort, setStoreName`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UserFolderDAO

          public UserFolderDAO()

  - ### Method Detail

    - #### createTable

          public void createTable()

      Description copied from class: `BaseDAO`
      Each DAO class need to define how to create the table
      Specified by:
        `createTable` in class `BaseDAO`

    - #### addFolders

          public boolean addFolders(java.lang.String userId,
                                    java.util.List<java.lang.String> folderNames)
                             throws DAOException

      This method add folders for a userId.
      Parameters:
        `userId` - - Unique Id of the user
        `folderNames` - - List of folder names (like inbox, sent, trash etc)
      Returns:
        true if operation is successful otherwise false.
      Throws:
        `DAOException` - when folder by same name already exist.

    - #### getFolderId

          public java.lang.String getFolderId(java.lang.String userId,
                                              java.lang.String folderName)
                                       throws DAOException

      Get primary id of the folder when userId and folder name is passed as argument
      Parameters:
        `userId` - - primary key of the user table
        `folderName` - - name of the folder
      Returns:
        folderId
      Throws:
        `DAOException` - when userId and folderName don't exist in User.Folder table

    - #### getFolders

          public java.util.List<FolderTO> getFolders(java.lang.String userId)

      Get all the folders for a UserId
      Parameters:
        `userId` - - unique id of User table
      Returns:
        List of FolderTO

    - #### main

          public static void main(java.lang.String[] args)