本文整理了Java中org.hibernate.mapping.Table.isPhysicalTable()
方法的一些代码示例,展示了Table.isPhysicalTable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isPhysicalTable()
方法的具体详情如下:
包路径:org.hibernate.mapping.Table
类名称:Table
方法名:isPhysicalTable
暂无
代码示例来源:origin: hibernate/hibernate-orm
public boolean isPhysicalConstraint() {
return referencedTable.isPhysicalTable()
&& getTable().isPhysicalTable()
&& !referencedTable.hasDenormalizedTables();
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected void validateTables(
Metadata metadata,
DatabaseInformation databaseInformation,
ExecutionOptions options,
Dialect dialect,
Namespace namespace) {
for ( Table table : namespace.getTables() ) {
if ( schemaFilter.includeTable( table ) && table.isPhysicalTable() ) {
final TableInformation tableInformation = databaseInformation.getTableInformation(
table.getQualifiedTableName()
);
validateTable( table, tableInformation, metadata, options, dialect );
}
}
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected void validateTables(
Metadata metadata,
DatabaseInformation databaseInformation,
ExecutionOptions options,
Dialect dialect, Namespace namespace) {
final NameSpaceTablesInformation tables = databaseInformation.getTablesInformation( namespace );
for ( Table table : namespace.getTables() ) {
if ( schemaFilter.includeTable( table ) && table.isPhysicalTable() ) {
validateTable(
table,
tables.getTableInformation( table ),
metadata,
options,
dialect
);
}
}
}
}
代码示例来源:origin: hibernate/hibernate-orm
private void applyConstraintDropping(
Namespace namespace,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) {
final Dialect dialect = metadata.getDatabase().getJdbcEnvironment().getDialect();
if ( !dialect.dropConstraints() ) {
return;
}
for ( Table table : namespace.getTables() ) {
if ( !table.isPhysicalTable() ) {
continue;
}
if ( !schemaFilter.includeTable( table ) ) {
continue;
}
final Iterator fks = table.getForeignKeyIterator();
while ( fks.hasNext() ) {
final ForeignKey foreignKey = (ForeignKey) fks.next();
applySqlStrings(
dialect.getForeignKeyExporter().getSqlDropStrings( foreignKey, metadata ),
formatter,
options,
targets
);
}
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testAbstractTableExistence() {
for ( Table table : metadata().collectTableMappings() ) {
if ( "AbstractEntity_AUD".equals( table.getName() ) ) {
Assert.assertFalse( table.isPhysicalTable() );
return;
}
}
Assert.fail();
}
}
代码示例来源:origin: hibernate/hibernate-orm
);
for ( Table table : namespace.getTables() ) {
if ( schemaFilter.includeTable( table ) && table.isPhysicalTable() ) {
checkExportIdentifier( table, exportIdentifiers );
final TableInformation tableInformation = existingDatabase.getTableInformation( table.getQualifiedTableName() );
if ( schemaFilter.includeTable( table ) && table.isPhysicalTable() ) {
final TableInformation tableInformation = tablesInformation.getTableInformation( table );
if ( tableInformation == null || ( tableInformation != null && tableInformation.isPhysicalTable() ) ) {
代码示例来源:origin: hibernate/hibernate-orm
final NameSpaceTablesInformation tables = existingDatabase.getTablesInformation( namespace );
for ( Table table : namespace.getTables() ) {
if ( schemaFilter.includeTable( table ) && table.isPhysicalTable() ) {
checkExportIdentifier( table, exportIdentifiers );
final TableInformation tableInformation = tables.getTableInformation( table );
if ( schemaFilter.includeTable( table ) && table.isPhysicalTable() ) {
final TableInformation tableInformation = tablesInformation.getTableInformation( table );
if ( tableInformation == null || ( tableInformation != null && tableInformation.isPhysicalTable() ) ) {
代码示例来源:origin: hibernate/hibernate-orm
if ( !table.isPhysicalTable() ){
continue;
if ( !table.isPhysicalTable() ){
continue;
代码示例来源:origin: hibernate/hibernate-orm
if ( !table.isPhysicalTable() ) {
continue;
代码示例来源:origin: org.hibernate.orm/hibernate-core
@Override
public boolean isExportable() {
return isPhysicalTable();
}
代码示例来源:origin: hibernate/hibernate
public boolean isPhysicalConstraint() {
return referencedTable.isPhysicalTable() &&
getTable().isPhysicalTable() &&
!referencedTable.hasDenormalizedTables();
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public boolean isPhysicalConstraint() {
return referencedTable.isPhysicalTable() &&
getTable().isPhysicalTable() &&
!referencedTable.hasDenormalizedTables();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public boolean isPhysicalConstraint() {
return referencedTable.isPhysicalTable() &&
getTable().isPhysicalTable() &&
!referencedTable.hasDenormalizedTables();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public boolean isPhysicalConstraint() {
return referencedTable.isPhysicalTable() &&
getTable().isPhysicalTable() &&
!referencedTable.hasDenormalizedTables();
}
代码示例来源:origin: org.jbpm.jbpm3/jbpm-jpdl
public Set getJbpmTables() {
Set jbpmTables = new HashSet();
for (Iterator i = configuration.getTableMappings(); i.hasNext();) {
Table table = (Table) i.next();
if (table.isPhysicalTable()) {
jbpmTables.add(table.getName());
}
}
return jbpmTables;
}
代码示例来源:origin: org.n52.sensorweb.sos/hibernate-datasource-common
/**
* Create quoted string with schema.table
* @param settings Datasource settings
* @param conn SQL connection
* @return {@link List} with table names
* @throws SQLException If an error occurs while checking catalog/schema
*/
protected List<String> getQuotedSchemaTableNames(Map<String, Object> settings, Connection conn) throws SQLException {
String catalog = checkCatalog(conn);
String schema = checkSchema((String) settings.get(SCHEMA_KEY), catalog, conn);
CustomConfiguration config = getConfig(settings);
Iterator<Table> tables = getMetadata(conn, settings).collectTableMappings().iterator();
List<String> names = new LinkedList<String>();
while (tables.hasNext()) {
Table table = tables.next();
if (table.isPhysicalTable()) {
names.add(table.getQualifiedName(getDialectInternal(), catalog, schema));
}
}
return names;
}
代码示例来源:origin: hibernate/hibernate-ogm
private void validateIndexSpecs(SchemaDefinitionContext context) {
Database database = context.getDatabase();
for ( Namespace namespace : database.getNamespaces() ) {
for ( Table table : namespace.getTables() ) {
if ( table.isPhysicalTable() ) {
Label label = label( table.getName() );
Iterator<Index> indexIterator = table.getIndexIterator();
while ( indexIterator.hasNext() ) {
addIndex( label, indexIterator.next() );
}
}
}
}
}
代码示例来源:origin: 52North/SOS
@Override
public boolean checkIfSchemaExists(Map<String, Object> settings) {
Connection conn = null;
try {
/* check if any of the needed tables is existing */
conn = openConnection(settings);
Metadata metadata = getMetadata(conn, settings);
Iterator<Table> iter = metadata.collectTableMappings().iterator();
String catalog = checkCatalog(conn);
String schema = checkSchema((String) settings.get(SCHEMA_KEY), catalog, conn);
Set<String> tableNames = getTableNames(conn, catalog, schema);
while (iter.hasNext()) {
Table table = iter.next();
if (table.isPhysicalTable() && tableNames.contains(table.getName())) {
return true;
}
}
return false;
} catch (SQLException ex) {
throw new ConfigurationError(ex);
} finally {
close(conn);
}
}
代码示例来源:origin: jhipster/jhipster-loaded
@Override
protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException {
if (!snapshot.getSnapshotControl().shouldInclude(Table.class)) {
return;
}
if (foundObject instanceof Schema) {
Schema schema = (Schema) foundObject;
HibernateDatabase database = (HibernateDatabase) snapshot.getDatabase();
Configuration cfg = database.getConfiguration();
Iterator<org.hibernate.mapping.Table> tableMappings = cfg.getTableMappings();
while (tableMappings.hasNext()) {
org.hibernate.mapping.Table hibernateTable = tableMappings.next();
if (hibernateTable.isPhysicalTable()) {
Table table = new Table().setName(hibernateTable.getName());
table.setSchema(schema);
LOG.info("Found table " + table.getName());
schema.addDatabaseObject(table);
}
}
}
}
}
代码示例来源:origin: org.hibernate.ogm/hibernate-ogm-cassandra
@Override
public void initializeSchema(SchemaDefinitionContext context) {
CassandraDatastoreProvider datastoreProvider = (CassandraDatastoreProvider) context.getSessionFactory().getServiceRegistry()
.getService( DatastoreProvider.class );
for ( IdSourceKeyMetadata iddSourceKeyMetadata : context.getAllIdSourceKeyMetadata() ) {
CassandraSequenceHandler sequenceHandler = datastoreProvider.getSequenceHandler();
sequenceHandler.createSequence( iddSourceKeyMetadata, datastoreProvider );
}
for ( Namespace namespace : context.getDatabase().getNamespaces() ) {
for ( Table table : namespace.getTables() ) {
if ( table.isPhysicalTable() ) {
processTable( context.getSessionFactory(), datastoreProvider, table );
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!