Class StringBasedErpType<T extends StringBasedErpType<T>>
java.lang.Object
com.sap.cloud.sdk.s4hana.serialization.StringBasedErpType<T>
- Type Parameters:
T
- The type implementing this abstract class.
- All Implemented Interfaces:
ErpType<T>
,StringRepresentableKey
,Serializable
,Comparable<T>
- Direct Known Subclasses:
DistributionChannel
,SapClient
@Deprecated
public abstract class StringBasedErpType<T extends StringBasedErpType<T>>
extends Object
implements ErpType<T>, Comparable<T>, StringRepresentableKey
Deprecated.
This module will be discontinued, along with its classes and methods.
Base class for string-based ERP types.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Deprecated.The casing of the contained value to be used by aStringBasedErpType
.static enum
Deprecated.The strategy to be used to fill the String representation of aStringBasedErpType
to the length specified bygetMaxLength()
. -
Constructor Summary
ConstructorsConstructorDescriptionStringBasedErpType
(String value) Deprecated.Constructs a new string-based type.StringBasedErpType
(String value, StringBasedErpType.CharCasing charCasing) Deprecated.Constructs a new string-based type with a certain character casing and the english locale.StringBasedErpType
(String value, StringBasedErpType.CharCasing charCasing, Locale locale) Deprecated.Constructs a new string-based type with a certain character casing and the given locale. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Deprecated.int
Deprecated.boolean
Deprecated.char
Deprecated.Returns the character that is used to add or strip fill characters.abstract StringBasedErpType.FillCharStrategy
Deprecated.Returns the strategy of how the type should handle fill characters.Deprecated.Returns the String representation of this key.abstract int
Deprecated.Returns the maximum length of the string-based ERP type.getType()
Deprecated.Returns the class of the string-based ERP type.getValue()
Deprecated.int
hashCode()
Deprecated.final boolean
Deprecated.Returns whether this instance represents the default value.final boolean
isEmpty()
Deprecated.Returns whether this string-based ERP type is empty.final String
toString()
Deprecated.final String
toString
(StringBasedErpType.FillCharStrategy strategy, char fillChar) Deprecated.Returns this value, filled according to the givenFillCharStrategy
with the give fillChar.static <T extends StringBasedErpType<T>>
Function<T,String> transformToString
(ErpTypeConverter<T> converter) Deprecated.Creates a function which transforms a givenStringBasedErpType
to its String representation.static <T extends StringBasedErpType<T>>
Function<String,T> transformToType
(ErpTypeConverter<T> converter) Deprecated.Creates a function which transforms a given String to itsStringBasedErpType
representation.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sap.cloud.sdk.s4hana.serialization.ErpType
getTypeConverter
-
Constructor Details
-
StringBasedErpType
Deprecated.Constructs a new string-based type.- Parameters:
value
- The value of the type (notnull
). The given string is trimmed. An empty or trimmed empty value results in an empty instance of the string-based type.- Throws:
IllegalArgumentException
- If the given value cannot be converted to an instance of this type, or the given parameter is null.
-
StringBasedErpType
public StringBasedErpType(@Nullable String value, @Nullable StringBasedErpType.CharCasing charCasing) throws IllegalArgumentException Deprecated.Constructs a new string-based type with a certain character casing and the english locale.- Parameters:
value
- The value of the type (notnull
). The given string is trimmed. An empty or trimmed empty value results in an empty instance of the string-based type.charCasing
- Defines the casing of characters within the string.- Throws:
IllegalArgumentException
- If the given value cannot be converted to an instance of this type, or any of the given parameter isnull
.
-
StringBasedErpType
public StringBasedErpType(@Nullable String value, @Nullable StringBasedErpType.CharCasing charCasing, @Nullable Locale locale) throws IllegalArgumentException Deprecated.Constructs a new string-based type with a certain character casing and the given locale.- Parameters:
value
- The value of the type (notnull
). The given string is trimmed. An empty or trimmed empty value results in an empty instance of the string-based type.charCasing
- Defines the casing of characters within the string.locale
- The locale to be used to change the casing ofvalue
.- Throws:
IllegalArgumentException
- If the given value cannot be converted to an instance of this type, or any of the given parameter isnull
.
-
-
Method Details
-
getType
Deprecated.Returns the class of the string-based ERP type.- Returns:
- The class of the string-based ERP type.
-
getMaxLength
public abstract int getMaxLength()Deprecated.Returns the maximum length of the string-based ERP type.- Returns:
- The maximum length of the string-based ERP type.
-
getFillCharStrategy
Deprecated.Returns the strategy of how the type should handle fill characters.- Returns:
- The strategy of how the type should handle fill characters.
-
getFillChar
public char getFillChar()Deprecated.Returns the character that is used to add or strip fill characters.- Returns:
- The character that is used to add or strip fill characters.
-
isEmpty
public final boolean isEmpty()Deprecated.Returns whether this string-based ERP type is empty.- Returns:
true
if the contained string value is empty,false
otherwise.
-
isDefault
public final boolean isDefault()Deprecated.Returns whether this instance represents the default value.- Returns:
true
if this instance represents the defaultSapClient.DEFAULT
,false
otherwise.
-
toString
Deprecated. -
toString
@Nonnull public final String toString(@Nonnull StringBasedErpType.FillCharStrategy strategy, char fillChar) Deprecated.Returns this value, filled according to the givenFillCharStrategy
with the give fillChar.- Parameters:
strategy
- The strategy to be used to fill this value.fillChar
- The character to be used to fill this value.- Returns:
- The value according to the given fill character strategy.
-
compareTo
Deprecated.- Specified by:
compareTo
in interfaceComparable<T extends StringBasedErpType<T>>
-
getKeyAsString
Deprecated.Description copied from interface:StringRepresentableKey
Returns the String representation of this key.- Specified by:
getKeyAsString
in interfaceStringRepresentableKey
- Returns:
- This key as a String.
-
transformToString
@Nonnull public static <T extends StringBasedErpType<T>> Function<T,String> transformToString(@Nonnull ErpTypeConverter<T> converter) Deprecated.Creates a function which transforms a givenStringBasedErpType
to its String representation. This function handles null gracefully and returns null itself.- Type Parameters:
T
- The type of the subclass to transform.- Parameters:
converter
- The converter that should transform the concrete implementation ofStringBasedErpType
to String.- Returns:
- A null-safe function transforming a
StringBasedErpType
to String.
-
transformToType
@Nonnull public static <T extends StringBasedErpType<T>> Function<String,T> transformToType(@Nonnull ErpTypeConverter<T> converter) Deprecated.Creates a function which transforms a given String to itsStringBasedErpType
representation. This function handles null gracefully and returns null itself.- Type Parameters:
T
- The type of the subclass to create.- Parameters:
converter
- The converter that should transform the String representation to the concreteStringBasedErpType
implementation.- Returns:
- A null-safe function transforming a String to a
StringBasedErpType
.
-
equals
Deprecated. -
canEqual
Deprecated. -
hashCode
public int hashCode()Deprecated. -
getValue
Deprecated.
-