Hello guys
To retrieve a record form DDLRecord in liferay 6.2 please follow the below given code.
Here in below code I am retrieving records from DDLRecord according recordId.
here recordId = 11207.
List<DDLRecord> ddlRecords = null;
try {
ddlRecords = DDLRecordLocalServiceUtil.getDDLRecords(-1,Integer.MAX_VALUE);
if (ddlRecords != null) {
for (int i = 0; i <= ddlRecords.size(); i++) {
if( ddlRecords.get(i).getRecordId()==11207)
{
System.out.println(ddlRecords.get(i).getCompanyId());
System.out.println(ddlRecords.get(i).getRecordSetId());
System.out.println(ddlRecords.get(i).getDisplayIndex());
System.out.println(ddlRecords.get(i).getRecordId());
System.out.println(ddlRecords.get(i).getPrimaryKey());
System.out.println(ddlRecords.get(i).getUserId());
System.out.println(ddlRecords.get(i).getClass().toString());
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
0 Comment(s)