Code example for SessionFactory

Methods: getCurrentSession

0
            throw re;
        } 
    }  
     
	public void deleteRoleAttributes(String serviceId, String roleId) {
		Session session = sessionFactory.getCurrentSession();
		Query qry = session.createQuery("delete org.openiam.idm.srvc.role.domain.RoleAttributeEntity ra " +
					" where ra.id.serviceId = :serviceId and ra.id.roleId = :roleId "); 
		qry.setString("serviceId", serviceId);
		qry.setString("roleId",roleId);
		qry.executeUpdate();
	} 
 
 
} 
 
Experience pair programming with AI  Get Codota for Java