import java.math.*;
import java.sql.*;
public class Location extends JLocation {
private Connection conn = null;
public Location() {
super();
}
public Location(Connection conn) {
super();
setConnection(conn);
}
public BigDecimal getId() throws SQLException {
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;
}
public void setConnection(Connection conn) {
this.conn = conn;
}
}
|