1 | |
package liquibase.statement.core; |
2 | |
|
3 | |
import liquibase.statement.AbstractSqlStatement; |
4 | |
|
5 | |
import java.util.Map; |
6 | |
import java.util.SortedMap; |
7 | |
import java.util.TreeMap; |
8 | |
|
9 | |
public class InsertStatement extends AbstractSqlStatement { |
10 | |
private String schemaName; |
11 | |
private String tableName; |
12 | 74 | private SortedMap<String, Object> columnValues = new TreeMap<String, Object>(); |
13 | |
|
14 | 74 | public InsertStatement(String schemaName, String tableName) { |
15 | 74 | this.schemaName = schemaName; |
16 | 74 | this.tableName = tableName; |
17 | 74 | } |
18 | |
|
19 | |
public String getSchemaName() { |
20 | 39 | return schemaName; |
21 | |
} |
22 | |
|
23 | |
public String getTableName() { |
24 | 39 | return tableName; |
25 | |
} |
26 | |
|
27 | |
public InsertStatement addColumnValue(String columnName, Object newValue) { |
28 | 57 | columnValues.put(columnName, newValue); |
29 | |
|
30 | 57 | return this; |
31 | |
} |
32 | |
|
33 | |
public Object getColumnValue(String columnName) { |
34 | 26 | return columnValues.get(columnName); |
35 | |
} |
36 | |
|
37 | |
public Map<String, Object> getColumnValues() { |
38 | 30 | return columnValues; |
39 | |
} |
40 | |
} |