BigDecimal id = null;
if (conn!=null) {
Location thisLocation = this;
CallableStatement cstmt =
conn.prepareCall("{ ? = call " + getSQLTypeName() + ".GET_ID( ) }");
cstmt.registerOutParameter(1, Types.NUMERIC);
cstmt.execute();
id = cstmt.getBigDecimal(1);
}
return id;