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
A
MaskingFunction applied to a StringType value that,
depending on PartialMaskingFunction.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 ClassesNested classes/interfaces inherited from class org.apache.cassandra.cql3.functions.masking.MaskingFunction
MaskingFunction.FactoryNested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable
AssignmentTestable.TestResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charThe 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_PREFIXFields inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
argTypes, name, returnTypeFields inherited from interface org.apache.cassandra.cql3.functions.Function
UNRESOLVED -
Method Summary
Modifier and TypeMethodDescriptionApplies this function to the specified arguments.static Collection<FunctionFactory>newArguments(ProtocolVersion version) Creates some new input arguments for this function.Methods inherited from class org.apache.cassandra.cql3.functions.NativeScalarFunction
isAggregate, isCalledOnNullInput, isPartialApplicationMonotonicMethods inherited from class org.apache.cassandra.cql3.functions.NativeFunction
isNative, isPure, withLegacyNameMethods inherited from class org.apache.cassandra.cql3.functions.AbstractFunction
addFunctionsTo, argTypes, argumentsList, columnName, elementKeyspace, elementName, equals, getCompatibleTypeIfKnown, hashCode, name, referencesUserType, returnType, testAssignment, toCqlString, toString, typesMatchMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.cql3.AssignmentTestable
getCompatibleTypeIfKnown, testAssignmentMethods inherited from interface org.apache.cassandra.cql3.functions.Function
addFunctionsTo, argTypes, columnName, compare, isNative, isPure, name, referencesUserType, returnTypeMethods inherited from interface org.apache.cassandra.cql3.functions.ScalarFunction
isMonotonic, partialApplication
-
Field Details
-
DEFAULT_PADDING_CHAR
public static final char DEFAULT_PADDING_CHARThe character to be used as padding if no other character is supplied when calling the function.- See Also:
-
-
Method Details
-
newArguments
Description copied from interface:FunctionCreates some new input arguments for this function.- Specified by:
newArgumentsin interfaceFunction- Overrides:
newArgumentsin classNativeFunction- Parameters:
version- the protocol version- Returns:
- some new input arguments for this function
-
execute
Description copied from interface:ScalarFunctionApplies 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
- Returns:
- a collection of function factories to build new
PartialMaskingFunctionfunctions.
-