public boolean updateChildren ( boolean bDisplayOption ) { int iMoveMode = DBConstants . SCREEN_MOVE ; ProjectTask recDetailChildren = this . getDetailChildren ( ) ; Date startDate = ( ( DateTimeField ) this . getField ( ProjectTask . START_DATE_TIME ) ) . getDateTime ( ) ; Date endDate = ( ( DateTimeField ) this . getField ( ProjectTask . END_DATE_TIME ) ) . getDateTime ( ) ; try { boolean bFirstRecord = true ; double dOffset = 0 ; recDetailChildren . getListener ( SurveyDatesHandler . class ) . setEnabledListener ( false ) ; ( ( UpdateDependenciesHandler ) recDetailChildren . getListener ( UpdateDependenciesHandler . class ) ) . setMoveSiblingDependents ( false ) ; recDetailChildren . close ( ) ; while ( recDetailChildren . hasNext ( ) ) { recDetailChildren . next ( ) ; Date thisStartDate = ( ( DateTimeField ) recDetailChildren . getField ( ProjectTask . START_DATE_TIME ) ) . getDateTime ( ) ; Date thisEndDate = ( ( DateTimeField ) recDetailChildren . getField ( ProjectTask . END_DATE_TIME ) ) . getDateTime ( ) ; if ( bFirstRecord ) { bFirstRecord = false ; if ( ( thisStartDate == null ) || ( thisEndDate == null ) || ( startDate == null ) || ( endDate == null ) ) break ; if ( thisStartDate . equals ( startDate ) ) break ; dOffset = startDate . getTime ( ) - thisStartDate . getTime ( ) ; if ( ( dOffset >= - 1000 ) && ( dOffset <= 1000 ) ) break ; } recDetailChildren . edit ( ) ; Converter . gCalendar = ( ( DateTimeField ) recDetailChildren . getField ( ProjectTask . START_DATE_TIME ) ) . getCalendar ( ) ; Converter . gCalendar . add ( Calendar . MILLISECOND , ( int ) dOffset ) ; ( ( DateTimeField ) recDetailChildren . getField ( ProjectTask . START_DATE_TIME ) ) . setCalendar ( Converter . gCalendar , bDisplayOption , iMoveMode ) ; recDetailChildren . set ( ) ; } } catch ( DBException ex ) { ex . printStackTrace ( ) ; } finally { recDetailChildren . getListener ( SurveyDatesHandler . class ) . setEnabledListener ( true ) ; ( ( UpdateDependenciesHandler ) recDetailChildren . getListener ( UpdateDependenciesHandler . class ) ) . setMoveSiblingDependents ( true ) ; } return false ; // No update required }
UpdateChildren Method .