Class PropertyResolutionUtil


  • public class PropertyResolutionUtil
    extends Object
    Property Resolution Util Implementation.

    Implements a Property Resolution Process with the follow strategy:

    1. map that defines overriding persistence properties (if any)
    2. runtime arguments
    3. environment variables

    Created by markus meisterernst on 24/11/18.
    • Constructor Detail

      • PropertyResolutionUtil

        public PropertyResolutionUtil()
    • Method Detail

      • getSystemJavaxPersistenceOverrides

        public Map<String,​String> getSystemJavaxPersistenceOverrides()
        Resolves a Union of System.env and System.getProperties() where the KeyValue-Pairs of the later have precedence.
        Returns:
        Map or null if none of the following Properties exists: javax.persistence.jdbc.driver,javax.persistence.jdbc.url, javax.persistence.jdbc.user, javax.persistence.jdbc.password
      • persistencePropertiesOverrides

        public Map<String,​String> persistencePropertiesOverrides​(Map<String,​String> overridingProperties)
        Resolves a Union of System.env and System.getProperties() and overridingProperties where the KeyValue-Pairs of the later have the highest precedence.
        Parameters:
        overridingProperties - overridingProperties
        Returns:
        Map or null if there are no entries that match the Persistence Filter PROP_FILTER