mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/observation/RetrieveDeleteObsHelperImpl.java
private Message requestBuilderHelper(final boolean isRemoveRequest, final Query.Builder builder)
    {
        if (m_IsRetrieveDeleteByDate && m_EndDate != null && m_StartDate != null)
        {
            final Date endDate = DateTimeConverterUtil.roundToEndOfSecond(m_EndDate);
            final TimeConstraintData dates = TimeConstraintData.newBuilder().
                    setStartTime(m_StartDate.getTime()).
                    setStopTime(endDate.getTime()).build();
            
            builder.setCreatedTimeRange(dates);
        }
        //removal
        if (isRemoveRequest)
        {
            return RemoveObservationRequestData.newBuilder().setObsQuery(builder.build()).build();
        }
        //if max obs is needed too
        if (m_IsRetrieveByMaxObsNum && m_ObservationNumber > 0)
        {
            builder.setMaxNumberOfObs(m_ObservationNumber);
        }
        return GetObservationRequestData.newBuilder().setObsQuery(builder.build()).build();
    }
/**
     * Helper that builds either a remove observation request or a get observation request with or without time
     * constraints based on the given input.
     * 
     * @param isRemoveRequest
     *            <code>true</code> if the method should build a remove observation request. <code>false</code> if the
     *            method should build a get observation request.
     * @param builder
     *            builder used to create a query 
     * @return a remove observation request or a get observation request based on the given input
     */
Helper that builds either a remove observation request or a get observation request with or without time
constraints based on the given input.

@param isRemoveRequest
true if the method should build a remove observation request. false if the
method should build a get observation request.
@param builder
builder used to create a query
@return a remove observation request or a get observation request based on the given input
Helper that builds either a remove observation request or a get observation request with or without time constraints based on the given input . @param isRemoveRequest true if the method should build a remove observation request . false if the method should build a get observation request . @param builder builder used to create a query @return a remove observation request or a get observation request based on the given input
private Message requestBuilderHelper(final boolean isRemoveRequest, final Query.Builder builder)
    {
        if (m_IsRetrieveDeleteByDate && m_EndDate != null && m_StartDate != null)
        {
            final Date endDate = DateTimeConverterUtil.roundToEndOfSecond(m_EndDate);
            final TimeConstraintData dates = TimeConstraintData.newBuilder().
                    setStartTime(m_StartDate.getTime()).
                    setStopTime(endDate.getTime()).build();
            builder.setCreatedTimeRange(dates);
        }
        if (isRemoveRequest)
        {
            return RemoveObservationRequestData.newBuilder().setObsQuery(builder.build()).build();
        }
        if (m_IsRetrieveByMaxObsNum && m_ObservationNumber > 0)
        {
            builder.setMaxNumberOfObs(m_ObservationNumber);
        }
        return GetObservationRequestData.newBuilder().setObsQuery(builder.build()).build();
    }
private Message requestBuilderHelper ( final boolean isRemoveRequest , final Query . Builder builder ) { if ( m_IsRetrieveDeleteByDate && m_EndDate != null && m_StartDate != null ) { final Date endDate = DateTimeConverterUtil . roundToEndOfSecond ( m_EndDate ) ; final TimeConstraintData dates = TimeConstraintData . newBuilder ( ) . setStartTime ( m_StartDate . getTime ( ) ) . setStopTime ( endDate . getTime ( ) ) . build ( ) ; builder . setCreatedTimeRange ( dates ) ; } if ( isRemoveRequest ) { return RemoveObservationRequestData . newBuilder ( ) . setObsQuery ( builder . build ( ) ) . build ( ) ; } if ( m_IsRetrieveByMaxObsNum && m_ObservationNumber > 0 ) { builder . setMaxNumberOfObs ( m_ObservationNumber ) ; } return GetObservationRequestData . newBuilder ( ) . setObsQuery ( builder . build ( ) ) . build ( ) ; }
Helper that builds either a remove observation request or a get observation request with or without time
 constraints based on the given input.
Helper that builds either a remove observation request or a get observation request with or without time constraints based on the given input .
//removal //if max obs is needed too