Class TextTransformMapping
- java.lang.Object
-
- com.broadleafcommerce.metadata.dsl.core.Mapping<TextTransformMapping>
-
- com.broadleafcommerce.metadata.dsl.core.extension.mappings.TextTransformMapping
-
- All Implemented Interfaces:
Copyable<TextTransformMapping>
,Serializable
public class TextTransformMapping extends Mapping<TextTransformMapping> implements Serializable
An implementation ofMapping
for transforming a text property common case transformations.- Author:
- Nick Crum (ncrum)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextTransformMapping.DefaultTextTransforms
-
Constructor Summary
Constructors Constructor Description TextTransformMapping()
TextTransformMapping(TextTransformMapping mapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextTransformMapping
camelCase()
Sets the text transform to camel case the property.protected boolean
canEqual(Object other)
TextTransformMapping
capitalize()
Sets the text transform to capitalize the property.TextTransformMapping
copy()
boolean
equals(Object o)
String
getPath()
The name of the text property to transform.String
getTransform()
The transform to apply to the text property.int
hashCode()
TextTransformMapping
kebabCase()
Sets the text transform to kebab case the property.TextTransformMapping
lowerCase()
Sets the text transform to lower case the property.TextTransformMapping
path(String path)
Sets the text property path to transform.TextTransformMapping
snakeCase()
Sets the text transform to snake case the property.TextTransformMapping
startCase()
Sets the text transform to start case the property.TextTransformMapping
transform(String transform)
Sets the text transform operation name to the provided value.TextTransformMapping
trim()
Sets the text transform to trim the property.TextTransformMapping
upperCase()
Sets the text transform to upper case the property.
-
-
-
Constructor Detail
-
TextTransformMapping
public TextTransformMapping()
-
TextTransformMapping
public TextTransformMapping(TextTransformMapping mapping)
-
-
Method Detail
-
copy
public TextTransformMapping copy()
- Specified by:
copy
in interfaceCopyable<TextTransformMapping>
- Returns:
- a deep copy of this instance
-
path
public TextTransformMapping path(String path)
Sets the text property path to transform.- Parameters:
path
- the property path- Returns:
- the mapping
-
transform
public TextTransformMapping transform(String transform)
Sets the text transform operation name to the provided value.- Parameters:
transform
- the text transform name- Returns:
- the mapping
-
camelCase
public TextTransformMapping camelCase()
Sets the text transform to camel case the property.- Returns:
- the mapping
-
capitalize
public TextTransformMapping capitalize()
Sets the text transform to capitalize the property.- Returns:
- the mapping
-
kebabCase
public TextTransformMapping kebabCase()
Sets the text transform to kebab case the property.- Returns:
- the mapping
-
lowerCase
public TextTransformMapping lowerCase()
Sets the text transform to lower case the property.- Returns:
- the mapping
-
snakeCase
public TextTransformMapping snakeCase()
Sets the text transform to snake case the property.- Returns:
- the mapping
-
startCase
public TextTransformMapping startCase()
Sets the text transform to start case the property.- Returns:
- the mapping
-
trim
public TextTransformMapping trim()
Sets the text transform to trim the property.- Returns:
- the mapping
-
upperCase
public TextTransformMapping upperCase()
Sets the text transform to upper case the property.- Returns:
- the mapping
-
getPath
public String getPath()
The name of the text property to transform.
-
getTransform
public String getTransform()
The transform to apply to the text property.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classMapping<TextTransformMapping>
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqual
in classMapping<TextTransformMapping>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMapping<TextTransformMapping>
-
-