Sorry, I really don't know how to summarize the title of this question. So, the title may not be clear.
I have an action class which performs some business logic.
in the Action Class:
class ActionClass extends ActionSupport{
private Merchandise merchandise;// I want to transfer it to the client
//setter and getter
}
in the Merchandise class:
class Merchandise{
private String name; // I want to transfer it
private String price; //I don't want to transfer it
private String description;//I don't want to transfer it
//setter and getter
}
Now, I need to transfer the merchandise property in ActionClass to the client.
However, in the merchandise property, I want to transfer only the name property while inhibiting the other two properties.
Then how to inhibit the transfer of the other two properties(price and description) in class Merchandise?