Package org.apache.cassandra.cql3
Class UserTypes
- java.lang.Object
-
- org.apache.cassandra.cql3.UserTypes
-
public abstract class UserTypes extends java.lang.ObjectStatic helper methods and classes for user types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserTypes.DelayedValuestatic classUserTypes.DeleterByFieldstatic classUserTypes.Literalstatic classUserTypes.Markerstatic classUserTypes.Setterstatic classUserTypes.SetterByFieldstatic classUserTypes.Value
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ColumnSpecificationfieldSpecOf(ColumnSpecification column, int field)static <T extends AssignmentTestable>
AssignmentTestable.TestResulttestUserTypeAssignment(ColumnSpecification receiver, java.util.Map<FieldIdentifier,T> entries)Tests that the map with the specified entries can be assigned to the specified column.static <T> java.lang.StringuserTypeToString(java.util.Map<FieldIdentifier,T> items)Create aStringrepresentation of the user type from the specified items associated to the user type entries.static <T> java.lang.StringuserTypeToString(java.util.Map<FieldIdentifier,T> items, java.util.function.Function<T,java.lang.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, java.util.Map<FieldIdentifier,T> entries)
-
-
-
Method Detail
-
fieldSpecOf
public static ColumnSpecification fieldSpecOf(ColumnSpecification column, int field)
-
validateUserTypeAssignableTo
public static <T extends AssignmentTestable> void validateUserTypeAssignableTo(ColumnSpecification receiver, java.util.Map<FieldIdentifier,T> entries)
-
testUserTypeAssignment
public static <T extends AssignmentTestable> AssignmentTestable.TestResult testUserTypeAssignment(ColumnSpecification receiver, java.util.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
public static <T> java.lang.String userTypeToString(java.util.Map<FieldIdentifier,T> items)
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
public static <T> java.lang.String userTypeToString(java.util.Map<FieldIdentifier,T> items, java.util.function.Function<T,java.lang.String> mapper)
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
-
-