@Persist public void prepare() { saltEncoded = (salt != null) ? StringUtil.toHex(salt) : null; }
@Persist public void prepare() { repoIdEncoded = (repoId != null) ? StringUtil.toHex(repoId) : null; }
@Persist void initSerialization() { //don't save the value expression ve = null; } }
@Persist void beforeSerialization() { if (min > Integer.MIN_VALUE) { minOrNull = min; } if (max < Integer.MAX_VALUE) { maxOrNull = max; } } }
@Persist void beforeSerialization() { if (min > Double.NEGATIVE_INFINITY) { minOrNull = min; } if (max < Double.POSITIVE_INFINITY) { maxOrNull = max; } } }
@SuppressWarnings("unused") @Persist private void persist() { partId = (part == null ? null : part.getId()); }
@Persist public void persist() { if (actuator != null) { actuatorId = actuator.getId(); } }
/** * Converts attribute values to {@link ISimpleXmlWrapper}s for serialization. */ @Persist private void convertAttributeValuesToStrings() { overridenAttributeValuesForSerialization = new TreeMap<String, SimpleXmlWrapperValue>( String.CASE_INSENSITIVE_ORDER); overridenAttributeValuesForSerialization.putAll(SimpleXmlWrappers .wrap(overridenAttributeValues)); }
@Persist private void initSerialization() { //disconnect from beandefinition to be serializable if (plugins != null) { for (IConnector p : plugins) { LOG.info("disconnecting plugin " + p + " from " + this); p.disconnect(this); } } }
@Persist void beforeSerialization() { indexPath = value.getDirectory().toAbsolutePath().toString(); }
@Persist protected void initSerialization() { super.initDeserialization(); if (nodes != null) { nodes.clear(); } }
@Persist private void initSerialization() { //simple-xml has problems on deserializing anonymous classes if (format != null && format.getClass().isAnonymousClass()) { format = null; } //the enum values should not be persisted if (Enum.class.isAssignableFrom(getType())) { allowedValues = null; } }
@Persist private void initSerialization() { //remove copied entries of systeminitmap - if it is not the systemInitMap itself! if (initMap != null && initMap != systemInitMap) { MapUtil.removeAll(initMap, systemInitMap.keySet()); } else { initMap = null; } }
@Persist private void persist() { packageId = (packag == null ? null : packag.getId()); }
@Persist public void persist() { partId = part == null ? null : part.getId(); }
/** * Updates base attribute value set ids before persisting. */ @Persist private void updateBaseAttributeValueSetIds() { // There won't be too many attribute values sets, so nested loops should be fine outer: for (final AttributeValueSet attributeValueSet : attributeValueSets .values()) { if (attributeValueSet.baseAttributeValueSet == null) { continue; } for (final Map.Entry<String, AttributeValueSet> entry : attributeValueSets .entrySet()) { if (attributeValueSet.baseAttributeValueSet == entry.getValue()) { attributeValueSet.baseAttributeValueSetId = entry.getKey(); continue outer; } } } }
@Persist private void persist() { cameraMatrix.get(0, 0, cameraMatrixArr); distortionCoefficients.get(0, 0, distortionCoefficientsArr); }
@Persist private void beforeSerialization() { forSerialization = ListUtils.asArrayList(SimpleXmlWrappers.wrap(values)); }
@Persist private void beforeSerialization() { forSerialization = MapUtils.asHashMap(SimpleXmlWrappers.wrap(map)); }
@SuppressWarnings("unused") @Persist private void persist() throws IOException { if (templateImageDirty) { File file = null; if (templateImageName != null) { file = Configuration.get().getResourceFile(this.getClass(), templateImageName); } else { file = Configuration.get().createResourceFile(this.getClass(), "tmpl_", ".png"); templateImageName = file.getName(); } ImageIO.write(templateImage, "png", file); templateImageDirty = false; } }