% Generated by roxygen2: do not edit by hand % Please edit documentation in R/db_organisations.R \name{MNR.DB.Organisations} \alias{MNR.DB.Organisations} \title{MNR database queries for Organsiations} \value{ A query object for an organsation (collect = FALSE) or a tibble with the organisation details The organisation ids if as_int is TRUE, the organisation names if as_int is FALSE and name_only is TRUE, else the organisations or an uncollected query object TRUE if the organisation is a regulator The regulator ids if as_int is TRUE, the regulator names if as_int is FALSE and name_only is TRUE, else the regulator or an uncollected query object A tibble of the organisation members or an uncollected query TRUE if the user's organisation is an agent An uncollected query object or a tibble of agents An uncollected query object or a tibble of recipients The organisation id if as_int is TRUE, the organisation name if as_int is FALSE and name_only is TRUE, else the organisation or an uncollected query object } \description{ MNR database queries for Organsiations MNR database queries for Organsiations } \section{Super class}{ \code{\link[AVSDevR.MarineNoiseRegistry:MNR.DB]{AVSDevR.MarineNoiseRegistry::MNR.DB}} -> \code{MNR.DB.Organisations} } \section{Methods}{ \subsection{Public methods}{ \itemize{ \item \href{#method-MNR.DB.Organisations-getOrganisation}{\code{MNR.DB.Organisations$getOrganisation()}} \item \href{#method-MNR.DB.Organisations-getAllOrganisations}{\code{MNR.DB.Organisations$getAllOrganisations()}} \item \href{#method-MNR.DB.Organisations-isRegulator}{\code{MNR.DB.Organisations$isRegulator()}} \item \href{#method-MNR.DB.Organisations-getRegulators}{\code{MNR.DB.Organisations$getRegulators()}} \item \href{#method-MNR.DB.Organisations-getOrganisationMembers}{\code{MNR.DB.Organisations$getOrganisationMembers()}} \item \href{#method-MNR.DB.Organisations-isAgent}{\code{MNR.DB.Organisations$isAgent()}} \item \href{#method-MNR.DB.Organisations-getOrganisationAgents}{\code{MNR.DB.Organisations$getOrganisationAgents()}} \item \href{#method-MNR.DB.Organisations-getAgentRecipients}{\code{MNR.DB.Organisations$getAgentRecipients()}} \item \href{#method-MNR.DB.Organisations-getUserOrganisation}{\code{MNR.DB.Organisations$getUserOrganisation()}} \item \href{#method-MNR.DB.Organisations-clone}{\code{MNR.DB.Organisations$clone()}} } } \if{html}{\out{
Inherited methods
}} \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getOrganisation}{}}} \subsection{Method \code{getOrganisation()}}{ Fetch the details of an organisation from the database \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getOrganisation(org_id, collect = TRUE)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{org_id}}{\if{html}{\out{}} The id of the organisation to fetch} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getAllOrganisations}{}}} \subsection{Method \code{getAllOrganisations()}}{ Fetch the details of all organisations from the database \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getAllOrganisations( as_int = FALSE, name_only = TRUE, collect = TRUE )}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{as_int}}{\if{html}{\out{}} Return only the ids (TRUE)} \item{\code{name_only}}{\if{html}{\out{}} Return only the name (TRUE)} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-isRegulator}{}}} \subsection{Method \code{isRegulator()}}{ Check if an organisation is a regulator \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$isRegulator(org_id)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{org_id}}{\if{html}{\out{}} The id of the organisation to check} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getRegulators}{}}} \subsection{Method \code{getRegulators()}}{ Fetch the details of all the regulators from the database \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getRegulators( as_int = FALSE, name_only = TRUE, collect = TRUE )}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{as_int}}{\if{html}{\out{}} Return only the ids (TRUE)} \item{\code{name_only}}{\if{html}{\out{}} Return only the name (TRUE)} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getOrganisationMembers}{}}} \subsection{Method \code{getOrganisationMembers()}}{ Fetch the members of an organisation \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getOrganisationMembers( org_name = "", org_id = -1, collect = TRUE )}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{org_name}}{\if{html}{\out{}} The name of the organisation to check} \item{\code{org_id}}{\if{html}{\out{}} The id of the organisation to check} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-isAgent}{}}} \subsection{Method \code{isAgent()}}{ Check if user's organisation is an agent for another organisation \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$isAgent(org_id)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{org_id}}{\if{html}{\out{}} The id of the organisation to check} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getOrganisationAgents}{}}} \subsection{Method \code{getOrganisationAgents()}}{ Fetch the agents of an organisation \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getOrganisationAgents( org_id, as_int = FALSE, collect = TRUE )}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{org_id}}{\if{html}{\out{}} The id of the organisation to check} \item{\code{as_int}}{\if{html}{\out{}} Return only the id (TRUE)} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getAgentRecipients}{}}} \subsection{Method \code{getAgentRecipients()}}{ Fetch the recipients of an organisation \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getAgentRecipients( agent_id, as_int = FALSE, collect = TRUE )}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{agent_id}}{\if{html}{\out{}} The id of the organisation (agent) to check} \item{\code{as_int}}{\if{html}{\out{}} Return only the id (TRUE)} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-getUserOrganisation}{}}} \subsection{Method \code{getUserOrganisation()}}{ Fetch the organisation of a user \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$getUserOrganisation( user_id, as_int = TRUE, name_only = TRUE, collect = TRUE )}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{user_id}}{\if{html}{\out{}} The id of the user to fetch the organisation of} \item{\code{as_int}}{\if{html}{\out{}} Return only the id (TRUE)} \item{\code{name_only}}{\if{html}{\out{}} Return only the name (TRUE)} \item{\code{collect}}{\if{html}{\out{}} Collect the query before returning (TRUE) or return the built query object (FALSE)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-MNR.DB.Organisations-clone}{}}} \subsection{Method \code{clone()}}{ The objects of this class are cloneable with this method. \subsection{Usage}{ \if{html}{\out{
}}\preformatted{MNR.DB.Organisations$clone(deep = FALSE)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{deep}}{Whether to make a deep clone.} } \if{html}{\out{
}} } } }