RestoreFieldProperties Method.
179231
public void restoreFieldProperties(PropertiesField fldProperties)
    {
        if (fldProperties == null)
            return;
        try {
            // This may seem a little wierd, but by doing this, I won't change the field if there was no change.
            Map<String,Object> properties = fldProperties.getProperties();
            this.close();
            while (this.hasNext())
            {
                this.next();
                String strKey = this.getField(PropertiesInput.KEY).getString();
                String strValue = this.getField(PropertiesInput.VALUE).getString();
                if (strValue != null)
                    if (strValue.length() > 0)
                {
                    fldProperties.setProperty(strKey, strValue);
                    properties.remove(strKey);
                }
            }
            Iterator<String> iterator = properties.keySet().iterator();
            while (iterator.hasNext())
            {
                String strKey = iterator.next();
                fldProperties.setProperty(strKey, null);
            }
        } catch (DBException ex) {
            ex.printStackTrace();
        }
    }
1049656
def _get_field_method(self, tp):
        """"""
        method = self.field_constructor.get(tp)
        if method and hasattr(self, method.__name__):
            return getattr(self, method.__name__)
        return method
559672
public void resetFields()
    {
        for (int iFileSeq = 0; ; iFileSeq++)
        {
            FieldList fieldList = this.getFieldList(iFileSeq);
            if (fieldList == null)
                break;
            for (int iFieldSeq = 0; ; iFieldSeq++)
            {
                Converter converter = fieldList.getField(iFieldSeq);
                if (converter == null)
                    break;
                FieldInfo field = converter.getField();
                field.initField(Constants.DISPLAY);   // Init the field and display
            }
        }
    }
28668
def process_fields(self, fields):
		""""""
		
		result = []
		strip = ''.join(self.PREFIX_MAP)
		
		for field in fields:
			direction = self.PREFIX_MAP['']
			
			if field[0] in self.PREFIX_MAP:
				direction = self.PREFIX_MAP[field[0]]
				field = field.lstrip(strip)
			
			result.append((field, direction))
		
		return result
173255
private void restore() {
    Preferences pref = Preferences
        .userNodeForPackage(ConnectionDialog.class);

    getHostField().setText(pref.get("host", "localhost"));
    getUserField().setText(pref.get("user", "guest"));

    boolean remember = pref.getBoolean("remember", false);
    boolean passwordSet = false;
    getRememberPasswordCheckBox().setSelected(remember);
    if (remember) {
      byte[] cipherText = pref.getByteArray("password", null);
      if (cipherText != null) {
        try {
          Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
          KeyGenerator keygen = KeyGenerator.getInstance("AES");
          SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
          random.setSeed(new byte[]{
            0x60, (byte) 0xFD, 0x28, 0x07, 0x35, 0x4A, 0x0D, 0x3B
          });
          byte[] iv = new byte[16];
          random.nextBytes(iv);
          IvParameterSpec spec = new IvParameterSpec(iv);
          keygen.init(128, random);
          cipher.init(Cipher.DECRYPT_MODE, keygen.generateKey(), spec);
          byte[] clearText = cipher.doFinal(cipherText);
          String password = new String(clearText);
          getPasswordField().setText(password);
          passwordSet = true;
        } catch (Exception e) {
          logger.error("Could not decrypt password", e);
        }
      }
    }
    if (!passwordSet) {
      getPasswordField().setText("");
    }
  }
590684
public static void restorePropertyAsNeeded(final String propName, final String oldPropValue, final String newPropValue) {
        java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {
            @Override
            public Object run() {
                if (oldPropValue == null) {
                    System.clearProperty(propName);
                } else if (!oldPropValue.equalsIgnoreCase(newPropValue)) {
                    System.setProperty(propName, oldPropValue);
                }
                return null;
            }
        });
        if (tc.isDebugEnabled())
            Tr.debug(tc, "Restore property " + propName + " to previous value: " + oldPropValue);
    }
519480
@Override
	public void afterPropertiesSet() {

		if (this.mappingContext == null) {
			this.mappingContext = new SimpleSolrMappingContext(
					new SolrPersistentEntitySchemaCreator(this.solrClientFactory).enable(this.schemaCreationFeatures));
		}

		if (this.solrConverter == null) {
			this.solrConverter = getDefaultSolrConverter();
		}

		this.queryParsers = new QueryParsers(this.mappingContext);
		registerPersistenceExceptionTranslator();
	}
802746
def restore_descriptor(self, converted_descriptor):
        

        # Convert
        fields = []
        for field in converted_descriptor['fields']:
            field_type = self.restore_type(field['type'])
            resfield = {
                'name': field['name'],
                'type': field_type,
            }
            if field.get('mode', 'NULLABLE') != 'NULLABLE':
                resfield['constraints'] = {'required': True}
            fields.append(resfield)
        descriptor = {'fields': fields}

        return descriptor
128069
public void restoreSystemEnvironment() {
        if (systemProperties == null)
            throw new NullPointerException("Must call SecurityDomain.setDomainEnvironment() first to record existing System environment");
        if (System.getProperty(SET_DOMAIN_ENVIRONMENT) != null) {
            logger.debug("Swapping back to original System environment properties values");
            for (int i = 0; i < ENVNAMES.length; i++) {
                setOrClearSystemProperties(ENVNAMES[i], systemProperties);
            }
        }
    }
225178
private void processSimpleField(Field child) {
    PropertyMetadata propertyMetadata = IntrospectionUtils.getPropertyMetadata(child);
    if (propertyMetadata != null) {
      // Process override
      processPropertyOverride(propertyMetadata);
      metadata.putPropertyMetadata(propertyMetadata);
    }
  }
822020
public function resetProperties() {
    $this->mode = $this->columns = $this->where = $this->values = $this->data = null;
  }
28960
private void processSimpleField(Field field) {
    PropertyMetadata propertyMetadata = IntrospectionUtils.getPropertyMetadata(field);
    if (propertyMetadata != null) {
      metadata.putPropertyMetadata(propertyMetadata);
    }
  }
823075
public void restoreCurrentRecord(FieldList fieldList)
    {
        m_buffCurrentLockedData.bufferToFields(fieldList, Constants.DONT_DISPLAY, Constants.READ_MOVE);

        int iColumnCount = this.getColumnCount();
        for (int i = 0; i < iColumnCount; i++)
        {   // Cache the non-field data
            Field field = null;
            if (this.getFieldInfo(i) != null)
                field = this.getFieldInfo(i).getField();
            if ((field != null) && (field.getRecord() != fieldList))
                field.setString(m_buffCurrentLockedData.getNextString(), Constants.DONT_DISPLAY, Constants.READ_MOVE);
        }
    }
491500
public void resetFields()
    {
        super.resetFields();
        for (int iRow = 0; iRow < m_vComponentCache.size(); iRow++)
        {
            ComponentCache componentCache = (ComponentCache)m_vComponentCache.elementAt(iRow);
            if (componentCache != null)
            {
                for (int iColumnIndex = 0; iColumnIndex < componentCache.m_rgcompoments.length; iColumnIndex++)
                {
                    if (componentCache.m_rgcompoments[iColumnIndex] != null)
                    {
                        if (componentCache.m_rgcompoments[iColumnIndex] instanceof JTextComponent)
                            ((JTextComponent)componentCache.m_rgcompoments[iColumnIndex]).setText("");
                        else if (componentCache.m_rgcompoments[iColumnIndex] instanceof JCheckBox)
                            ((JCheckBox)componentCache.m_rgcompoments[iColumnIndex]).setSelected(false);
                    }
                }
            }
        }
    }
60655
public void retrieveValue()
    {
        BaseField field = this.getOwner();
        RecordOwner recordOwner = field.getRecord().getRecordOwner();
        if (recordOwner instanceof ComponentParent)
        {
            String strValue = recordOwner.getProperty(field.getFieldName());
            if (strValue != null)
            {
                boolean[] rgbEnabled = field.setEnableListeners(false);
                field.setString(strValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE);
                field.setEnableListeners(rgbEnabled);
            }
            m_recordOwnerCache = (ComponentParent)recordOwner;
        }
    }
542297
public void saveValue()
    {
        PropertyOwner pRegistration = this.retrieveUserProperties();
        if (pRegistration != null) if (pRegistration instanceof UserProperties)
            ((UserProperties)pRegistration).saveField(this.getOwner());
    }
1246726
private static Field getDeclaredField(Object object, String fieldName) throws NoSuchFieldException {
        Assert.notNull(object);
        return getDeclaredField(object.getClass(), fieldName);
    }