public Synchronizer(ODataEntry odata_entry) throws ODataException {
  Map<String,Object> props=odata_entry.getProperties();
  String label=(String)props.get(SynchronizerEntitySet.LABEL);
  String schedule=(String)props.get(SynchronizerEntitySet.SCHEDULE);
  String request=(String)props.get(SynchronizerEntitySet.REQUEST);
  String service_url=(String)props.get(SynchronizerEntitySet.SERVICE_URL);
  if (schedule == null || schedule.isEmpty() || service_url == null || service_url.isEmpty()) {
    throw new ODataException("Missing required parameter");
  }
  if (request != null && !request.equals("start") && !request.equals("stop")) {
    throw new ODataException("Unknown request " + request);
  }
  try {
    this.syncConf=SYNCHRONIZER_SERVICE.createSynchronizer(label,"ODataProductSynchronizer",schedule);
    updateFromEntry(odata_entry);
  }
 catch (  ParseException e) {
    throw new ODataException(e);
  }
}

public Synchronizer ( ODataEntry odata_entry ) throws ODataException { Map < String , Object > props = odata_entry . getProperties ( ) ; String label = ( String ) props . get ( SynchronizerEntitySet . LABEL ) ; String schedule = ( String ) props . get ( SynchronizerEntitySet . SCHEDULE ) ; String request = ( String ) props . get ( SynchronizerEntitySet . REQUEST ) ; String service_url = ( String ) props . get ( SynchronizerEntitySet . SERVICE_URL ) ; if ( schedule == null || schedule . isEmpty ( ) || service_url == null || service_url . isEmpty ( ) ) { throw new ODataException ( "Missing required parameter" ) ; } if ( request != null && ! request . equals ( "start" ) && ! request . equals ( "stop" ) ) { throw new ODataException ( "Unknown request " + request ) ; } try { this . syncConf = SYNCHRONIZER_SERVICE . createSynchronizer ( label , "ODataProductSynchronizer" , schedule ) ; updateFromEntry ( odata_entry ) ; } catch ( ParseException e ) { throw new ODataException ( e ) ; } }
creates an new synchronizer from the given odataentry .
