Class PartialMaskingFunction
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.AbstractFunction
-
- org.apache.cassandra.cql3.functions.NativeFunction
-
- org.apache.cassandra.cql3.functions.NativeScalarFunction
-
- org.apache.cassandra.cql3.functions.masking.MaskingFunction
-
- org.apache.cassandra.cql3.functions.masking.PartialMaskingFunction
-
- All Implemented Interfaces:
AssignmentTestable
,Function
,ScalarFunction
public class PartialMaskingFunction extends MaskingFunction
AMaskingFunction
applied to aStringType
value that, depending onPartialMaskingFunction.Kind
:- Replaces each character between the supplied positions by the supplied padding character. In other words, it will mask all the characters except the first m and last n.
- Replaces each character before and after the supplied positions by the supplied padding character. In other words, it will only mask all the first m and last n characters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PartialMaskingFunction.Kind
-
Nested classes/interfaces inherited from class org.apache.cassandra.cql3.functions.masking.MaskingFunction
MaskingFunction.Factory
-
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable
AssignmentTestable.TestResult
-
-
Field Summary
Fields Modifier and Type Field Description static char
DEFAULT_PADDING_CHAR
The character to be used as padding if no other character is supplied when calling the function.-
Fields inherited from class org.apache.cassandra.cql3.functions.masking.MaskingFunction
NAME_PREFIX
-
Fields inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
argTypes, name, returnType
-
Fields inherited from interface org.apache.cassandra.cql3.functions.Function
UNRESOLVED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
execute(Arguments arguments)
Applies this function to the specified arguments.static java.util.Collection<FunctionFactory>
factories()
Arguments
newArguments(ProtocolVersion version)
Creates some new input arguments for this function.-
Methods inherited from class org.apache.cassandra.cql3.functions.NativeScalarFunction
isAggregate, isCalledOnNullInput, isPartialApplicationMonotonic
-
Methods inherited from class org.apache.cassandra.cql3.functions.NativeFunction
isNative, isPure, withLegacyName
-
Methods inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
addFunctionsTo, argTypes, argumentsList, columnName, elementKeyspace, elementName, equals, getCompatibleTypeIfKnown, hashCode, name, referencesUserType, returnType, testAssignment, toCqlString, toString, typesMatch
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.AssignmentTestable
getCompatibleTypeIfKnown, testAssignment
-
Methods inherited from interface org.apache.cassandra.cql3.functions.Function
addFunctionsTo, argTypes, columnName, compare, isNative, isPure, name, referencesUserType, returnType
-
Methods inherited from interface org.apache.cassandra.cql3.functions.ScalarFunction
isMonotonic, partialApplication
-
-
-
-
Field Detail
-
DEFAULT_PADDING_CHAR
public static final char DEFAULT_PADDING_CHAR
The character to be used as padding if no other character is supplied when calling the function.- See Also:
- Constant Field Values
-
-
Method Detail
-
newArguments
public Arguments newArguments(ProtocolVersion version)
Description copied from interface:Function
Creates some new input arguments for this function.- Specified by:
newArguments
in interfaceFunction
- Overrides:
newArguments
in classNativeFunction
- Parameters:
version
- the protocol version- Returns:
- some new input arguments for this function
-
execute
public java.nio.ByteBuffer execute(Arguments arguments) throws InvalidRequestException
Description copied from interface:ScalarFunction
Applies this function to the specified arguments.- Parameters:
arguments
- the input arguments for the function- Returns:
- the result of applying this function to the arguments
- Throws:
InvalidRequestException
- if this function cannot not be applied to the arguments
-
factories
public static java.util.Collection<FunctionFactory> factories()
- Returns:
- a collection of function factories to build new
PartialMaskingFunction
functions.
-
-