01: package com.completex.objective.persistency.examples.ex003a;
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 objectConfigPath = ExamplesHelper
15: .cpxConfigPath(GenCpxObjects.class);
16:
17: public static void main(String[] args) throws Exception,
18: SQLException, IllegalAccessException,
19: InstantiationException, ClassNotFoundException {
20: ExamplesHelper.resetDatabase();
21: GenCpxObjects gen = new GenCpxObjects();
22: gen.generateObjects();
23: }
24:
25: private void generateObjects() throws Exception {
26: CompositePoGenerator objectGenerator = new CompositePoGenerator();
27: PropertyMap objectProperties = PropertyMap
28: .toPropertyMap(objectGenerator
29: .extractProperties(GenCpxObjects.objectConfigPath));
30: objectGenerator.process(objectProperties);
31: }
32:
33: }
|