Package org.apache.cassandra.cql3
Class UserTypes
- java.lang.Object
-
- org.apache.cassandra.cql3.UserTypes
-
public abstract class UserTypes extends java.lang.Object
Static helper methods and classes for user types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserTypes.DelayedValue
static class
UserTypes.DeleterByField
static class
UserTypes.Literal
static class
UserTypes.Marker
static class
UserTypes.Setter
static class
UserTypes.SetterByField
static class
UserTypes.Value
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ColumnSpecification
fieldSpecOf(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.String
userTypeToString(java.util.Map<FieldIdentifier,T> items)
Create aString
representation of the user type from the specified items associated to the user type entries.static <T> java.lang.String
userTypeToString(java.util.Map<FieldIdentifier,T> items, java.util.function.Function<T,java.lang.String> mapper)
Create aString
representation 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 aString
representation 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
String
representation 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 aString
representation 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
String
representation of the user type
-
-