1 package ca.uhn.hl7v2.sourcegen;
2
3 public class DatatypeComponentDef extends DatatypeDef {
4
5 private final int table;
6 private final String parentType;
7 private final int indexWithinParent;
8
9 public DatatypeComponentDef(String theParentType, int theIndexWithinParent, String theType, String theName, int theTable) {
10 super(theType, theName);
11 parentType = theParentType;
12 indexWithinParent = theIndexWithinParent;
13 table = theTable;
14 }
15
16 public int getTable() {
17 return table;
18 }
19
20 public String getAccessorName() {
21 return SourceGenerator.makeAccessorName(getName(), parentType);
22 }
23
24 public String getAlternateAccessorName() {
25 return SourceGenerator.makeAlternateAccessorName(getName(), parentType, indexWithinParent + 1);
26 }
27
28
29 }