RecordMethodCache.java

  1. package com.gh.mygreen.xlsmapper.fieldprocessor;

  2. import java.lang.reflect.Method;
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. import java.util.Optional;

  6. /**
  7.  * レコードクラスのコールバック用のメソッドを保持する。
  8.  *
  9.  *
  10.  * @since 2.0
  11.  * @author T.TSUCHIE
  12.  *
  13.  */
  14. public class RecordMethodCache {

  15.     /**
  16.      * レコードの値を無視するかどうかのメソッド
  17.      */
  18.     Optional<Method> ignoreableMethod = Optional.empty();

  19.     /**
  20.      * リスナークラスのオブジェクト、メソッド
  21.      */
  22.     List<ListenerClassCache> lisnterClasses = new ArrayList<>();

  23.     /**
  24.      * レコードクラスに定義された PreLoad用のメソッド
  25.      */
  26.     List<Method> preLoadMethods = new ArrayList<>();

  27.     /**
  28.      * レコードクラスに定義された PostLoad用のメソッド
  29.      */
  30.     List<Method> postLoadMethods = new ArrayList<>();

  31.     /**
  32.      * レコードクラスに定義された PreSave用のメソッド
  33.      */
  34.     List<Method> preSaveMethods = new ArrayList<>();

  35.     /**
  36.      * レコードクラスに定義された PostSave用のメソッド
  37.      */
  38.     List<Method> postSaveMethods = new ArrayList<>();

  39.     public Optional<Method> getIgnoreableMethod() {
  40.         return ignoreableMethod;
  41.     }

  42.     public List<ListenerClassCache> getListenerClasses() {
  43.         return lisnterClasses;
  44.     }

  45.     public List<Method> getPreLoadMethods() {
  46.         return preLoadMethods;
  47.     }

  48.     public List<Method> getPostLoadMethods() {
  49.         return postLoadMethods;
  50.     }

  51.     public List<Method> getPreSaveMethods() {
  52.         return preSaveMethods;
  53.     }

  54.     public List<Method> getPostSaveMethods() {
  55.         return postSaveMethods;
  56.     }

  57. }