KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > internal > ejb > cmp3 > xml > tables > XMLSecondaryTable


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2006, Oracle. All rights reserved.
22
package oracle.toplink.essentials.internal.ejb.cmp3.xml.tables;
23
24 import org.w3c.dom.Node JavaDoc;
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.xml.columns.XMLPrimaryKeyJoinColumns;
30
31 import oracle.toplink.essentials.internal.ejb.cmp3.metadata.tables.MetadataSecondaryTable;
32
33 /**
34  * Object to hold onto an XML secondary table metadata in a TopLink database
35  * table.
36  *
37  * @author Guy Pelletier
38  * @since TopLink EJB 3.0 Reference Implementation
39  */

40 public class XMLSecondaryTable extends MetadataSecondaryTable {
41     private Node JavaDoc m_node;
42     private XMLHelper m_helper;
43     
44     /**
45      * INTERNAL:
46      */

47     public XMLSecondaryTable(Node JavaDoc node, XMLHelper helper) {
48         m_helper = helper;
49         m_name = m_helper.getNodeValue(node, XMLConstants.ATT_NAME);
50         m_schema = m_helper.getNodeValue(node, XMLConstants.ATT_SCHEMA);
51         m_catalog = m_helper.getNodeValue(node, XMLConstants.ATT_CATALOG);
52         
53         processName();
54         XMLTableHelper.processUniqueConstraints(node, helper, m_databaseTable);
55     }
56     
57     /**
58      * INTERNAL: (OVERRIDE)
59      */

60     protected void processPrimaryKeyJoinColumns(String JavaDoc sourceTableName) {
61         m_primaryKeyJoinColumns = new XMLPrimaryKeyJoinColumns(m_node, m_helper, sourceTableName, m_databaseTable.getQualifiedName());
62     }
63 }
64
Popular Tags