LibreOffice Module dbaccess (master) 1
Public Types | Public Member Functions | Private Attributes | List of all members
dbaccess::ObjectNameApproval Class Reference

implementation of the IContainerApprove interface which approves elements for insertion into a query or tables container. More...

#include <objectnameapproval.hxx>

Inheritance diagram for dbaccess::ObjectNameApproval:
[legend]
Collaboration diagram for dbaccess::ObjectNameApproval:
[legend]

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
 

Detailed Description

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.

Member Enumeration Documentation

◆ ObjectType

Enumerator
TypeQuery 
TypeTable 

Definition at line 46 of file objectnameapproval.hxx.

Constructor & Destructor Documentation

◆ ObjectNameApproval()

dbaccess::ObjectNameApproval::ObjectNameApproval ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
ObjectType  _eType 
)

constructs the instance

Parameters
_rxConnectionthe 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.
_eTypespecifies 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.

◆ ~ObjectNameApproval()

dbaccess::ObjectNameApproval::~ObjectNameApproval ( )
overridevirtual

Definition at line 45 of file objectnameapproval.cxx.

Member Function Documentation

◆ approveElement()

void dbaccess::ObjectNameApproval::approveElement ( const OUString &  _rName)
overridevirtual

approves a given element for insertion into the container

Parameters
_rNamespecifies the name under which the element is going to be inserted
Exceptions
Exceptionif 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.

Member Data Documentation

◆ mnCommandType

sal_Int32 dbaccess::ObjectNameApproval::mnCommandType
private

Definition at line 43 of file objectnameapproval.hxx.

Referenced by approveElement(), and ObjectNameApproval().

◆ mxConnection

css::uno::WeakReference< css::sdbc::XConnection > dbaccess::ObjectNameApproval::mxConnection
private

Definition at line 42 of file objectnameapproval.hxx.

Referenced by approveElement(), and ObjectNameApproval().


The documentation for this class was generated from the following files: