apache-geode-extensions/src/main/java/org/springframework/geode/pdx/PdxInstanceBuilder.java
/**
	 * Copies the contents of the existing {@link PdxInstance} to a new {@link PdxInstance} built with this Builder.
	 *
	 * @param pdxInstance {@link PdxInstance} to copy.
	 * @return an instance of the {@link PdxInstanceFactory} used to {@link PdxInstanceFactory#create() create}
	 * the {@link PdxInstance}.
	 * @throws IllegalArgumentException if {@link PdxInstance} is {@literal null}.
	 * @see org.apache.geode.pdx.PdxInstance
	 * @see org.apache.geode.pdx.PdxInstanceFactory
	 */
Copies the contents of the existing  PdxInstance to a new  PdxInstance built with this Builder.
@param pdxInstance  PdxInstance to copy.
@return an instance of the  PdxInstanceFactory used to  PdxInstanceFactory#create() create
the  PdxInstance.
Copies the contents of the existing PdxInstance to a new PdxInstance built with this Builder . @param pdxInstance PdxInstance to copy . @return an instance of the PdxInstanceFactory used to PdxInstanceFactory#create () create the PdxInstance .
public PdxInstanceFactory copy(PdxInstance pdxInstance) {
		assertNotNull(pdxInstance, "PdxInstance must not be null");
		PdxInstanceFactory factory = getRegionService().createPdxInstanceFactory(pdxInstance.getClassName());
		nullSafeList(pdxInstance.getFieldNames()).forEach(fieldName -> {
			factory.writeObject(fieldName, pdxInstance.getField(fieldName));
			if (pdxInstance.isIdentityField(fieldName)) {
				factory.markIdentityField(fieldName);
			}
		});
		return factory;
	}
public PdxInstanceFactory copy ( PdxInstance pdxInstance ) { assertNotNull ( pdxInstance , "PdxInstance must not be null" ) ; PdxInstanceFactory factory = getRegionService ( ) . createPdxInstanceFactory ( pdxInstance . getClassName ( ) ) ; nullSafeList ( pdxInstance . getFieldNames ( ) ) . forEach ( fieldName -> { factory . writeObject ( fieldName , pdxInstance . getField ( fieldName ) ) ; if ( pdxInstance . isIdentityField ( fieldName ) ) { factory . markIdentityField ( fieldName ) ; } } ) ; return factory ; }
Copies the contents of the existing {@link PdxInstance} to a new {@link PdxInstance} built with this Builder.
Copies the contents of the existing { @link PdxInstance } to a new { @link PdxInstance } built with this Builder .