package com.ejie.ad74a.dao;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * DocumentosMedicosDaoSql generated by UDA, 05-nov-2024 8:45:47.
 * @author UDA
 */
@Repository
@Transactional
public class DocumentosMedicosDaoSql{
	public static final String TABLA = "DOCUMENTOS_MEDICOS";
	public static final String ALIAS_DOCUMENTOSMEDICOS = " DOCUMENTOSMEDICOS";
	public static final String ID_TABLA = "ID_EXPEDIENTE_00";
	public static final String ALIAS_ID_TABLA = "IDEXPEDIENTE00";

	public static final String SQL_SELECT = "SELECT "
		 + DocumentosMedicosDaoSql.ALIAS_DOCUMENTOSMEDICOS + ".ID_EXPEDIENTE_00 IDEXPEDIENTE00,"
		 + DocumentosMedicosDaoSql.ALIAS_DOCUMENTOSMEDICOS + ".OIDDOKUSI_18 OIDDOKUSI18,"
		 + DocumentosMedicosDaoSql.ALIAS_DOCUMENTOSMEDICOS + ".NOMBRE_DOC_18 NOMBREDOC18";

	public static final String SQL_UPDATE = "UPDATE "
		+ DocumentosMedicosDaoSql.TABLA
		+ " SET"
		+ " OIDDOKUSI_18 = ?,"
		+ " NOMBRE_DOC_18 = ? "
		+ " WHERE ID_EXPEDIENTE_00 = ? ";

	public static final String SQL_INSERT="INSERT INTO "
		+ DocumentosMedicosDaoSql.TABLA
		+ "(ID_EXPEDIENTE_00, OIDDOKUSI_18, NOMBRE_DOC_18) "
		+ " VALUES "
		+ " (?, ?, ?)";
	
	public static final String SQL_FROM = " FROM "
		+ DocumentosMedicosDaoSql.TABLA + DocumentosMedicosDaoSql.ALIAS_DOCUMENTOSMEDICOS;		
		

	public static final String SQL_WHERE_ALL = " WHERE 1=1 ";

						
	public static final String SQL_WHERE = DocumentosMedicosDaoSql.ALIAS_DOCUMENTOSMEDICOS + "." + DocumentosMedicosDaoSql.ID_TABLA + " = ? ";

	public static final String SQL_SELECT_COUNT = "SELECT COUNT(1)";

	public static final String SQL_FIND = SQL_SELECT + SQL_FROM + SQL_WHERE_ALL + " AND " + SQL_WHERE;

	public static final String SQL_FIND_ALL = SQL_SELECT + SQL_FROM;

	public static final String SQL_FIND_ALL_COUNT = SQL_SELECT_COUNT + SQL_FROM;


	public static final String SQL_DELETE = "DELETE FROM "
		+ TABLA + " "
		+ DocumentosMedicosDaoSql.ALIAS_DOCUMENTOSMEDICOS + " "
		+ " WHERE "
		+ SQL_WHERE;
}

