public static double getLimitByUserAndCounter ( EntityManager em , PrincipalUser user , PolicyCounter counter ) { PolicyLimit pLimit = findPolicyLimitByUserAndCounter ( em , user , counter ) ; if ( pLimit != null ) { return pLimit . getLimit ( ) ; } return counter . getDefaultValue ( ) ; }
Retrieves the limit for a given user - counter combination .