@Override
 public void setMigrationPlanId(final SProcessInstance processInstance, final long migrationPlanId)
     throws SProcessInstanceModificationException {
   final EntityUpdateDescriptor descriptor = new EntityUpdateDescriptor();
   descriptor.addField(processInstanceKeyProvider.getMigrationPlanIdKey(), migrationPlanId);
   final long now = System.currentTimeMillis();
   descriptor.addField(processInstanceKeyProvider.getLastUpdateKey(), now);
   updateProcessInstance(processInstance, "set migration plan", descriptor, MIGRATION_PLAN);
 }
 @Override
 public void setStateCategory(
     final SProcessInstance processInstance, final SStateCategory stateCatetory)
     throws SProcessInstanceModificationException {
   final EntityUpdateDescriptor descriptor = new EntityUpdateDescriptor();
   descriptor.addField(processInstanceKeyProvider.getStateCategoryKey(), stateCatetory);
   updateProcessInstance(
       processInstance,
       "update process instance state category",
       descriptor,
       PROCESS_INSTANCE_CATEGORY_STATE);
 }
 private void setProcessState(
     final SProcessInstance processInstance, final ProcessInstanceState state)
     throws SProcessInstanceModificationException {
   final EntityUpdateDescriptor descriptor = new EntityUpdateDescriptor();
   descriptor.addField(processInstanceKeyProvider.getStateIdKey(), state.getId());
   final long now = System.currentTimeMillis();
   switch (state) {
     case COMPLETED:
       descriptor.addField(processInstanceKeyProvider.getEndDateKey(), now);
       break;
     case ABORTED:
       descriptor.addField(processInstanceKeyProvider.getEndDateKey(), now);
       break;
     case CANCELLED:
       descriptor.addField(processInstanceKeyProvider.getEndDateKey(), now);
       break;
     case STARTED:
       descriptor.addField(processInstanceKeyProvider.getStartDateKey(), now);
       break;
     default:
       break;
   }
   descriptor.addField(processInstanceKeyProvider.getLastUpdateKey(), now);
   updateProcessInstance(
       processInstance, "updating process instance state", descriptor, PROCESSINSTANCE_STATE);
 }
 @Override
 public SContactInfoUpdateBuilder updatePhoneNumber(final String phoneNumber) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.PHONE_NUMBER, phoneNumber);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateEmail(final String email) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.EMAIL, email);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateCountry(final String country) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.COUNTRY, country);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateCity(final String city) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.CITY, city);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateAddress(final String address) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.ADDRESS, address);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateBuilding(final String building) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.BUILDING, building);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateIconPath(final String iconPath) {
   descriptor.addField(SApplicationFields.ICON_PATH, iconPath);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateDescription(final String description) {
   descriptor.addField(SApplicationFields.DESCRIPTION, description);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateVersion(final String version) {
   descriptor.addField(SApplicationFields.VERSION, version);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateDisplayName(final String displayName) {
   descriptor.addField(SApplicationFields.DISPLAY_NAME, displayName);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateToken(final String token) {
   descriptor.addField(SApplicationFields.TOKEN, token);
   return this;
 }
 public SApplicationUpdateBuilderImpl(final long updaterUserId) {
   descriptor = new EntityUpdateDescriptor();
   descriptor.addField(SApplicationFields.UPDATED_BY, updaterUserId);
   descriptor.addField(SApplicationFields.LAST_UPDATE_DATE, System.currentTimeMillis());
 }
 @Override
 public SContactInfoUpdateBuilder updateMobileNumber(final String mobileNumber) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.MOBILE_NUMBER, mobileNumber);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateFaxNumber(final String faxNumber) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.FAX_NUMBER, faxNumber);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateState(final String state) {
   descriptor.addField(SApplicationFields.STATE, state);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateRoom(final String room) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.ROOM, room);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateProfileId(final Long profileId) {
   descriptor.addField(SApplicationFields.PROFILE_ID, profileId);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateZipCode(final String zipCode) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.ZIP_CODE, zipCode);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateHomePageId(final Long homePageId) {
   descriptor.addField(SApplicationFields.HOME_PAGE_ID, homePageId);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateState(final String state) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.STATE, state);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateLayoutId(final Long layoutId) {
   descriptor.addField(SApplicationFields.LAYOUT_ID, layoutId);
   return this;
 }
 @Override
 public SContactInfoUpdateBuilder updateWebsite(final String website) {
   descriptor.addField(SContactInfoBuilderFactoryImpl.WEBSITE, website);
   return this;
 }
 @Override
 public SApplicationUpdateBuilder updateThemeId(final Long themeId) {
   descriptor.addField(SApplicationFields.THEME_ID, themeId);
   return this;
 }