* @return
*/
protected static ContentletRelationships createContentletRelationships ( Relationship relationship, Contentlet contentlet, Structure structure, List<Contentlet> contentRelationships ) {
//Create the contentlet relationships
ContentletRelationships contentletRelationships = new ContentletRelationships( contentlet );
boolean hasParent = RelationshipFactory.isParentOfTheRelationship( relationship, structure );
//Adding the relationships records
ContentletRelationships.ContentletRelationshipRecords contentletRelationshipRecords = contentletRelationships.new ContentletRelationshipRecords( relationship, hasParent );
contentletRelationshipRecords.setRecords( contentRelationships );
List<ContentletRelationships.ContentletRelationshipRecords> relationshipsRecords = new ArrayList<ContentletRelationships.ContentletRelationshipRecords>();
relationshipsRecords.add( contentletRelationshipRecords );
contentletRelationships.setRelationshipsRecords( relationshipsRecords );
return contentletRelationships;
}