Package org.jpox.store.rdbms.sqlidentifier

Examples of org.jpox.store.rdbms.sqlidentifier.SQLIdentifier


                if (tableIdentifierTableName == null)
                {
                    throw new JPOXDataStoreException("Invalid 'null' table name identifier returned by database. Check with your JDBC driver vendor (ref:DatabaseMetaData.getColumns).");
                }

                SQLIdentifier fullyQualifiedTableName = (SQLIdentifier)identifierFactory.newDatastoreContainerIdentifier(tableIdentifierTableName);
                fullyQualifiedTableName.setCatalogName(tableIdentifierCatalogName);
                fullyQualifiedTableName.setSchemaName(tableIdentifierSchemaName);

                if (table_keys.contains(fullyQualifiedTableName))
                {
                    // Process this row if it is for one of our tables
                    List l = (List) cim.get(fullyQualifiedTableName);
View Full Code Here


        }

        String table = identifier.getIdentifier();
        table = JDBCUtils.getIdentifierNameStripped(table, dba);

        SQLIdentifier di = (SQLIdentifier)storeMgr.getIdentifierFactory().newDatastoreContainerIdentifier(table);
        di.setCatalogName(catalog);
        di.setSchemaName(schema);
        return di;
    }
View Full Code Here

            if (sequenceTable == null)
            {
                initialiseSequenceTable();
            }

            SQLIdentifier sourceTableIdentifier = null;
            if (properties.getProperty("table-name") != null)
            {
                sourceTableIdentifier = (SQLIdentifier)((MappedStoreManager)storeMgr).getIdentifierFactory().newDatastoreContainerIdentifier(properties.getProperty("table-name"));
                // TODO Apply passed in catalog/schema to this identifier rather than the default for the factory
            }
View Full Code Here

        }
        String tableName = (properties.getProperty("sequence-table-name") == null ?
                DEFAULT_TABLE_NAME : properties.getProperty("sequence-table-name"));

        MappedStoreManager storeMgr = (MappedStoreManager)this.storeMgr;
        SQLIdentifier identifier = (SQLIdentifier)storeMgr.getIdentifierFactory().newDatastoreContainerIdentifier(tableName);
        if (((RDBMSAdapter)storeMgr.getDatastoreAdapter()).supportsCatalogsInTableDefinitions() && catalogName != null)
        {
            identifier.setCatalogName(catalogName);
        }
        if (((RDBMSAdapter)storeMgr.getDatastoreAdapter()).supportsSchemasInTableDefinitions() && schemaName != null)
        {
            identifier.setSchemaName(schemaName);
        }

        DatastoreClass table = storeMgr.getDatastoreClass(identifier);
        if (table != null)
        {
View Full Code Here

                sequenceSchemaName = properties.getProperty("schema-name");
            }
            String sequenceName = properties.getProperty("sequence-name");
            RDBMSManager srm = (RDBMSManager)storeMgr;
            RDBMSIdentifierFactory idFactory = (RDBMSIdentifierFactory)srm.getIdentifierFactory();
            SQLIdentifier identifier = (SQLIdentifier)idFactory.newSequenceIdentifier(sequenceName);
            if (((RDBMSAdapter)srm.getDatastoreAdapter()).supportsCatalogsInTableDefinitions() && sequenceCatalogName != null)
            {
                identifier.setCatalogName(sequenceCatalogName);
            }
            if (((RDBMSAdapter)srm.getDatastoreAdapter()).supportsSchemasInTableDefinitions() && sequenceSchemaName != null)
            {
                identifier.setSchemaName(sequenceSchemaName);
            }
            this.sequenceName = identifier.getFullyQualifiedName(true);
        }
        return sequenceName;
    }
View Full Code Here

                                            break;
                                        }
                                    }
                                }

                                SQLIdentifier secTableIdentifier =
                                    (SQLIdentifier)storeMgr.getIdentifierFactory().newDatastoreContainerIdentifier(fmd.getTable());
                                // Use specified catalog, else take catalog of the owning table
                                String catalogName = fmd.getCatalog();
                                if (catalogName == null)
                                {
                                    catalogName = getCatalogName();
                                }
                                // Use specified schema, else take schema of the owning table
                                String schemaName = fmd.getSchema();
                                if (schemaName == null)
                                {
                                    schemaName = getSchemaName();
                                }
                                secTableIdentifier.setCatalogName(catalogName);
                                secTableIdentifier.setSchemaName(schemaName);

                                secTable = new SecondaryTable(secTableIdentifier, storeMgr, this, joinmd, clr);
                                secTable.preInitialize(clr);
                                secTable.initialize(clr);
                                secTable.postInitialize(clr);
View Full Code Here

TOP

Related Classes of org.jpox.store.rdbms.sqlidentifier.SQLIdentifier

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.