Package org.apache.cassandra.cql3
Class UserTypes
java.lang.Object
org.apache.cassandra.cql3.UserTypes
Static helper methods and classes for user types.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnSpecificationfieldSpecOf(ColumnSpecification column, int field) static <T extends AssignmentTestable>
AssignmentTestable.TestResulttestUserTypeAssignment(ColumnSpecification receiver, Map<FieldIdentifier, T> entries) Tests that the map with the specified entries can be assigned to the specified column.static <T> StringuserTypeToString(Map<FieldIdentifier, T> items) Create aStringrepresentation of the user type from the specified items associated to the user type entries.static <T> StringuserTypeToString(Map<FieldIdentifier, T> items, Function<T, String> mapper) Create aStringrepresentation of the user type from the specified items associated to the user type entries.static <T extends AssignmentTestable>
voidvalidateUserTypeAssignableTo(ColumnSpecification receiver, Map<FieldIdentifier, T> entries)
-
Method Details
-
fieldSpecOf
-
validateUserTypeAssignableTo
public static <T extends AssignmentTestable> void validateUserTypeAssignableTo(ColumnSpecification receiver, Map<FieldIdentifier, T> entries) -
testUserTypeAssignment
public static <T extends AssignmentTestable> AssignmentTestable.TestResult testUserTypeAssignment(ColumnSpecification receiver, Map<FieldIdentifier, T> entries) Tests that the map with the specified entries can be assigned to the specified column.- Parameters:
receiver- the receiving columnentries- the map entries
-
userTypeToString
Create aStringrepresentation of the user type from the specified items associated to the user type entries.- Parameters:
items- items associated to the user type entries- Returns:
- a
Stringrepresentation of the user type
-
userTypeToString
Create aStringrepresentation of the user type from the specified items associated to the user type entries.- Parameters:
items- items associated to the user type entries- Returns:
- a
Stringrepresentation of the user type
-