Class UserTypes

java.lang.Object
org.apache.cassandra.cql3.UserTypes

public abstract class UserTypes extends Object
Static helper methods and classes for user types.
  • Method Details

    • fieldSpecOf

      public static ColumnSpecification fieldSpecOf(ColumnSpecification column, int field)
    • 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 column
      entries - the map entries
    • userTypeToString

      public static <T> String userTypeToString(Map<FieldIdentifier,T> items)
      Create a String 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> String userTypeToString(Map<FieldIdentifier,T> items, Function<T,String> mapper)
      Create a String 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