4
4
5
5
import javax .persistence .EntityManagerFactory ;
6
6
7
+ import info .unterrainer .commons .httpserver .jpas .BasicPermissionJpa ;
7
8
import info .unterrainer .commons .rdbutils .entities .BasicJpa ;
8
9
import io .javalin .http .Context ;
9
10
@@ -22,7 +23,8 @@ public class JpqlDao<P extends BasicJpa> extends BasicJpqlDao<P> {
22
23
* @param type the return-type of the query (the underlying JPA)
23
24
* @param tenantJpaType the JPA of the tenant-permission table associated
24
25
*/
25
- public JpqlDao (final EntityManagerFactory emf , final Class <P > type , final Class <? extends BasicJpa > tenantJpaType ) {
26
+ public JpqlDao (final EntityManagerFactory emf , final Class <P > type ,
27
+ final Class <? extends BasicPermissionJpa > tenantJpaType ) {
26
28
super (emf , type );
27
29
this .coreDao .tenantData = new TenantData (tenantJpaType );
28
30
}
@@ -45,7 +47,7 @@ public JpqlDao(final EntityManagerFactory emf, final Class<P> type, final Class<
45
47
* associated
46
48
*/
47
49
public JpqlDao (final Function <Context , EntityManagerFactory > entityManagerFactorySupplier , final Class <P > type ,
48
- final Class <? extends BasicJpa > tenantJpaType ) {
50
+ final Class <? extends BasicPermissionJpa > tenantJpaType ) {
49
51
super (entityManagerFactorySupplier , type );
50
52
this .coreDao .tenantData = new TenantData (tenantJpaType );
51
53
}
@@ -65,8 +67,9 @@ public JpqlDao(final Function<Context, EntityManagerFactory> entityManagerFactor
65
67
* to the main-table-id
66
68
* @param tenantIdFieldName the name of the field holding the tenant-ID
67
69
*/
68
- public JpqlDao (final EntityManagerFactory emf , final Class <P > type , final Class <? extends BasicJpa > tenantJpaType ,
69
- final String tenantReferenceFieldName , final String tenantIdFieldName ) {
70
+ public JpqlDao (final EntityManagerFactory emf , final Class <P > type ,
71
+ final Class <? extends BasicPermissionJpa > tenantJpaType , final String tenantReferenceFieldName ,
72
+ final String tenantIdFieldName ) {
70
73
super (emf , type );
71
74
this .coreDao .tenantData = new TenantData (tenantJpaType , tenantReferenceFieldName , tenantIdFieldName );
72
75
}
@@ -90,7 +93,7 @@ public JpqlDao(final EntityManagerFactory emf, final Class<P> type, final Class<
90
93
* tenant-ID
91
94
*/
92
95
public JpqlDao (final Function <Context , EntityManagerFactory > entityManagerFactorySupplier , final Class <P > type ,
93
- final Class <? extends BasicJpa > tenantJpaType , final String tenantReferenceFieldName ,
96
+ final Class <? extends BasicPermissionJpa > tenantJpaType , final String tenantReferenceFieldName ,
94
97
final String tenantIdFieldName ) {
95
98
super (entityManagerFactorySupplier , type );
96
99
this .coreDao .tenantData = new TenantData (tenantJpaType , tenantReferenceFieldName , tenantIdFieldName );
0 commit comments