1 package org.andromda.maven.plugin.andromdapp.hibernate;
2
3 import java.io.File;
4 import java.util.List;
5 import java.util.Map;
6
7
8
9
10
11
12
13
14 public class HibernateCreateSchema
15 extends HibernateSchemaManagement
16 {
17 private static final String CREATE_OUTPUT_PATH = "createOutputPath";
18
19
20
21
22 protected void addArguments(
23 final Map options,
24 final List<String> arguments)
25 {
26 String outputPath = this.getRequiredProperty(
27 options,
28 CREATE_OUTPUT_PATH);
29 final File file = new File(outputPath);
30 final File parent = file.getParentFile();
31 if (parent != null)
32 {
33 parent.mkdirs();
34 }
35 arguments.add("--output=" + outputPath);
36 arguments.add("--text");
37 arguments.add("--quiet");
38 arguments.add("--create");
39 }
40
41
42
43
44 protected String getExecutionOuputPath(final Map options)
45 {
46 return this.getRequiredProperty(
47 options,
48 CREATE_OUTPUT_PATH);
49 }
50
51
52
53
54 protected String getExecutionClassName()
55 {
56 return "SchemaExport";
57 }
58 }