17 |
17 |
** 009 OM 20181207 Populated DatabaseFeature metadata table.
|
18 |
18 |
** 010 IAS 20200518 Populating _File, _Field, _Index, and _Index-Field metadata tables.
|
19 |
19 |
** 011 IAS 20200604 Added support for *-SA and CAN-* fields in _File/_Field tables.
|
|
20 |
** 012 IAS 20200617 No fatal error if p2j.cfg.xml is not found; mandatory meta tables support
|
20 |
21 |
*/
|
21 |
22 |
/*
|
22 |
23 |
** This program is free software: you can redistribute it and/or modify
|
... | ... | |
84 |
85 |
import java.util.logging.*;
|
85 |
86 |
import java.util.stream.*;
|
86 |
87 |
|
87 |
|
import org.aspectj.org.eclipse.jdt.internal.formatter.linewrap.*;
|
88 |
|
import org.aspectj.weaver.ast.*;
|
89 |
|
import org.hibernate.bytecode.instrumentation.internal.javassist.*;
|
90 |
88 |
import org.hibernate.dialect.*;
|
91 |
89 |
import org.w3c.dom.*;
|
92 |
90 |
|
... | ... | |
204 |
202 |
public static boolean initialize()
|
205 |
203 |
throws PersistenceException
|
206 |
204 |
{
|
207 |
|
if (!Configuration.getSchemaConfig().isMetadataActive())
|
|
205 |
if (Configuration.getSchemaConfig().getMetadata() == null)
|
208 |
206 |
{
|
209 |
207 |
if (log.isLoggable(Level.INFO))
|
210 |
208 |
{
|
... | ... | |
216 |
214 |
String basePkg = DMOIndex.getBasePackage();
|
217 |
215 |
baseDir = basePkg.replaceAll("\\.", "/");
|
218 |
216 |
|
219 |
|
Set<String> legacyTables = Configuration.getSchemaConfig().getMetadata().getTables();
|
|
217 |
Set<String> legacyTables = SystemTable.mandatoryTables();
|
|
218 |
legacyTables.addAll(Configuration.getSchemaConfig().getMetadata().getTables());
|
220 |
219 |
for (String aTable : legacyTables)
|
221 |
220 |
{
|
222 |
221 |
SystemTable systemTable = SystemTable.forName(aTable);
|
... | ... | |
408 |
407 |
public static void populateDatabase(Database metaDb, String schema)
|
409 |
408 |
throws PersistenceException
|
410 |
409 |
{
|
|
410 |
if (!Configuration.getSchemaConfig().isMetadataActive())
|
|
411 |
{
|
|
412 |
if (log.isLoggable(Level.INFO))
|
|
413 |
{
|
|
414 |
log.log(Level.INFO, "Metadata server was not started; no metadata in use");
|
|
415 |
}
|
|
416 |
return;
|
|
417 |
}
|
411 |
418 |
SchemaConfig.Metadata metadata = com.goldencode.p2j.cfg.Configuration.
|
412 |
419 |
getSchemaConfig().getMetadata();
|
413 |
420 |
String path = String.format("%s/%s/%s.meta.xml", baseDir, schema, schema);
|
... | ... | |
1337 |
1344 |
/** */
|
1338 |
1345 |
_Code_Feature(-16428, "_Code-Feature", Category.VST),
|
1339 |
1346 |
/** */
|
1340 |
|
_Database_Feature(-16427, "_Database-Feature", Category.VST,
|
|
1347 |
_Database_Feature(-16427, "_Database-Feature", Category.VST, MANDATORY,
|
1341 |
1348 |
MetadataManager::populateDatabaseFeatures),
|
1342 |
1349 |
/** Provides detailed information about an OpenEdge Replication agent. */
|
1343 |
1350 |
_Repl_Agent(-16426, "_Repl-Agent", Category.VST),
|
... | ... | |
1351 |
1358 |
/** */
|
1352 |
1359 |
_AreaStatus(-16423, "_AreaStatus", Category.VST),
|
1353 |
1360 |
/** */
|
1354 |
|
_MyConnection(-16422, "_MyConnection", Category.VST),
|
|
1361 |
_MyConnection(-16422, "_MyConnection", Category.VST , MANDATORY),
|
1355 |
1362 |
/** */
|
1356 |
1363 |
_UserStatus(-16421, "_UserStatus", Category.VST),
|
1357 |
1364 |
/** */
|
... | ... | |
1409 |
1416 |
/** */
|
1410 |
1417 |
_UserLock(-16394, "_UserLock", Category.VST),
|
1411 |
1418 |
/** */
|
1412 |
|
_Filelist(-16393, "_Filelist", Category.VST),
|
|
1419 |
_Filelist(-16393, "_Filelist", Category.VST, MANDATORY),
|
1413 |
1420 |
/** */
|
1414 |
|
_Startup(-16392, "_Startup", Category.VST),
|
|
1421 |
_Startup(-16392, "_Startup", Category.VST, MANDATORY),
|
1415 |
1422 |
/** */
|
1416 |
1423 |
_Servers(-16391, "_Servers", Category.VST),
|
1417 |
1424 |
/** */
|
... | ... | |
1425 |
1432 |
/** */
|
1426 |
1433 |
_MstrBlk(-16386, "_MstrBlk", Category.VST),
|
1427 |
1434 |
/** */
|
1428 |
|
_Connect(-16385, "_Connect", Category.VST),
|
|
1435 |
_Connect(-16385, "_Connect", Category.VST, MANDATORY),
|
1429 |
1436 |
/** */
|
1430 |
1437 |
_Constraint_Keys(-361, "_Constraint-Keys", Category.DS_SCHEMA),
|
1431 |
1438 |
/** */
|
... | ... | |
1545 |
1552 |
/** */
|
1546 |
1553 |
_AreaExtent(-72, "_AreaExtent", Category.PHY_ST),
|
1547 |
1554 |
/** */
|
1548 |
|
_Area(-71, "_Area", Category.PHY_ST),
|
|
1555 |
_Area(-71, "_Area", Category.PHY_ST, MANDATORY),
|
1549 |
1556 |
/** */
|
1550 |
1557 |
_StorageObject(-70, "_StorageObject", Category.PHY_ST),
|
1551 |
1558 |
/** */
|
... | ... | |
1553 |
1560 |
/** */
|
1554 |
1561 |
_Codepage(-68, "_Codepage", Category.SCHEMA),
|
1555 |
1562 |
/** */
|
1556 |
|
_Sequence(-67, "_Sequence", Category.SCHEMA),
|
1557 |
|
/** */
|
1558 |
|
_Field_Trig(-66, "_Field-Trig", Category.SCHEMA),
|
1559 |
|
/** */
|
1560 |
|
_File_Trig(-65, "_File-Trig", Category.SCHEMA),
|
|
1563 |
_Sequence(-67, "_Sequence", Category.SCHEMA, MANDATORY),
|
|
1564 |
/** */
|
|
1565 |
_Field_Trig(-66, "_Field-Trig", Category.SCHEMA, MANDATORY),
|
|
1566 |
/** */
|
|
1567 |
_File_Trig(-65, "_File-Trig", Category.SCHEMA, MANDATORY),
|
1561 |
1568 |
/** */
|
1562 |
1569 |
_View_Ref(-32, "_View-Ref", Category.SQL89),
|
1563 |
1570 |
/** */
|
... | ... | |
1565 |
1572 |
/** */
|
1566 |
1573 |
_View(-30, "_View", Category.SQL89),
|
1567 |
1574 |
/** */
|
1568 |
|
_Db(-6, "_Db", Category.SCHEMA),
|
1569 |
|
/** */
|
1570 |
|
_User(-5, "_User", Category.AUTH, REGULAR),
|
1571 |
|
/** */
|
1572 |
|
_Index_Field(-4, "_Index-Field", Category.SCHEMA, IGNORE_META_XML),
|
1573 |
|
/** */
|
1574 |
|
_Index(-3, "_Index", Category.SCHEMA, IGNORE_META_XML),
|
1575 |
|
/** */
|
1576 |
|
_Field(-2, "_Field", Category.SCHEMA, IGNORE_META_XML),
|
1577 |
|
/** */
|
1578 |
|
_File(-1, "_File", Category.SCHEMA, IGNORE_META_XML, MetadataManager::populateFileTable);
|
|
1575 |
_Db(-6, "_Db", Category.SCHEMA, MANDATORY),
|
|
1576 |
/** */
|
|
1577 |
_User(-5, "_User", Category.AUTH, REGULAR | MANDATORY),
|
|
1578 |
/** */
|
|
1579 |
_Index_Field(-4, "_Index-Field", Category.SCHEMA, IGNORE_META_XML | MANDATORY),
|
|
1580 |
/** */
|
|
1581 |
_Index(-3, "_Index", Category.SCHEMA, IGNORE_META_XML | MANDATORY),
|
|
1582 |
/** */
|
|
1583 |
_Field(-2, "_Field", Category.SCHEMA, IGNORE_META_XML | MANDATORY),
|
|
1584 |
/** */
|
|
1585 |
_File(-1, "_File", Category.SCHEMA, IGNORE_META_XML | MANDATORY, MetadataManager::populateFileTable);
|
1579 |
1586 |
|
1580 |
1587 |
/** Table id */
|
1581 |
1588 |
public final int _file_num;
|
... | ... | |
1875 |
1882 |
build();
|
1876 |
1883 |
}
|
1877 |
1884 |
}
|
1878 |
|
}
|
|
1885 |
}
|