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