01: package com.completex.objective.persistency.examples.ex004a;
02:
03: import com.completex.objective.persistency.examples.ExamplesHelper;
04: import com.completex.objective.tools.generators.CompositePoGenerator;
05: import com.completex.objective.util.PropertyMap;
06:
07: import java.sql.SQLException;
08:
09: /**
10: * @author Gennady Krizhevsky
11: */
12: public class GenCpxObjects {
13:
14: // public static String configPath = GenDescriptors.configPath;
15: // public static String objectConfigPath = "examples/src/config/cpx-pesistent-object-004.sdl";
16: public static String objectConfigPath = ExamplesHelper
17: .cpxConfigPath(GenCpxObjects.class);
18:
19: public static void main(String[] args) throws Exception,
20: SQLException, IllegalAccessException,
21: InstantiationException, ClassNotFoundException {
22: ExamplesHelper.resetDatabase();
23: GenCpxObjects gen = new GenCpxObjects();
24: gen.generateObjects();
25: }
26:
27: private void generateObjects() throws Exception {
28: CompositePoGenerator objectGenerator = new CompositePoGenerator();
29: PropertyMap objectProperties = PropertyMap
30: .toPropertyMap(objectGenerator
31: .extractProperties(GenCpxObjects.objectConfigPath));
32: objectGenerator.process(objectProperties);
33: }
34:
35: }
|