// Path: src/main/java/com/poseidon/exception/DateSqlParseException.java
// public class DateSqlParseException extends PoseidonException {
// 
// 	private static final long serialVersionUID = 2205794616246894466L;
// 
// 
// 	public DateSqlParseException(Throwable cause) {
// 		super(cause);
// 
// 	}
// 
// 	
// 	
// }


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.poseidon.exception.DateSqlParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
package com.poseidon.utils;



public class PoseidonUtils {

    private static final Logger LOGGER = LoggerFactory.getLogger(PoseidonUtils.class);

    public static java.sql.Date convertToDate(String toDate) {

        SimpleDateFormat format = new SimpleDateFormat("dd/mm/yyyy");
        Date parsed;
        java.sql.Date sql = null;
        try {
            parsed = format.parse(toDate);
            sql = new java.sql.Date(parsed.getTime());
        } catch (ParseException e) {
            LOGGER.error("Falha na conversão da data.", e);
// Path: src/main/java/com/poseidon/exception/DateSqlParseException.java
// public class DateSqlParseException extends PoseidonException {
// 
// 	private static final long serialVersionUID = 2205794616246894466L;
// 
// 
// 	public DateSqlParseException(Throwable cause) {
// 		super(cause);
// 
// 	}
// 
// 	
// 	
// }


// Path: src/main/java/com/poseidon/utils/PoseidonUtils.java
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.poseidon.exception.DateSqlParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

package com.poseidon.utils;



public class PoseidonUtils {

    private static final Logger LOGGER = LoggerFactory.getLogger(PoseidonUtils.class);

    public static java.sql.Date convertToDate(String toDate) {

        SimpleDateFormat format = new SimpleDateFormat("dd/mm/yyyy");
        Date parsed;
        java.sql.Date sql = null;
        try {
            parsed = format.parse(toDate);
            sql = new java.sql.Date(parsed.getTime());
        } catch (ParseException e) {
            LOGGER.error("Falha na conversão da data.", e);
            throw new DateSqlParseException(e);