Ignore:
Timestamp:
02/20/15 15:17:07 (9 years ago)
Author:
olhsha@mpi.nl
Message:

Javadoc are updated for the interfaces NotebookDao?, ResourceDao?, TargetDao? and some helpers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/NotebookDao.java

    r4834 r6004  
    4343  **/
    4444   
     45    /**
     46     *
     47     * @param notebookID the internal ID of a notebook.
     48     * @return the internal database Id of the owner of the notebook.
     49     */
    4550    Number getOwner(Number notebookID);
    4651   
    4752   
    48    
     53    /**
     54     *
     55     * @param principalID the internal database id of some principal.
     56     * @param acessMode {@link Access} object, representing one of the access modes:
     57     * "all", "write", "read" or "none".
     58     * @return the list of internal database id's of the notebooks for which "principalID" has ""accessMode" access.
     59     */
    4960    List<Number> getNotebookIDs(Number principalID, Access acessMode);
    5061   
    51     // Returns a list of notebook Ids for the notebooks for which the given principal "principalID" is the owner.
     62   /**
     63    * @param principaID the internal database id of some principal.
     64    * @return  the list of internal database id's of the notebooks for which "principalID" is the owner.
     65    */
    5266    List<Number> getNotebookIDsOwnedBy(Number principaID);
    5367   
     
    5670    /**
    5771     *
    58      * @param notebookID
    59      * @return the notebook info for the notebook with notebookID
     72     * @param notebookID the internal database id of a notebook.
     73     * @return the {@link NotebookInfo} object built for the notebook with notebookID upon the corresponding row
     74     * in the "notebook" table.
    6075     */
    6176    NotebookInfo getNotebookInfoWithoutOwner(Number notebookID);
     
    6479    /**
    6580     *
    66      * @param notebookID
    67      * @return notebook metadata for the notebook with notebookID
     81     * @param notebookID the internal database id of a notebook.
     82     * @return the {@link Notebook} object built for the notebook with notebookID upon the corresponding row
     83     * in the "notebook" table.
    6884     */
    6985    Notebook getNotebookWithoutAnnotationsAndAccesssAndOwner(Number notebookID);
     
    8197   
    8298   
    83     /**
    84      *
    85      * @param notebookID
    86      * @return true if updated, false otherwise. Logs the reason if the notebook is not updated.
     99
     100    /**
     101     *
     102     * @param notebookID the internal database id of a notebook.
     103     * @param title a new title for the notebook.
     104     * @param ownerID the internal database id of the owner principal of the notebook.
     105     * @return true if the title "notebookID" is updated to "title", false otherwise.
    87106     */
    88107    boolean updateNotebookMetadata(Number notebookID, String title, Number ownerID);
    89108   
     109   
     110    /**
     111     *
     112     * @param notebookID the internal database id of a notebook.
     113     * @param ownerID the internal database id of a new owner for the notebook.
     114     * @return true if the owner_id is in "notebook" table is updated to "ownerID", false otherwise.
     115     */
    90116    boolean setOwner(Number notebookID, Number ownerID);
    91117   
     118    /**
     119     *
     120     * @param notebookID the internal database id of a notebook.
     121     * @param principalID the internal database id of a principal.
     122     * @param access an {@link Access} object.
     123     * @return true iff the access mode to "notebookID" for "principalID" has been assigned to "access"'s value.
     124     */
    92125    boolean updatePrincipalAccessForNotebook(Number notebookID, Number principalID, Access access);
    93126   
     
    99132     */
    100133   
     134    /**
     135     *
     136     * @param notebook the {@link Notebook} object representing a notebook to be created in the database.
     137     * @param ownerID the internal database id of the owner principal.
     138     * @return the internal id of the created notebook.
     139     * @throws NotInDataBaseException if creation the notebook fails.
     140     */
    101141    public Number createNotebookWithoutAccesssAndAnnotations(Notebook notebook, Number ownerID) throws NotInDataBaseException;
    102142   
     143    /**
     144     *
     145     * @param notebookID the internal database ID of a notebook.
     146     * @param annotationID the internal database ID of an annotation.
     147     * @return  true if the row for the (ntebookID,annotationID) has been added to the junction table
     148     * "notebooks_annotations".
     149     */
    103150    boolean addAnnotationToNotebook(Number notebookID, Number annotationID);
    104151   
     152    /**
     153     *
     154     * @param notebookID the internal database ID of a notebook.
     155     * @param principalID the internal database ID of a principal.
     156     * @param access access an {@link Access} object.
     157     * @return true iff the "access" mode to "notebookID" has been assigned for "principalID"
     158     * in the corresponding junction table.
     159     */
    105160    boolean addAccessToNotebook(Number notebookID, Number principalID, Access access);
    106161   
     
    114169     */
    115170   
     171    /**
     172     *
     173     * @param notebookID the internal database ID of a notebook.
     174     * @param annotationID annotationID the internal database ID of an annotation.
     175     * @return  true iff the row for the (notebookID,annotationID) has been deleted from the junction table
     176     * "notebooks_annotations".
     177     */
    116178    boolean deleteAnnotationFromNotebook(Number notebookID, Number annotationID);
    117179   
     180    /**
     181     *
     182     * @param notebookID the internal database ID of a notebook.
     183     * @return true iff all the rows with "notebookID" have been removed from "notebooks_annotations" table.
     184     */
    118185    boolean deleteAllAnnotationsFromNotebook(Number notebookID);
    119186   
     187    /**
     188     *
     189     * @param notebookID the internal database ID of a notebook.
     190     * @param principalID the internal database ID of a principal.
     191     * @return true iff the row for the pair (notebookID, principlaID) has been removed from the "notebooks_principals_accesses" table.
     192     */
    120193    boolean deleteNotebookPrincipalAccess(Number notebookID, Number principalID);
    121194   
     195    /**
     196     *
     197     * @param notebookID the internal database ID of a notebook.
     198     * @return true iff all the rows with "notebookID" have been removed from from the "notebooks_principals_accesses" table.
     199     */
    122200    boolean deleteAllAccesssForNotebook(Number notebookID);
    123201   
     202    /**
     203     *
     204     * @param notebookID the internal database ID of a notebook.
     205     * @return true iff the notebook with "notebookID" has been removed from the "notebook" table.
     206     */
    124207    boolean deleteNotebook(Number notebookID);
    125208}
Note: See TracChangeset for help on using the changeset viewer.