static boolean isPersistedInPostgreSql ( EntityType entityType ) { String backend = entityType . getBackend ( ) ; if ( backend == null ) { // TODO remove this check after getBackend always returns the backend if ( null != getApplicationContext ( ) ) { DataService dataService = getApplicationContext ( ) . getBean ( DataService . class ) ; backend = dataService . getMeta ( ) . getDefaultBackend ( ) . getName ( ) ; } else { // A workaround for the integration tests. getApplicationContext() should not be null return true ; } } return backend . equals ( PostgreSqlRepositoryCollection . POSTGRESQL ) ; }
Returns whether the given entity is persisted in PostgreSQL