All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evasion.plugin.geoloc.dao.LocationDAO Maven / Gradle / Ivy

There is a newer version: 2.0.0.2
Show newest version
/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package com.evasion.plugin.geoloc.dao;

import com.evasion.dao.api.AbstractJPAGenericDAO;
import com.evasion.entity.geolocation.Location;
import java.util.List;
import javax.persistence.NoResultException;
import javax.persistence.Query;

/**
 * DAO pour la manipulation des Business Object de type {@link Location}.
 *
 * @author sebastien
 */
public class LocationDAO extends AbstractJPAGenericDAO {

    /**
     * *
     * serialVersionUID.
     */
    private static final long serialVersionUID = 1L;

    /**
     *
     * @TODO a supprimer après mise en place d'un moteur de recherche sur
     * fulltext.
     * @param partialName
     * @return
     */
    public List findLikeName(String partialName) {
        List result;
        Query query = (Query) getEntityManager().
                createNamedQuery(Location.QUERY_FIND_LIKE_NAME);
        query.setParameter(1, "%"+partialName+"%");
        result = (List) query.getResultList();
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy