コード例 #1
0
 /**
  * Checks if a given persistence configuration entry has a certain strategy for the given service
  *
  * @param serviceName the service to check the configuration for
  * @param config the persistence configuration entry
  * @param strategy the strategy to check for
  * @return true, if it has the given strategy
  */
 protected boolean hasStrategy(
     String serviceName, PersistenceConfiguration config, Strategy strategy) {
   if (defaultStrategies.get(serviceName).contains(strategy) && config.getStrategies().isEmpty()) {
     return true;
   } else {
     for (Strategy s : config.getStrategies()) {
       if (s.equals(strategy)) {
         return true;
       }
     }
     return false;
   }
 }