Package com.jk.data.dataaccess
Class JKDataAccessFactory
java.lang.Object
com.jk.data.dataaccess.JKDataAccessFactory
A factory for creating JKDataSource objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
close()
Reset.static JKDataAccessService
Gets the data access service.static JKDataAccessService
getDataAccessService
(JKDataSource dataSource) Gets the data access service.static JKDataAccessService
getDataAccessService
(String databasePrefix) Gets the data access service.static JKDataSource
Gets the default data source.static JKNoSqlDataAccess
Gets the no sql data access.static JKNoSqlDataSource
Gets the no sql data source.static JKObjectDataAccess
Gets the object data access service.static JKObjectDataAccess
getObjectDataAccessService
(JKDataSource dataSource) Gets the object data access service.static JKObjectDataAccess
getObjectDataAccessService
(String databasePrefix) Gets the object data access service.static void
init()
Inits the.static boolean
isEntityAvailable
(Class<?> clas) Checks if is entity available.static void
Sets the default data source.
-
Constructor Details
-
JKDataAccessFactory
public JKDataAccessFactory()
-
-
Method Details
-
getDefaultDataSource
Gets the default data source.- Returns:
- the default data source
-
setDefaultDataSource
Sets the default data source.- Parameters:
impl
- the new default data source
-
init
public static void init()Inits the. -
close
protected static void close()Reset. -
getDataAccessService
Gets the data access service.- Returns:
- the data access service
-
getObjectDataAccessService
Gets the object data access service.- Parameters:
databasePrefix
- the database prefix- Returns:
- the object data access service
-
getObjectDataAccessService
Gets the object data access service.- Parameters:
dataSource
- the data source- Returns:
- the object data access service
-
getObjectDataAccessService
Gets the object data access service.- Returns:
- the object data access service
-
getDataAccessService
Gets the data access service.- Parameters:
databasePrefix
- the database prefix- Returns:
- the data access service
-
getDataAccessService
Gets the data access service.- Parameters:
dataSource
- the data source- Returns:
- the data access service
-
isEntityAvailable
Checks if is entity available.- Parameters:
clas
- the clas- Returns:
- true, if is entity available
-
getNoSqlDataSource
Gets the no sql data source.- Returns:
- the no sql data source
-
getNoSqlDataAccess
Gets the no sql data access.- Returns:
- the no sql data access
-