Class PropertyResolutionUtil
- java.lang.Object
-
- com.github.database.rider.junit5.util.PropertyResolutionUtil
-
public class PropertyResolutionUtil extends Object
Property Resolution Util Implementation.Implements a Property Resolution Process with the follow strategy:
Created by markus meisterernst on 24/11/18.
1. map that defines overriding persistence properties (if any)
2. runtime arguments
3. environment variables
-
-
Constructor Summary
Constructors Constructor Description PropertyResolutionUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getSystemJavaxPersistenceOverrides()Resolves a Union of System.env and System.getProperties() where the KeyValue-Pairs of the later have precedence.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.
-
-
-
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
-
-