[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Beginner Question



 
i have a question about the example in( %OZONE-HOME%/doc/tutoria/)
 
 GarageApp.java:
==============================================  

if (args[0].equals ("add")) {

Garage garage = (Garage)db.objectForName ("my_garage");

if (garage != null) {

Car car = (Car)db.createObject (CarImpl.class.getName(), 0, null);

car.setName (args[1]);

car.setYearOfConst (new Integer (Integer.parseInt (args[2])));

garage.addCar_update (car);

}

=============================================
 
i'm confuse about why it cannot save in Car object ?
Cause in the line:

Car car = (Car)db.createObject (CarImpl.class.getName(), 0, null);

car.setName (args[1]);

car.setYearOfConst (new Integer (Integer.parseInt (args[2])));

it should save in Car object. And in the line :

garage.addCar_update (car); this save in garage object

TIA