First page Back Continue Last page Graphics

...Continuation of Notes...


Notes:

private CustomerPK createCustomer() throws CreateException {
try {
int iID = getNextID();
_psInsert.setInt(1, _iId);
_psInsert.setString(2, _strLastName);
_psInsert.setString(3, _strFirstName);
_psInsert.executeUpdate();

return new CustomerPK(iID);
}
catch(SQLException se) {
throw new CreateException("Can't create customer: " +
se.getMessage());
}
}


//================================================
// Methods for remote interface
//================================================

// For readonly int _iId property:
public int getId() {
return _iId;
}

// For String _strLastName property:
public String getLastName() {
return _strLastName;
}
public void setLastName(String value) {
_strLastName = value;
}

// For String _strFirstName property:
public String getFirstName() {
return _strFirstName;
}
public void setFirstName(String value) {
_strFirstName = value;
}

// For readonly String fullName property:
public String getFullName() {
return _strFirstName + " " + _strLastName;
}
// Continued...