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