private long getOrInsertStyle ( StyleRow style ) { long styleId ; if ( style . hasId ( ) ) { styleId = style . getId ( ) ; } else { StyleDao styleDao = getStyleDao ( ) ; styleId = styleDao . create ( style ) ; } return styleId ; }
Get the style id either from the existing style or by inserting a new one