1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
#ifndef _WB_OVERVIEW_PHYSICAL_SCHEMA_H_
#define _WB_OVERVIEW_PHYSICAL_SCHEMA_H_
#include "workbench/wb_overview.h"
namespace wb { namespace internal {
class PhysicalSchemaContentNode;
class SchemaObjectNode;
class PhysicalSchemaNode : public OverviewBE::ContainerNode
{
public:
virtual void init();
protected:
bool _is_routine_group_enabled;
public:
PhysicalSchemaNode(db_SchemaRef schema);
virtual bool is_pasteable(bec::Clipboard *clip);
virtual void paste_object(WBContext *wb, bec::Clipboard *clip);
virtual bool is_deletable();
virtual void delete_object(WBContext *wb);
virtual bool is_renameable();
virtual bool rename(WBContext *wb, const std::string &name);
virtual bool activate(WBContext *wb);
virtual void focus(OverviewBE *sender);
virtual void refresh();
public:
virtual bool add_new_db_table(WBContext *wb);
virtual bool add_new_db_view(WBContext *wb);
virtual bool add_new_db_routine_group(WBContext *wb);
virtual bool add_new_db_routine(WBContext *wb);
virtual SchemaObjectNode * create_table_node(const db_DatabaseObjectRef &dbobject);
virtual SchemaObjectNode * create_view_node(const db_DatabaseObjectRef &dbobject);
virtual SchemaObjectNode * create_routine_node(const db_DatabaseObjectRef &dbobject);
virtual SchemaObjectNode * create_routine_group_node(const db_DatabaseObjectRef &dbobject);
};
class SchemaObjectNode : public OverviewBE::ObjectNode
{
SchemaObjectNode(const SchemaObjectNode ©) : OverviewBE::ObjectNode(copy) {}
public:
SchemaObjectNode(const db_DatabaseObjectRef &dbobject);
virtual void delete_object(WBContext *wb);
virtual bool is_deletable();
virtual bool is_renameable();
virtual void copy_object(WBContext *wb, bec::Clipboard *clip);
virtual bool is_copyable();
};
class SchemaTableNode : public SchemaObjectNode
{
public:
SchemaTableNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
virtual std::string get_detail(int field);
};
class SchemaViewNode : public SchemaObjectNode
{
public:
SchemaViewNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
virtual bool is_renameable();
virtual std::string get_detail(int field);
};
class SchemaRoutineGroupNode : public SchemaObjectNode
{
public:
SchemaRoutineGroupNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
virtual std::string get_detail(int field);
};
class SchemaRoutineNode : public SchemaObjectNode
{
public:
SchemaRoutineNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
virtual std::string get_detail(int field);
virtual bool is_renameable();
};
}; };
#endif /* _WB_OVERVIEW_PHYSICAL_SCHEMA_H_ */
|