Package org.datanucleus.store.rdbms.schema

Examples of org.datanucleus.store.rdbms.schema.PrimaryKeyInfo


                new Object[] {this});
            IdentifierFactory idFactory = storeMgr.getIdentifierFactory();
            Iterator pkColsIter = tablePkInfo.getChildren().iterator();
            while (pkColsIter.hasNext())
            {
                PrimaryKeyInfo pkInfo = (PrimaryKeyInfo)pkColsIter.next();
                String pkName = (String)pkInfo.getProperty("pk_name");
                DatastoreIdentifier pkIdentifier;
   
                if (pkName == null)
                {
                    pkIdentifier = idFactory.newPrimaryKeyIdentifier(this);
                }
                else
                {
                    pkIdentifier = idFactory.newIdentifier(IdentifierType.COLUMN, pkName);
                }
   
                PrimaryKey pk = (PrimaryKey) primaryKeysByName.get(pkIdentifier);
                if (pk == null)
                {
                    pk = new PrimaryKey(this);
                    pk.setName(pkIdentifier.getIdentifierName());
                    primaryKeysByName.put(pkIdentifier, pk);
                }
   
                int keySeq = (((Short)pkInfo.getProperty("key_seq")).shortValue()) - 1;
                String colName = (String)pkInfo.getProperty("column_name");
                DatastoreIdentifier colIdentifier = idFactory.newIdentifier(IdentifierType.COLUMN, colName);
                Column col = columnsByName.get(colIdentifier);
   
                if (col == null)
                {
View Full Code Here

TOP

Related Classes of org.datanucleus.store.rdbms.schema.PrimaryKeyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.