LibreOffice Module dbaccess (master) 1
|
implementation of the IContainerApprove interface which approves elements for insertion into a query or tables container. More...
#include <objectnameapproval.hxx>
Public Types | |
enum | ObjectType { TypeQuery , TypeTable } |
Public Member Functions | |
ObjectNameApproval (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, ObjectType _eType) | |
constructs the instance More... | |
virtual | ~ObjectNameApproval () override |
virtual void | approveElement (const OUString &_rName) override |
approves a given element for insertion into the container More... | |
Public Member Functions inherited from dbaccess::IContainerApprove | |
virtual | ~IContainerApprove () |
virtual void | approveElement (const OUString &_rName)=0 |
approves a given element for insertion into the container More... | |
Private Attributes | |
css::uno::WeakReference< css::sdbc::XConnection > | mxConnection |
sal_Int32 | mnCommandType |
implementation of the IContainerApprove interface which approves elements for insertion into a query or tables container.
The only check done by this instance is whether the query name is not already used, taking into account that in some databases, queries and tables share the same namespace.
The class is not thread-safe.
Definition at line 40 of file objectnameapproval.hxx.
Enumerator | |
---|---|
TypeQuery | |
TypeTable |
Definition at line 46 of file objectnameapproval.hxx.
dbaccess::ObjectNameApproval::ObjectNameApproval | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection, |
ObjectType | _eType | ||
) |
constructs the instance
_rxConnection | the connection relative to which the names should be checked. This connection will be held weak. In case it is closed, subsequent calls to this instance's methods throw a DisposedException. |
_eType | specifies which type of objects is to be approved with this instance |
Definition at line 39 of file objectnameapproval.cxx.
References mnCommandType, mxConnection, dbaccess::QUERY, dbaccess::TABLE, and TypeQuery.
|
overridevirtual |
Definition at line 45 of file objectnameapproval.cxx.
|
overridevirtual |
approves a given element for insertion into the container
_rName | specifies the name under which the element is going to be inserted |
Exception | if the name or the object are invalid, or not eligible for insertion into the container |
Implements dbaccess::IContainerApprove.
Definition at line 49 of file objectnameapproval.cxx.
References mnCommandType, and mxConnection.
|
private |
Definition at line 43 of file objectnameapproval.hxx.
Referenced by approveElement(), and ObjectNameApproval().
|
private |
Definition at line 42 of file objectnameapproval.hxx.
Referenced by approveElement(), and ObjectNameApproval().