Package org.springframework.data.gemfire
Class RegionShortcutConverter
java.lang.Object
org.springframework.data.gemfire.RegionShortcutConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<String,
org.apache.geode.cache.RegionShortcut>
public class RegionShortcutConverter
extends Object
implements org.springframework.core.convert.converter.Converter<String,org.apache.geode.cache.RegionShortcut>
The RegionShortcutConverter class is a Spring Converter implementation converting String value Region Shortcut
representations into actual GemFire RegionShortcut enumerated values.
- Since:
- 1.3.4
- See Also:
-
Converter
RegionShortcut
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.geode.cache.RegionShortcut
Converts the source String representation of a Region Shortcut into a RegionShortcut enumerated value.protected static String
toUpperCase
(String value) Converts the String value to upper case, trimming all whitespace.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
RegionShortcutConverter
public RegionShortcutConverter()
-
-
Method Details
-
toUpperCase
Converts the String value to upper case, trimming all whitespace. This method guards against null values and returns the "null" String if value is null.- Parameters:
value
- the String to convert to a trimmed, upper case value.- Returns:
- a trimmed, upper case value of the specified String, or "null" if the String value reference is null.
- See Also:
-
convert
Converts the source String representation of a Region Shortcut into a RegionShortcut enumerated value.- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<String,
org.apache.geode.cache.RegionShortcut> - Parameters:
source
- the String representation of the Region Shortcut to convert.- Returns:
- a RegionShortcut enumerated value for the String representation.
- Throws:
IllegalArgumentException
- if the String source is not a valid RegionShortcut enumerated value.- See Also:
-
RegionShortcut.valueOf(String)
-