Exemplo n.º 1
0
 public static int typeHashCode(AbstractType<?> t) {
   return t.asCQL3Type().toString().hashCode();
 }
Exemplo n.º 2
0
 @Override
 public CQL3Type asCQL3Type() {
   return baseType.asCQL3Type();
 }
Exemplo n.º 3
0
 /*
  * We need to compare the CQL3 representation of the type because comparing
  * the AbstractType will fail for example if a UDT has been changed.
  * Reason is that UserType.equals() takes the field names and types into account.
  * Example CQL sequence that would fail when comparing AbstractType:
  *    CREATE TYPE foo ...
  *    CREATE FUNCTION bar ( par foo ) RETURNS foo ...
  *    ALTER TYPE foo ADD ...
  * or
  *    ALTER TYPE foo ALTER ...
  * or
  *    ALTER TYPE foo RENAME ...
  */
 public static boolean typeEquals(AbstractType<?> t1, AbstractType<?> t2) {
   return t1.asCQL3Type().toString().equals(t2.asCQL3Type().toString());
 }