public class KittyMMEntryFactory
extends java.lang.Object
Constructor and Description |
---|
KittyMMEntryFactory() |
Modifier and Type | Method and Description |
---|---|
(package private) static <D extends KittyMapper,M extends KittyModel> |
newKittyMapper(java.lang.Class<D> kittyDataMapperClass,
KittyTableConfiguration tableConfiguration,
KittyDatabaseConfiguration dbConfiguration,
M blankModel,
java.lang.String dbPassword)
Creates new KittyMapper from mapper class and other needed stuff
|
(package private) static <M extends KittyModel> |
newKittyModel(java.lang.Class<M> kittyModelClass)
Creates new KittyModel with provided modelClass class
|
<D extends KittyMapper,M extends KittyModel> |
newMMEntry(java.lang.Class<D> mapperClass,
KittyTableConfiguration tableCfg)
Creates MM entry for specified mapper class and with usage of current table configuration
|
KittyMMEntryFactory |
setDatabaseConfiguration(KittyDatabaseConfiguration databaseConfiguration)
Sets databaseClass configuration that should be used with this factory
|
KittyMMEntryFactory |
setDatabasePassword(java.lang.String password)
Sets databaseClass password for this helper if db encryption implemented, optional setter
|
public KittyMMEntryFactory setDatabaseConfiguration(KittyDatabaseConfiguration databaseConfiguration)
databaseConfiguration
- kitty databaseClass configurationpublic KittyMMEntryFactory setDatabasePassword(java.lang.String password)
password
- databaseClass encryption passwordpublic <D extends KittyMapper,M extends KittyModel> KittyMMEntry newMMEntry(java.lang.Class<D> mapperClass, KittyTableConfiguration tableCfg)
D
- M
- mapperClass
- data mapper classtableCfg
- table configurationKittyRuntimeException
- if any errors happened (original exception is wrapped inside KittyRuntimeException)static final <M extends KittyModel> M newKittyModel(java.lang.Class<M> kittyModelClass)
M
- kittyModelClass
- kitty modelClass's classKittyRuntimeException
- (InstantiationException and IllegalAccessException will be wrapped into KittyRuntimeException)static final <D extends KittyMapper,M extends KittyModel> D newKittyMapper(java.lang.Class<D> kittyDataMapperClass, KittyTableConfiguration tableConfiguration, KittyDatabaseConfiguration dbConfiguration, M blankModel, java.lang.String dbPassword)
D
- M
- kittyDataMapperClass
- data mapper class to instantiatetableConfiguration
- table configuration to use in mapper instantiationdbConfiguration
- databaseClass configurationblankModel
- modelClass instancedbPassword
- databaseClass password (can be null, optional parameter)KittyRuntimeException
- (InstantiationException, NoSuchMethodException, InvocationTargetException and IllegalAccessException will be wrapped into KittyRuntimeException)