01: package com.completex.objective.persistency.examples.ex003;
02:
03: import com.completex.objective.components.persistency.OdalPersistencyException;
04: import com.completex.objective.components.persistency.core.adapter.DefaultPersistencyAdapter;
05: import com.completex.objective.components.persistency.transact.Transaction;
06: import com.completex.objective.tools.generators.PersistentDescriptorGenerator;
07: import com.completex.objective.tools.generators.PersistentObjectGenerator;
08: import com.completex.objective.util.PropertyMap;
09: import com.completex.objective.persistency.examples.ExamplesHelper;
10:
11: import java.io.File;
12: import java.io.FileInputStream;
13: import java.io.IOException;
14: import java.sql.SQLException;
15: import java.util.Properties;
16:
17: /**
18: * @author Gennady Krizhevsky
19: */
20: public class GenObjects {
21:
22: public static String configPath = ExamplesHelper
23: .pdConfigPath(GenObjects.class);
24: public static String objectConfigPath = ExamplesHelper
25: .poConfigPath(GenObjects.class);
26:
27: public static void main(String[] args) throws Exception,
28: SQLException, IllegalAccessException,
29: InstantiationException, ClassNotFoundException {
30: ExamplesHelper.removeLock();
31: GenObjects gen = new GenObjects();
32: gen.generateObjects();
33: }
34:
35: private void generateObjects() throws Exception {
36: PersistentObjectGenerator objectGenerator = new PersistentObjectGenerator();
37: PropertyMap objectProperties = PropertyMap
38: .toPropertyMap(objectGenerator
39: .extractProperties(objectConfigPath));
40: objectGenerator.process(objectProperties);
41: }
42:
43: }
|