code: public static IPersistenceStore getPersistenceStore(ResourcePatternResolver resolver, String className) throws Exception {
          Class<?> persistenceClass = Class.forName(className);
          Constructor<?> constructor = getPersistenceStoreConstructor(persistenceClass, resolver.getClass().getInterfaces());
          if (constructor == null) {
              // Search in superclasses of the object.
              Class<?> superClass = resolver.getClass().getSuperclass();
              while (superClass != null) {
                  constructor = getPersistenceStoreConstructor(persistenceClass, superClass.getInterfaces());
                  if (constructor != null) {
                      break;
                  }
                  superClass = superClass.getSuperclass();
              }
          }
          if (constructor == null) {
              throw new NoSuchMethodException();
          }
          return (IPersistenceStore) constructor.newInstance(new Object[] { resolver });
      }
docs: Returns persistence store object. Persistence store is a special object that stores persistence objects and provides methods to manipulate them (save, load, remove, list).
  
  @param resolver
  Resolves connection pattern into Resource object
  @param className
  Name of persistence class
  @return IPersistence store object that provides methods for persistence object handling
  @throws Exception
  if error