I have java client object exposed to clients something like
public abstract class Vehicle{
string id;
string name;
Enginer engine;
}
public class MotorVehicle extends Vehicle {
int numOfWheels;
}
public class Engine {
Rotor rotor;
Stator stator;
AirGap airgap;
}
Now I have business level layer which is kind of same structure but little different in nature.
public abstract class VehicleBusinessModel{
string id;
string name;
}
public class MotorVehicleBusinessModel extends VehicleBusinessModel {
int numOfWheels;
}
public class EngineBusinessModel {
Rotor rotor;
Stator stator;
AirGap airgap;
Windings windings;
}
What will be best way to validate client structure and then convert to business structure ?
Thanks.