private Styles getStyles ( long featureId , StyleMappingDao mappingDao ) { Styles styles = null ; if ( mappingDao != null ) { StyleDao styleDao = getStyleDao ( ) ; if ( styleDao != null ) { List < StyleMappingRow > styleMappingRows = mappingDao . queryByBaseFeatureId ( featureId ) ; if ( ! styleMappingRows . isEmpty ( ) ) { for ( StyleMappingRow styleMappingRow : styleMappingRows ) { StyleRow styleRow = styleDao . queryForRow ( styleMappingRow ) ; if ( styleRow != null ) { if ( styles == null ) { styles = new Styles ( ) ; } styles . setStyle ( styleRow , styleMappingRow . getGeometryType ( ) ) ; } } } } } return styles ; }
Get the styles for feature id from the style mapping dao