R-Knowsys/eApp — pull request #25 by laxminarayanav (2014-10-10 14:09:37+00:00)
Title: Added 'ReportingMethods-portlet' ,  'TerminationReasons-portlet' and 'Employeelist-portlet'

Steps to follow:

For 'ReportingMethods-portlet' and 'TerminationReasons-portlet'.

i)Update the service.xml file and build the services.It will generate all the required classes.
ii)Deploy the services-portlet. It will create the tables in database.
iii)Update the 'ReportingMethods-portlet' and 'TerminationReasons-portlet' and deploy the portlets using Ant build.It will generate the 'services-portlet-service.jar' in the lib folder. And Run the portlets

For Employeelist-portlet:

i)Update the service.xml file.
ii)Create view table 'empdetails' in database.This view table gets the records from 'emp_personal_details', 'emp_job', 'job_title', 'employment_status', 'sub_unit','emp_supervisor'.

Query for creating view table:

DELIMITER $$

USE `hrm`$$

DROP VIEW IF EXISTS `empdetails`$$

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `empdetails` AS (
SELECT
`e`.`employeeId` AS `EmployeeId`,
`d`.`firstName` AS `FirstName`,
`d`.`lastName` AS `LastName`,
`t`.`title` AS `JobTitle`,
`es`.`employmentstatus` AS `EmployementStatus`,
`su`.`name` AS `SubUnit`,
`ep`.`firstName` AS `Supervisor`
FROM (((((((`employee` `e`
JOIN `emp_personal_details` `d`)
JOIN `emp_job` `j`)
JOIN `job_title` `t`)
JOIN `employment_status` `es`)
JOIN `sub_unit` `su`)
JOIN `emp_supervisor` `esr`)
JOIN `emp_personal_details` `ep`)
WHERE ((`e`.`employeeId` = `d`.`employeeId`)
AND (`e`.`employeeId` = `j`.`employeeId`)
AND (`j`.`jobTitleId` = `t`.`jobTitleId`)
AND (`j`.`employmentStatusId` = `es`.`employmentStatusId`)
AND (`j`.`subUnitId` = `su`.`subUnitId`)
AND (`e`.`employeeId` = `esr`.`employeeId`)
AND (`esr`.`reporterEmployeeId` = `ep`.`employeeId`)))$$

DELIMITER ;

iii)Update 'EmpDetailsFinderImpl' and 'EmpDetailslocalserviceImpl' classes in services-portlet and build the services. And deploy the 'services-portlet'.
iv) Update 'Employeelist-portlet' and deploy the portlet using Ant build. And run the portlet.