Annotation Type DefaultNullSavingStrategy
-
@Target(TYPE) @Retention(RUNTIME) public @interface DefaultNullSavingStrategy
Annotates aDaointerface to define a defaultNullSavingStrategy, that will apply to all methods that don't explicitly declare one.For example, given this interface:
@Dao @DefaultNullSavingStrategy(SET_TO_NULL) public interface ProductDao { @Insert void insert(Product product); @Update(nullSavingStrategy = DO_NOT_SET) void update(Product product); }insert(Product)will useSET_TO_NULL(inherited from the DAO's default).update(Product)will useDO_NOT_SET.
DefaultNullSavingStrategy, any method that does not declare its own value defaults toDO_NOT_SET.Note that null saving strategies are only relevant for
Update,Insert,QueryandSetEntitymethods.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description NullSavingStrategyvalue
-
-
-
Element Detail
-
value
NullSavingStrategy value
-
-