1 21 package oracle.toplink.essentials.internal.ejb.cmp3.xml.sequencing; 23 24 import org.w3c.dom.Node ; 25 26 import oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLHelper; 27 import oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLConstants; 28 29 import oracle.toplink.essentials.internal.ejb.cmp3.metadata.sequencing.MetadataSequenceGenerator; 30 31 37 public class XMLSequenceGenerator extends MetadataSequenceGenerator { 38 private Node m_node; 39 private XMLHelper m_helper; 40 41 44 public XMLSequenceGenerator(Node node, XMLHelper helper) { 45 super(helper.getDocumentName()); 46 47 m_node = node; 48 m_helper = helper; 49 } 50 51 54 public int getAllocationSize() { 55 return m_helper.getNodeValue(m_node, XMLConstants.ATT_ALLOCATION_SIZE, 50); 56 } 57 58 61 public int getInitialValue() { 62 return m_helper.getNodeValue(m_node, XMLConstants.ATT_INITIAL_VALUE, 0); 63 } 64 65 68 public String getName() { 69 return m_helper.getNodeValue(m_node, XMLConstants.ATT_NAME); 70 } 71 72 75 public String getSequenceName() { 76 return m_helper.getNodeValue(m_node, XMLConstants.ATT_SEQUENCE_NAME, getName()); 77 } 78 79 82 public boolean loadedFromAnnotations() { 83 return false; 84 } 85 86 89 public boolean loadedFromXML() { 90 return true; 91 } 92 } 93 | Popular Tags |