1 package org.wamblee.support.persistence;
3 import java.util.ArrayList;
5 import java.util.ServiceLoader;
7 public class JpaCustomizerBuilder {
9 private static final ServiceLoader<JpaCustomizer> CUSTOMIZERS =
10 ServiceLoader.load(JpaCustomizer.class);
13 public static JpaCustomizer getCustomizer() {
14 List<JpaCustomizer> customizers = new ArrayList<JpaCustomizer>();
15 for (JpaCustomizer customizer: CUSTOMIZERS) {
16 customizers.add(customizer);
18 return new CompositeJpaCustomizer(customizers);