TransactionTableUpdater.patch
src/com/goldencode/p2j/persist/meta/TransactionTableUpdater.java 2020-05-01 08:31:54 +0000 | ||
---|---|---|
95 | 95 |
static |
96 | 96 |
{ |
97 | 97 |
String dmoName = DmoMetadataManager.getBasePackage() + "._meta.MetaTrans"; |
98 |
Class<? extends Record> aClass = null; |
|
98 | 99 |
try |
99 | 100 |
{ |
100 |
dmoClass = DmoMetadataManager.getImplementingClass(
|
|
101 |
aClass = DmoMetadataManager.getImplementingClass(
|
|
101 | 102 |
(Class<? extends DataModelObject>) Class.forName(dmoName)); |
102 | 103 |
|
103 | 104 |
// map MinimalTrans methods to corresponding dmoClass methods; if we try to use |
... | ... | |
106 | 107 |
// instance of MinimalTrans |
107 | 108 |
for (Method ifcMeth : MinimalTrans.class.getMethods()) |
108 | 109 |
{ |
109 |
Method dmoMeth = dmoClass.getMethod(ifcMeth.getName(), |
|
110 |
ifcMeth.getParameterTypes()); |
|
110 |
Method dmoMeth = aClass.getMethod(ifcMeth.getName(), ifcMeth.getParameterTypes()); |
|
111 | 111 |
methodMap.put(ifcMeth, dmoMeth); |
112 | 112 |
} |
113 | 113 |
} |
114 |
catch (ClassNotFoundException | NoSuchMethodException exc) |
|
114 |
catch (ClassNotFoundException exc) |
|
115 |
{ |
|
116 |
// not a fatal error; application does not use _trans table |
|
117 |
} |
|
118 |
catch (NoSuchMethodException exc) |
|
115 | 119 |
{ |
116 | 120 |
throw new RuntimeException("Error preparing MetaTrans implementation class", exc); |
117 | 121 |
} |
122 |
|
|
123 |
dmoClass = aClass; |
|
118 | 124 |
} |
119 | 125 |
|
120 | 126 |
/** Proxy object for the current metadata transaction DMO */ |