create or replace type Usuario as object( nome varchar2(100), login varchar2(10), senha varchar2(16), member function getId_usuario return number, member function getNome return varchar2, member function getLogin return varchar2, member function getSenha return varchar2, member procedure setId_usuario, member procedure setNome, member procedure setLogin, member procedure setSenha ); / create or replace type Mensagem as object( titulo varchar2(20), descricao clob, member function getTitulo return varchar2, member function getDescricao return clob, member procedure setTitulo, member procedure setDescricao ); / /** Ele não aceita "extender" de outro objeto */ create or replace type Profissional under Contato( setor varchar2(50), member function getSetor return varchar2, member procedure setSetor )INSTANTIABLE; / create or replace type Familia UNDER Contato( grau varchar2(30), member function getGrau return varchar2, member procedure setGrau )INSTANTIABLE; / create or replace type Amigos under Contato() INSTANTIABLE; OBS.: Não existe mais, o tipo contato eh um amigo!!! / /* * modifiquei pra varray */ create or replace type email_array as varray(5) of varchar2(30); / create or replace type Telefones as object( residencial varchar2(15), celular varchar2(15), comercial varchar2(15), member function getResidencial return varchar2, member function getCelular return varchar2, member function getComercial return varchar2, member procedure setResidencial, member procedure setCelular, member procedure setComercial ); / create or replace type Endereco as object( logradouro varchar2(100), bairro varchar2(30), cidade varchar2(30), cep varchar2(9), estado varchar2(40), pais varchar2(40), member function getLogradouro return varchar2, member function getBairro return varchar2, member function getCidade return varchar2, member function getCep return varchar2, member function getEstado return varchar2, member function getPais return varchar2, member procedure setLogradouro, member procedure setBairro, member procedure setCidade, member procedure setCep, member procedure setEstado, member procedure setPais ); / /* Modifiquei endereco passou a ser chamado : c_end telefone passou a ser chamado: fone foto passou a ser do tipo raw. O tamanho q eu coloquei foi o máximo aceito por raw. (O oracle não reconhece longraw) email passou a ser varray e foto como blob */ create or replace type Contato as object( tipo varchar2(12), nome varchar2(100), email email_array, fone Telefones, foto blob, msn varchar2(30), icq number, aniversario Date, c_end Endereco, member function getTipo return varchar2, member function getNome return varchar2, member function getEmail return email_array, member function getTelefones return Telefones, member function getFoto return blob, member function getMsn return varchar2, member function getIcq return number, member function getAniversario return Date, member function getEndereco return Endereco, member procedure setTipo, member procedure setNome, member procedure setEmail, member procedure setTelefones, member procedure setFoto, member procedure setMsn, member procedure setIcq, member procedure setAniversario, member procedure setEndereco ) NOT FINAL INSTANTIABLE; / /* MOdifiquei Aqui!!*/ create or replace type Hora as object( hora1 number, minuto number, segundo number, member function getHora return number, member function getMinuto return number, member function getSegundo return number, member procedure setHora, member procedure setMinuto, member procedure setSegundo ); / /* MOdifiquei : c_data e c_hora realizado char(1) : pode ser s ou n - boolean não é aceito */ create or replace type Compromissos as object( c_data date, c_hora Hora, realizado char(1), descricao clob, tipo varchar2(12), member function getData return date, member function getHora return hora, member function getRealizado return boolean, member function getDescricao return clob, member function getTipo return varchar2, member procedure setData, member procedure setHora, member procedure setRealizado, member procedure setDescricao, member procedure setTipo ); / /***********MUDEI PRA VARRAY*******************************/ create or replace type Telefone_array as varray(10) of varchar2(15); / /**************AUMENTEI AQUI**********************/ /******MUDEI O TELEFONE AQUI**********************/ /********MUDEI PRA ENDER o ENDERECO*************/ create or replace type Servicos as object( descricao clob, ender Endereco, categoria varchar2(50), telefones Telefone_array, member function getDescricao return clob, member function getEndereco return Endereco, member function getCategoria return varchar2, member function getTelefones return Telefone_array, member procedure setDescricao, member procedure setEndereco, member procedure setCategoria, member procedure setTelefones ); /