@Target(value=PARAMETER) @Retention(value=RUNTIME) public @interface DaoKeyspace
DaoFactory
method that indicates the keyspace to create a
DAO for.
Example:
@Mapper public interface InventoryMapper { ProductDao productDao(@DaoKeyspace String ks); }The annotated parameter can be a
String
or CqlIdentifier
. If it is present, the
value will be injected in the DAO instance, where it will be used in generated queries, and can
be substituted in text queries. This allows you to reuse the same DAO for different keyspaces.DaoFactory
Copyright © 2017–2021. All rights reserved.