Class PriorityConfig


  • public class PriorityConfig
    extends java.lang.Object
    Class holding data source priority configuration for a Model.
    Author:
    Matthew Wakeling
    • Constructor Summary

      Constructors 
      Constructor Description
      PriorityConfig​(Model model)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<java.lang.String> getPriorities​(java.lang.Class<? extends FastPathObject> clazz, java.lang.String fieldName)
      Returns a List of data source names representing the priority for a given class and fieldname pair.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PriorityConfig

        public PriorityConfig​(Model model)
        Constructor.
        Parameters:
        model - the Model of the production database
        Throws:
        java.lang.IllegalArgumentException - if the priorities are misconfigured
    • Method Detail

      • getPriorities

        protected java.util.List<java.lang.String> getPriorities​(java.lang.Class<? extends FastPathObject> clazz,
                                                                 java.lang.String fieldName)
        Returns a List of data source names representing the priority for a given class and fieldname pair. This method searches all the parent classes for a priority config, and throws an exception if more than one is found. Results are cached for performance.
        Parameters:
        clazz - the class of the object being created
        fieldName - the name of the field that the priority is for
        Returns:
        a List of data source names
        Throws:
        java.lang.IllegalArgumentException - if more than one priority config matches