/** * Retrieves a type converter for the given class type with the given type parameters. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #typeTag(Class, Class, Class[])}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main, Class<?> typeParam1, Class<?>... typeParams) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main, typeParam1, typeParams)); }
/** * Creates a row writer factory which can map objects supported by a given column mapper to columns * in a table. */ @SuppressWarnings("unchecked") public static <T> RowWriterFactory<T> mapToRow(Class<?> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return defaultRowWriterFactory(tt, columnMapper); }
/** * Creates a RowReaderFactory instance for reading tuples with given parameter types. */ public static <A> RowReaderFactory<Tuple1<A>> mapRowToTuple( Class<A> a ) { final TypeTags.TypeTag<Tuple1<A>> tupleTT = typeTag(Tuple1.class, typeTag(a) ); return new ClassBasedRowReaderFactory<>(tupleTT, tuple1ColumnMapper(a)); }
/** * Constructs a row reader factory which maps an entire row using a specified column mapper. Follow * the guide to find out more about column mappers. */ public static <T> RowReaderFactory<T> mapRowTo(Class<T> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return new ClassBasedRowReaderFactory<>(tt, columnMapper); }
/** * Creates a RowReaderFactory instance for reading tuples with given parameter types. */ public static <A> RowReaderFactory<Tuple1<A>> mapRowToTuple( Class<A> a ) { final TypeTags.TypeTag<Tuple1<A>> tupleTT = typeTag(Tuple1.class, typeTag(a) ); return new ClassBasedRowReaderFactory<>(tupleTT, tuple1ColumnMapper(a)); }
/** * Creates a row writer factory which can map objects supported by a given column mapper to columns * in a table. */ @SuppressWarnings("unchecked") public static <T> RowWriterFactory<T> mapToRow(Class<?> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return defaultRowWriterFactory(tt, columnMapper); }
/** * Retrieves a type converter for the given class type with the given type parameters. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #typeTag(Class, Class, Class[])}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main, Class<?> typeParam1, Class<?>... typeParams) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main, typeParam1, typeParams)); }
/** * Creates a RowReaderFactory instance for reading tuples with given parameter types. */ public static <A> RowReaderFactory<Tuple1<A>> mapRowToTuple( Class<A> a ) { final TypeTags.TypeTag<Tuple1<A>> tupleTT = typeTag(Tuple1.class, typeTag(a) ); return new ClassBasedRowReaderFactory<>(tupleTT, tuple1ColumnMapper(a)); }
/** * Retrieves a type converter for the given class type. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #safeTypeTag(Class)}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main)); }
/** * Constructs a row reader factory which maps an entire row using a specified column mapper. Follow * the guide to find out more about column mappers. */ public static <T> RowReaderFactory<T> mapRowTo(Class<T> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return new ClassBasedRowReaderFactory<>(tt, columnMapper); }
/** * Retrieves a type converter for the given class type. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #safeTypeTag(Class)}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main)); }
/** * Retrieves a type converter for the given class type. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #safeTypeTag(Class)}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main)); }
/** * Retrieves a type converter for the given class type. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #safeTypeTag(Class)}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main)); }
/** * Constructs a row reader factory which maps an entire row using a specified column mapper. Follow * the guide to find out more about column mappers. */ public static <T> RowReaderFactory<T> mapRowTo(Class<T> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return new ClassBasedRowReaderFactory<>(tt, columnMapper); }
/** * Creates a row writer factory which can map objects supported by a given column mapper to columns * in a table. */ @SuppressWarnings("unchecked") public static <T> RowWriterFactory<T> mapToRow(Class<?> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return defaultRowWriterFactory(tt, columnMapper); }
/** * Retrieves a type converter for the given class type with the given type parameters. * <p/> * This is a short-hand method for calling {@link #typeConverter(TypeTags.TypeTag)} with an argument * obtained by {@link #typeTag(Class, Class, Class[])}. */ @SuppressWarnings("unchecked") public static <T> TypeConverter<T> typeConverter(Class<?> main, Class<?> typeParam1, Class<?>... typeParams) { return TypeConverter$.MODULE$.forType(CassandraJavaUtil.<T>typeTag(main, typeParam1, typeParams)); }
/** * Creates a row writer factory which can map objects supported by a given column mapper to columns * in a table. */ @SuppressWarnings("unchecked") public static <T> RowWriterFactory<T> mapToRow(Class<?> targetClass, ColumnMapper<T> columnMapper) { TypeTags.TypeTag<T> tt = typeTag(targetClass); return defaultRowWriterFactory(tt, columnMapper); }