Обсуждение: getObject and userDefined dataTypes

Поиск
Список
Период
Сортировка

getObject and userDefined dataTypes

От
Assad Jarrahian
Дата:
Hi all,
   I have a question regarding userdefinedtype columns and retieving them.

I have in the db:
I have a db type called address.
CREATE TYPE address AS
   (bldgname varchar,
    bldgzone varchar,
    bldgfloor varchar,
    bldgroom varchar,
    street varchar,
    crossing1 varchar,
    crossing2 varchar,
    city varchar,
    state varchar,
    zip varchar,
    district varchar,
    county varchar,
    country varchar,
    countrycode varchar,
    phonenumber varchar,
    ext varchar,
    url varchar);

I also have a java class called  Address (exact same thing) that I am
trying to read the data into.

Currently I am using
SELECT  all_the_other_columns, (address).bldgname , (address).bldgzone ....
and then I  use  the Address class set methods

would it be easier/more-efficient to do this using getObject or
something else. If so, how?

much thanks in advance.

-assad