Dear AnathaPrakash,
As Per Bosun Bello Suggestion the basic understanding of Unidirectional and bidectional is correct. have glance on with sample examples
Let us Consider Class Employee with name ,age and phone as properties.
Unidirection
public class Employee{
private
String name;
private int age;
private String phone;
private Department dept;
//getters and setters
}
we have Department Class with deptId,deptName,deptLocation as properties of the Department Class.
public class Department{
private String deptId;
private String deptName;
private deptLocation;
//getters and setters
}
In the above
Java class configuration defined department object as property of the employee class then we can conclude that there is mapping exist between Employee and department.i.e., Employee is associated department .then above scenario Every employee is mapped to department ,department doesn't know about Employee,because of department doesn't have any association with Employee(i.e.,Department has no Employee). then it unidirection.
Bidirection:
Consider Class Person
Class Person{
private String fName;
private String lName;
private int age;
private Address address;
//getters and setters;
}
Class Address{
private String doorNo;
private String street;
priavate String city;
private String country;
private Person person;
}
In the above Person class have address and Address can have Person and then we will conclude that that every person has address and each address is mapped to employee so it is birection.