<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.kth.kthfsdashboard.provision;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import se.kth.kthfsdashboard.user.AbstractFacade;

/**
 *
 * @author <NAME> <<EMAIL>>
 */
@Stateless
public class CredentialsFacade extends AbstractFacade<PaaSCredentials>{
    
    @PersistenceContext(unitName = "kthfsPU")
    private EntityManager em;
    
    @Override
    protected EntityManager getEntityManager() {
       return em;
    }
    
    public CredentialsFacade(){
        super(PaaSCredentials.class);
    }
    
    public PaaSCredentials find() {
        TypedQuery<PaaSCredentials> query = em.createNamedQuery("PaaSCredentials.findAll", PaaSCredentials.class);
        return query.getResultList().get(0);
    }
}<commit_msg>fixed paas credentials issue that was solved in bbc branch<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.kth.kthfsdashboard.provision;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import se.kth.kthfsdashboard.user.AbstractFacade;

/**
 *
 * @author <NAME> <<EMAIL>>
 */
@Stateless
public class CredentialsFacade extends AbstractFacade<PaaSCredentials>{
    
    @PersistenceContext(unitName = "kthfsPU")
    private EntityManager em;
    
    @Override
    protected EntityManager getEntityManager() {
       return em;
    }
    
    public CredentialsFacade(){
        super(PaaSCredentials.class);
    }
    
    public PaaSCredentials find() {
        TypedQuery<PaaSCredentials> query = em.createNamedQuery("PaaSCredentials.findAll", PaaSCredentials.class);
        if (query.getResultList().size() > 0) {
            return query.getResultList().get(0);
        }
        return new PaaSCredentials();
    }
}
{'fraction_non_alphanumeric': 0.10034096444227959, 'fraction_numerical': 0.0014612761811982464, 'mean_word_length': 3.6788154897494305, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3110234', 'n_tokens_mistral': 620, 'n_tokens_neox': 625, 'n_words': 133}