Examples of cacheName()


Examples of javax.cache.annotation.CacheRemoveAll.cacheName()

            }

         } else if (method.isAnnotationPresent(CacheRemoveAll.class)) {
            final CacheRemoveAll cacheRemoveAllAnnotation = method.getAnnotation(CacheRemoveAll.class);
            cacheKeyGenerator = null;
            cacheName = getCacheName(method, cacheRemoveAllAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveAllAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveAllMethodWithoutCacheName(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheRemoveEntry.cacheName()

            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemoveEntry.class)) {
            final CacheRemoveEntry cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemoveEntry.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheRemoveEntryAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheRemoveEntryAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveEntryAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveEntryMethodWithoutCacheName(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheRemoveEntry.cacheName()

            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemoveEntry.class)) {
            final CacheRemoveEntry cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemoveEntry.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheRemoveEntryAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheRemoveEntryAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveEntryAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveEntryMethodWithoutCacheName(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

         final CacheDefaults cacheDefaultsAnnotation = method.getDeclaringClass().getAnnotation(CacheDefaults.class);

         if (method.isAnnotationPresent(CacheResult.class)) {
            final CacheResult cacheResultAnnotation = method.getAnnotation(CacheResult.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheResultAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheResultAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemoveEntry.class)) {
            final CacheRemoveEntry cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemoveEntry.class);
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

         final CacheDefaults cacheDefaultsAnnotation = method.getDeclaringClass().getAnnotation(CacheDefaults.class);

         if (method.isAnnotationPresent(CacheResult.class)) {
            final CacheResult cacheResultAnnotation = method.getAnnotation(CacheResult.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheResultAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheResultAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemove.class)) {
            final CacheRemove cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemove.class);
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

         final CacheDefaults cacheDefaultsAnnotation = method.getDeclaringClass().getAnnotation(CacheDefaults.class);

         if (method.isAnnotationPresent(CacheResult.class)) {
            final CacheResult cacheResultAnnotation = method.getAnnotation(CacheResult.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheResultAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheResultAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemoveEntry.class)) {
            final CacheRemoveEntry cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemoveEntry.class);
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

   }

   public void testGetCacheNameWithMethodCacheNameWithoutDefaultAnnotation() throws Exception {
      final Method barMethod = Foo.class.getMethod("barMethod");
      final CacheResult cacheResultAnnotation = barMethod.getAnnotation(CacheResult.class);
      final String cacheName = getCacheName(barMethod, cacheResultAnnotation.cacheName(), null, false);

      assertEquals(cacheName, "bar-cache");
   }

   public void testGetCacheNameWithoutMethodCacheNameWithoutDefaultAnnotation() throws Exception {
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

   }

   public void testGetCacheNameWithoutMethodCacheNameWithoutDefaultAnnotation() throws Exception {
      final Method fooMethod = Foo.class.getMethod("fooMethod", String.class, String.class);
      final CacheResult cacheResultAnnotation = fooMethod.getAnnotation(CacheResult.class);
      final String cacheName = getCacheName(fooMethod, cacheResultAnnotation.cacheName(), null, false);

      assertEquals(cacheName, "");
   }

   public void testGetCacheNameWithoutMethodCacheNameWithoutDefaultAndGenerate() throws Exception {
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

   }

   public void testGetCacheNameWithoutMethodCacheNameWithoutDefaultAndGenerate() throws Exception {
      final Method fooMethod = Foo.class.getMethod("fooMethod", String.class, String.class);
      final CacheResult cacheResultAnnotation = fooMethod.getAnnotation(CacheResult.class);
      final String cacheName = getCacheName(fooMethod, cacheResultAnnotation.cacheName(), null, true);

      assertEquals(cacheName, Foo.class.getName() + ".fooMethod(java.lang.String,java.lang.String)");
   }

   public void testGetCacheNameWithoutMethodCacheNameAndDefault() throws Exception {
View Full Code Here

Examples of javax.cache.annotation.CacheResult.cacheName()

   public void testGetCacheNameWithoutMethodCacheNameAndDefault() throws Exception {
      final Method fooMethod = Foo.class.getMethod("fooMethod", String.class, String.class);
      final CacheResult cacheResultAnnotation = fooMethod.getAnnotation(CacheResult.class);
      final CacheDefaults cacheDefaultsAnnotation = Foo.class.getAnnotation(CacheDefaults.class);
      final String cacheName = getCacheName(fooMethod, cacheResultAnnotation.cacheName(), cacheDefaultsAnnotation, false);

      assertEquals(cacheName, "default-cache");
   }

   public void testGetCacheNameWithMethodCacheNameAndDefault() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.