private TablePopulationRequirements getMVHandlerInfoMessage ( MaterializedViewHandlerInfo mvh ) { if ( ! mvh . getIssafewithnonemptysources ( ) ) { TablePopulationRequirements retval ; String viewName = mvh . getDesttable ( ) . getTypeName ( ) ; String errorMessage = createViewDisallowedMessage ( viewName , null ) ; retval = new TablePopulationRequirements ( viewName ) ; retval . setErrorMessage ( errorMessage ) ; for ( TableRef tref : mvh . getSourcetables ( ) ) { String tableName = tref . getTable ( ) . getTypeName ( ) ; retval . addTableName ( tableName ) ; } return retval ; } return null ; }
Check a MaterializedViewHandlerInfo object for safety . Return an object with table population requirements on the table for it to be allowed . The return object if it is non - null will have a set of names of tables one of which must be empty if the view can be created . It will also have an error message .