// Path: websnapshot-api/src/main/java/org/asqatasun/websnapshot/entity/Url.java
// public interface Url extends Entity {
// 
//     /**
//      *
//      * @return the url of the image
//      */
//     String getUrl();
// 
//     /**
//      *
//      * @param url
//      */
//     void setUrl(String url);
// }
// 
// Path: websnapshot-api/src/main/java/org/asqatasun/websnapshot/entity/dao/UrlDAO.java
// public interface UrlDAO extends GenericDAO<Url, Long> {
// 
//     /**
//      *
//      * @param url
//      * @return
//      */
//     Url findUrlByStringUrl(String url);
// 
//     Long count();
// }


import javax.persistence.NoResultException;
import org.apache.log4j.Logger;
import org.asqatasun.sdk.entity.service.AbstractGenericDataService;
import org.asqatasun.websnapshot.entity.Url;
import org.asqatasun.websnapshot.entity.dao.UrlDAO;
/*
 * Web-Snapshot
 * Copyright (C) 2008-2017  Asqatasun.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: asqatasun AT asqatasun DOT org
 */
package org.asqatasun.websnapshot.entity.service;


public class UrlDataServiceImpl extends AbstractGenericDataService<Url, Long>
        implements UrlDataService {

    public UrlDataServiceImpl() {
        super();
    }

    @Override
    public Url getUrlFromStringUrl(String url) {
        try {
// Path: websnapshot-api/src/main/java/org/asqatasun/websnapshot/entity/Url.java
// public interface Url extends Entity {
// 
//     /**
//      *
//      * @return the url of the image
//      */
//     String getUrl();
// 
//     /**
//      *
//      * @param url
//      */
//     void setUrl(String url);
// }
// 
// Path: websnapshot-api/src/main/java/org/asqatasun/websnapshot/entity/dao/UrlDAO.java
// public interface UrlDAO extends GenericDAO<Url, Long> {
// 
//     /**
//      *
//      * @param url
//      * @return
//      */
//     Url findUrlByStringUrl(String url);
// 
//     Long count();
// }


// Path: websnapshot-impl/src/main/java/org/asqatasun/websnapshot/entity/service/UrlDataServiceImpl.java
import javax.persistence.NoResultException;
import org.apache.log4j.Logger;
import org.asqatasun.sdk.entity.service.AbstractGenericDataService;
import org.asqatasun.websnapshot.entity.Url;
import org.asqatasun.websnapshot.entity.dao.UrlDAO;

/*
 * Web-Snapshot
 * Copyright (C) 2008-2017  Asqatasun.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: asqatasun AT asqatasun DOT org
 */
package org.asqatasun.websnapshot.entity.service;


public class UrlDataServiceImpl extends AbstractGenericDataService<Url, Long>
        implements UrlDataService {

    public UrlDataServiceImpl() {
        super();
    }

    @Override
    public Url getUrlFromStringUrl(String url) {
        try {
            return ((UrlDAO) entityDao).findUrlByStringUrl(url);