public DatabaseSnapshot createSnapshot ( DatabaseObject [ ] examples , Database database , SnapshotControl snapshotControl ) throws DatabaseException , InvalidExampleException { DatabaseConnection conn = database . getConnection ( ) ; if ( conn == null ) { return new EmptyDatabaseSnapshot ( database , snapshotControl ) ; } if ( conn instanceof OfflineConnection ) { DatabaseSnapshot snapshot = ( ( OfflineConnection ) conn ) . getSnapshot ( examples ) ; if ( snapshot == null ) { throw new DatabaseException ( "No snapshotFile parameter specified for offline database" ) ; } return snapshot ; } return new JdbcDatabaseSnapshot ( examples , database , snapshotControl ) ; }
Creates a database snapshot for a given array of DatabaseObjects