Pessoal, como vão?
Estou com uma dúvida em como declarar o código BLOB no meu BEAN. Estou usando:
create table anexos(
ANE_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
ANE_NOME VARCHAR(100),
ANE_CAMINHO TEXT(5000000),
ANE_ARQUIVO BLOB
);
Mas assim estou declarando no meu anexo.java a seguinte forma:
public class Anexo {
int Codigo;
String Nome;
String Caminho;
String Arquivo ;
public int getCodigo() {
return Codigo;
}
public void setCodigo(int Codigo) {
this.Codigo = Codigo;
}
public String getNome() {
return Nome;
}
public void setNome(String Nome) {
this.Nome = Nome;
}
public String getCaminho() {
return Caminho;
}
public void setCaminho(String Caminho) {
this.Caminho = Caminho;
}
public String getArquivo() {
return Arquivo;
}
public void setArquivo(String Arquivo) {
this.Arquivo = Arquivo;
}
}
No caso do String Arquivo; eu devo usar String mesmo? Porque no BD está como BLOB.
Aguardo retorno! Obrigado a todos!