Package org.jallinone.scheduler.activities.java

Examples of org.jallinone.scheduler.activities.java.ScheduledMachineriesVO


  /**
   * Callback method invoked when the user has clicked on the insert button
   * @param valueObject empty value object just created: the user can manage it to fill some attribute values
   */
  public void createValueObject(ValueObject valueObject) throws Exception {
    ScheduledMachineriesVO vo = (ScheduledMachineriesVO)valueObject;
    ScheduledActivityPK pk = (ScheduledActivityPK)grid.getOtherGridParams().get(ApplicationConsts.SCHEDULED_ACTIVITY_PK);
    vo.setCompanyCodeSys01SCH09(pk.getCompanyCodeSys01SCH06());
    vo.setProgressiveSch06SCH09(pk.getProgressiveSCH06());
    vo.setStartDateSCH09(panel.getActVO().getStartDateSCH06());
    vo.setEndDateSCH09(panel.getActVO().getEstimatedEndDateSCH06());
    vo.setDurationSCH09(panel.getActVO().getEstimatedDurationSCH06());
  }
View Full Code Here


   * @param oldValue old cell value (before cell editing)
   * @param newValue new cell value (just edited)
   * @return <code>true</code> if cell value is valid, <code>false</code> otherwise
   */
  public boolean validateCell(int rowNumber,String attributeName,Object oldValue,Object newValue) {
    ScheduledMachineriesVO vo = (ScheduledMachineriesVO)grid.getVOListTableModel().getObjectForRow(rowNumber);
    if ((attributeName.equals("endDateSCH09")) &&
        newValue!=null && vo.getStartDateSCH09()!=null) {
      vo.setDurationSCH09(new BigDecimal(
        (((java.util.Date)newValue).getTime()-vo.getStartDateSCH09().getTime())/1000/60
      ));
    }
    else if ((attributeName.equals("startDateSCH09")) &&
        newValue!=null && vo.getEndDateSCH09()!=null) {
      vo.setDurationSCH09(new BigDecimal(
        (vo.getEndDateSCH09().getTime()-((java.util.Date)newValue).getTime())/1000/60
      ));
    }
    else if (
        attributeName.equals("durationSCH09") &&
        newValue!=null && vo.getStartDateSCH09()!=null) {
      vo.setEndDateSCH09(new java.sql.Timestamp(
        vo.getStartDateSCH09().getTime()+((BigDecimal)newValue).longValue()*1000*60
      ));
    }
    return true;
}
View Full Code Here

   * @param oldPersistentObjects old value objects, previous the changes
   * @param persistentObjects value objects relatied to the changed rows
   * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
   */
  public Response updateRecords(int[] rowNumbers,ArrayList oldPersistentObjects,ArrayList persistentObjects) throws Exception {
    ScheduledMachineriesVO oldVO = null;
    ScheduledMachineriesVO newVO = null;
    Response res = null;
    for(int i=0;i<oldPersistentObjects.size();i++) {
      oldVO = (ScheduledMachineriesVO)oldPersistentObjects.get(i);
      newVO = (ScheduledMachineriesVO)persistentObjects.get(i);
      if (oldVO.getStartDateSCH09()==null) {
View Full Code Here

TOP

Related Classes of org.jallinone.scheduler.activities.java.ScheduledMachineriesVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.