1 | public class JoinedSubclass extends Subclass implements TableOwner {↵ | | 1 | public class UnionSubclass extends Subclass implements TableOwner {↵
|
|
2 | private Table table;↵ | | 2 | private Table table;↵
|
3 | private KeyValue key;↵ | | 3 | private KeyValue key;↵
|
|
4 | public JoinedSubclass(PersistentClass superclass) {↵ | | 4 | public UnionSubclass(PersistentClass superclass) {↵
|
5 | super(superclass);↵ | | 5 | super(superclass);↵
|
6 | }↵ | | 6 | }↵
|
|
7 | public Table getTable() {↵ | | 7 | public Table getTable() {↵
|
8 | return table;↵ | | 8 | return table;↵
|
9 | }↵ | | 9 | }↵
|
|
10 | public void setTable(Table table) {↵ | | 10 | public void setTable(Table table) {↵
|
11 | this.table=table;↵ | | 11 | this.table = table;↵
|
12 | getSuperclass().addSubclassTable(table);↵ | | 12 | getSuperclass().addSubclassTable(table);↵
|
13 | }↵ | | 13 | }↵
|
|
14 | public KeyValue getKey() {↵ | | 14 | public ↵
|
15 | return key↵ | | 15 | java.util.Set getSynchronizedTables() {↵
|
16 | ;↵ | | 16 | return synchronizedTables;↵
|
17 | }↵ | | 17 | }↵
|
| | | 18 | ↵
|
18 | public void setKey(KeyValue key) {↵ | | 19 | p↵
|
19 | this.key = key↵ | | 20 | rotected Iterator getNonDuplicatedPropertyIterator() {↵
|
20 | ;↵ | | 21 | return getPropertyClosureIterator();↵
|
21 | }↵ | | 22 | }↵
|
|
22 | public void validate(Mapping mapping) throws MappingException {↵ | | 23 | public void validate(Mapping mapping) throws MappingException {↵
|
23 | super.validate(mapping);↵ | | 24 | super.validate(mapping);↵
|
24 | if ( key!=null && !key.isValid(mapping) ) {↵ | | 25 | if ( key!=null && !key.isValid(mapping) ) {↵
|
25 | throw new MappingException(↵ | | 26 | throw new MappingException(↵
|
26 | "subclass key mapping has wrong number of columns: " +↵ | | 27 | "subclass key mapping has wrong number of columns: " +↵
|
27 | getEntityName() +↵ | | 28 | getEntityName() +↵
|
28 | " type: " +↵ | | 29 | " type: " +↵
|
29 | key.getType().getName()↵ | | 30 | key.getType().getName()↵
|
30 | );↵ | | 31 | );↵
|
31 | }↵ | | 32 | }↵
|
32 | }↵ | | 33 | }↵
|
| | | 34 | ↵
|
33 | public Iterator getReferenceablePropertyIterator() {↵ | | 35 | public Table getIdentityTable() {↵
|
34 | return getPropertyIterator();↵ | | 36 | return getTable();↵
|
35 | }↵ | | 37 | }↵
|
36 | ↵ | | 38 | ↵
|
37 | public Object accept(PersistentClassVisitor mv) {↵ | | 39 | public Object accept(PersistentClassVisitor mv) {↵
|
38 | return mv.accept(this) | | 40 | return mv.accept(this)
|