public void setProperty(String key, String value){
        try{
            PersistentEntry persistentEntry = (PersistentEntry)
                    em.createNamedQuery(PersistentEntry.FIND_BY_CATEGORY_AND_KEY).
                            setParameter("category",getPropertiesFilename()).
                            setParameter("key",key).getSingleResult();

            persistentEntry.setValue(value);
            em.merge(persistentEntry);

        } catch (NoResultException e){

        }
    }