public static UoM getUoM ( final Long _uoMId ) { final Cache < Long , UoM > cache = InfinispanCache . get ( ) . < Long , UoM > getCache ( Dimension . IDCACHE4UOM ) ; if ( ! cache . containsKey ( _uoMId ) ) { try { Dimension . getUoMFromDB ( Dimension . SQL_SELECT_UOM4ID , _uoMId ) ; } catch ( final CacheReloadException e ) { Dimension . LOG . error ( "read UoM from DB failed for id: '{}'" , _uoMId ) ; } } return cache . get ( _uoMId ) ; }
Static Method to get an UoM for an id .