private long getOrInsertIcon ( IconRow icon ) { long iconId ; if ( icon . hasId ( ) ) { iconId = icon . getId ( ) ; } else { IconDao iconDao = getIconDao ( ) ; iconId = iconDao . create ( icon ) ; } return iconId ; }
Get the icon id either from the existing icon or by inserting a new one