Class DBHandler
- java.lang.Object
-
- com.github.amjadnas.sqldbmanager.builder.DBHandler
-
public final class DBHandler extends java.lang.Object
The class is used to build the database handler that enables to access the DAOs defend by the user
-
-
Method Summary
Modifier and Type Method Description static <T> T
build(java.lang.Class<T> handlerClass)
this method is used to build database handler all the user has to is provide a handler class to be build be aware that every field in the handler class won't be instantiated if it's not annotated as a @Dao the DAOs must be provided as interfaces otherwise an IllegalArgumentException will be thrown.
-
-
-
Method Detail
-
build
public static <T> T build(java.lang.Class<T> handlerClass)
this method is used to build database handler all the user has to is provide a handler class to be build be aware that every field in the handler class won't be instantiated if it's not annotated as a @Dao the DAOs must be provided as interfaces otherwise an IllegalArgumentException will be thrown. the classes that are provided in the @Handler annotation must be Entities otherwise an IllegalArgumentException will be thrown.- Type Parameters:
T
- database handler class type- Parameters:
handlerClass
- Class object of the handler to be built- Returns:
- the instance of the handler class
-
-