java best practice or are there any design patterns to keep data filed which hasn't a direct relationship with that class

I just want to pass the value with the object but that value is not completely related to that object. Let's say there is an object call Request Data

public class RequestData


private int requestId;

private String status;



I want to pass is this request need to save only or print only or both save and print likewise there are several actions. When I pass this request data to another class to validate this requestData, I want to identify is it coming from save or print or save and print call. For that, basically,...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts