MySQL 8.3.0
Source Code Documentation
entity_object.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 2023, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef DD__ENTITY_OBJECT_INCLUDED
24#define DD__ENTITY_OBJECT_INCLUDED
25
26#include "sql/dd/object_id.h" // dd::Object_id
27#include "sql/dd/string_type.h" // dd::String_type
28#include "sql/dd/types/weak_object.h" // dd::Weak_object
29
30namespace dd {
31namespace cache {
32class Storage_adapter;
33}
34
35///////////////////////////////////////////////////////////////////////////
36
37/**
38 Base class for dictionary objects which has single column
39 integer primary key.
40
41 @note This class may be inherited along different paths
42 for some subclasses due to the diamond shaped
43 inheritance hierarchy; thus, direct subclasses
44 must inherit this class virtually.
45*/
46
47class Entity_object : virtual public Weak_object {
48 public:
49 /// The unique dictionary object id.
50 virtual Object_id id() const = 0;
51
52 /// Is dictionary object persistent in dictionary tables ?
53 virtual bool is_persistent() const = 0;
54
55 virtual const String_type &name() const = 0;
56 virtual void set_name(const String_type &name) = 0;
57
58 private:
59 virtual class Entity_object_impl *impl() = 0;
60 virtual const class Entity_object_impl *impl() const = 0;
63};
64
65///////////////////////////////////////////////////////////////////////////
66
67} // namespace dd
68
69#endif // DD__ENTITY_OBJECT_INCLUDED
Definition: entity_object_impl.h:43
Definition: entity_object_table_impl.h:45
Base class for dictionary objects which has single column integer primary key.
Definition: entity_object.h:47
virtual Object_id id() const =0
The unique dictionary object id.
virtual const class Entity_object_impl * impl() const =0
virtual void set_name(const String_type &name)=0
virtual bool is_persistent() const =0
Is dictionary object persistent in dictionary tables ?
virtual const String_type & name() const =0
virtual class Entity_object_impl * impl()=0
Base class for all data dictionary objects.
Definition: weak_object.h:41
Handling of access to persistent storage.
Definition: storage_adapter.h:59
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
unsigned long long Object_id
Definition: object_id.h:30
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50