This table provides a list of valid meta classes. This information is static and doesn't need a data entry page.
Source romber_meta_classes_tbl.sql
create table romber_meta.classes ( audit_or_not boolean not null, max_level smallint not null check ( max_level between 0 and 3 ), meta_class_code_plural romber_base.generic_code not null, meta_class_code_singular romber_base.generic_code not null, meta_class_id romber_meta.class_id not null default nextval ( 'romber_base.generic_id_seq' ), meta_class_name_plural romber_base.generic_name not null, meta_class_name_singular romber_base.generic_name not null, meta_module_id romber_meta.module_id not null, meta_package_id romber_meta.package_id not null, meta_security_model_id romber_meta.security_model_id not null, meta_table_id romber_meta.table_id not null, min_level smallint not null check ( min_level between 0 and 3 ), validity_or_not boolean not null, versions_or_not boolean not null );
Source romber_meta_classes_pk.sql
alter table romber_meta.classes add constraint romber_meta_classes_pk primary key ( meta_class_id );
Source romber_meta_classes_uk1.sql
alter table romber_meta.classes add constraint romber_meta_classes_uk1 unique ( meta_class_code_singular );
Source romber_meta_classes_uk2.sql
alter table romber_meta.classes add constraint romber_meta_classes_uk2 unique ( meta_class_code_plural );
Source romber_meta_classes_fk1.sql
alter table romber_meta.classes add constraint romber_meta_classes_fk1 foreign key ( meta_package_id ) references romber_meta.packages ( meta_package_id );
Source romber_meta_classes_fk2.sql
alter table romber_meta.classes add constraint romber_meta_classes_fk2 foreign key ( meta_table_id ) references romber_meta.tables ( meta_table_id );
Source romber_meta_classes_fk3.sql
alter table romber_meta.classes add constraint romber_meta_classes_fk3 foreign key ( meta_module_id ) references romber_meta.modules ( meta_module_id );
Source romber_meta_classes_fk4.sql
alter table romber_meta.classes add constraint romber_meta_classes_fk4 foreign key ( meta_security_model_id ) references romber_meta.security_models ( meta_security_model_id );
Source romber_meta_classes_ck1.sql
alter table romber_meta.classes add constraint romber_meta_classes_ck1 check ( min_level <= max_level );
Source romber_meta_classes_load.sql
insert into romber_meta.classes ( audit_or_not, max_level, meta_class_code_singular, meta_class_code_plural, meta_class_id, meta_class_name_plural, meta_class_name_singular, meta_module_id, meta_package_id, meta_security_model_id, meta_table_id, min_level, validity_or_not, versions_or_not ) values ( false, 0, '', '', 0, '', '', 0, ( select meta_package_id from romber_meta.packages where meta_package_code = 'ROMBER' ), 0, 0, 0, false, false );