-
- All Implemented Interfaces:
-
tech.harmonysoft.oss.common.type.TypeManager
@Named() public final class DefaultLongTypeManager implements TypeManager<Long>
-
-
Field Summary
Fields Modifier and Type Field Description private final KClass<Long>targetTypeprivate final TypeManagerContexttargetContext
-
Constructor Summary
Constructors Constructor Description DefaultLongTypeManager()
-
Method Summary
Modifier and Type Method Description KClass<Long>getTargetType()Target data type covered by the current manager. TypeManagerContextgetTargetContext()Normally type managers are bound to particular type (targetType property). LongmaybeParse(String rawValue)Tries to parse value of the target type from its given string representation. -
-
Method Detail
-
getTargetType
KClass<Long> getTargetType()
Target data type covered by the current manager.
-
getTargetContext
TypeManagerContext getTargetContext()
Normally type managers are bound to particular type (targetType property). However, sometimes that is not enough. Consider, for example String - normally we use it as-is but for SQL context we want to parse values like
'value'asvalue(strip single quotes).So, normally all objects which implement this interface should have unique combination of targetType and this property
-
maybeParse
Long maybeParse(String rawValue)
Tries to parse value of the target type from its given string representation.
-
-
-
-