use of org.keycloak.models.map.storage.tree.TreeStorageNodePrescription in project keycloak by keycloak.
the class PerFieldDelegateProviderCacheTest method prepareEntityAndTreeNodeInstances.
private MapClientEntity prepareEntityAndTreeNodeInstances() {
TreeStorageNodePrescription upperTsnp = new TreeStorageNodePrescription(upperNodeProperties, null, null);
TreeStorageNodePrescription lowerTsnp = new TreeStorageNodePrescription(lowerNodeProperties, null, null);
upperTsni = new TreeStorageNodeInstance<>(null, upperTsnp);
lowerTsni = new TreeStorageNodeInstance<>(null, lowerTsnp);
PerFieldDelegateProvider<MapClientEntity> fieldProvider = new PerFieldDelegateProvider<>(upperTsni.new WithEntity(upperEnt), () -> {
lowerEntSupplierCallCount.incrementAndGet();
return lowerEnt;
});
return DeepCloner.DUMB_CLONER.entityFieldDelegate(MapClientEntity.class, fieldProvider);
}
use of org.keycloak.models.map.storage.tree.TreeStorageNodePrescription in project keycloak by keycloak.
the class PerFieldDelegateProviderPrimarySourceTest method prepareEntityAndTreeNodeInstances.
private MapClientEntity prepareEntityAndTreeNodeInstances() {
TreeStorageNodePrescription upperTsnp = new TreeStorageNodePrescription(upperNodeProperties, null, null);
TreeStorageNodePrescription lowerTsnp = new TreeStorageNodePrescription(lowerNodeProperties, null, null);
upperTsni = new TreeStorageNodeInstance<>(null, upperTsnp);
lowerTsni = new TreeStorageNodeInstance<>(null, lowerTsnp);
PerFieldDelegateProvider<MapClientEntity> fieldProvider = new PerFieldDelegateProvider<>(upperTsni.new WithEntity(upperEnt), () -> {
lowerEntSupplierCallCount.incrementAndGet();
return lowerEnt;
});
return DeepCloner.DUMB_CLONER.entityFieldDelegate(MapClientEntity.class, fieldProvider);
}
Aggregations