MySQL 8.0.39
Source Code Documentation
entity_object.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef DD__ENTITY_OBJECT_INCLUDED
25#define DD__ENTITY_OBJECT_INCLUDED
26
27#include "sql/dd/object_id.h" // dd::Object_id
28#include "sql/dd/string_type.h" // dd::String_type
29#include "sql/dd/types/weak_object.h" // dd::Weak_object
30
31namespace dd {
32namespace cache {
33class Storage_adapter;
34}
35
36///////////////////////////////////////////////////////////////////////////
37
38/**
39 Base class for dictionary objects which has single column
40 integer primary key.
41
42 @note This class may be inherited along different paths
43 for some subclasses due to the diamond shaped
44 inheritance hierarchy; thus, direct subclasses
45 must inherit this class virtually.
46*/
47
48class Entity_object : virtual public Weak_object {
49 public:
50 /// The unique dictionary object id.
51 virtual Object_id id() const = 0;
52
53 /// Is dictionary object persistent in dictionary tables ?
54 virtual bool is_persistent() const = 0;
55
56 virtual const String_type &name() const = 0;
57 virtual void set_name(const String_type &name) = 0;
58
59 private:
60 virtual class Entity_object_impl *impl() = 0;
61 virtual const class Entity_object_impl *impl() const = 0;
64};
65
66///////////////////////////////////////////////////////////////////////////
67
68} // namespace dd
69
70#endif // DD__ENTITY_OBJECT_INCLUDED
Definition: entity_object_impl.h:44
Definition: entity_object_table_impl.h:46
Base class for dictionary objects which has single column integer primary key.
Definition: entity_object.h:48
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:42
Handling of access to persistent storage.
Definition: storage_adapter.h:60
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51