private Relation < ? > addNewRelation ( SimpleTypeInformation < ? > meta ) { @ SuppressWarnings ( "unchecked" ) SimpleTypeInformation < Object > ometa = ( SimpleTypeInformation < Object > ) meta ; Relation < ? > relation = new MaterializedRelation <> ( ometa , ids ) ; relations . add ( relation ) ; getHierarchy ( ) . add ( this , relation ) ; // Try to add indexes where appropriate for ( IndexFactory < ? > factory : indexFactories ) { if ( factory . getInputTypeRestriction ( ) . isAssignableFromType ( meta ) ) { @ SuppressWarnings ( "unchecked" ) final IndexFactory < Object > ofact = ( IndexFactory < Object > ) factory ; @ SuppressWarnings ( "unchecked" ) final Relation < Object > orep = ( Relation < Object > ) relation ; Index index = ofact . instantiate ( orep ) ; index . initialize ( ) ; getHierarchy ( ) . add ( relation , index ) ; } } return relation ; }
Add a new representation for the given meta .