Code example for PersistentCollection

Methods: isDirtywasInitialized

0
 
	public void encode(ExtendedObjectOutput out, Object v) throws IOException, IllegalAccessException {
		JMFPersistentCollectionSnapshot snapshot = null;
 
		PersistentCollection collection = (PersistentCollection)v;
		if (!collection.wasInitialized())
			snapshot = new JMFPersistentCollectionSnapshot(collection instanceof SortedSet || collection instanceof SortedMap, null);
		else if (collection instanceof Map)
			snapshot = new JMFPersistentCollectionSnapshot(true, null, collection.isDirty(), (Map<?, ?>)collection);
		else 
			snapshot = new JMFPersistentCollectionSnapshot(true, null, collection.isDirty(), (Collection<?>)collection);
 
		snapshot.writeExternal(out);
	} 
 
	public boolean canDecode(ExtendedObjectInput in, String className) {
		return clientCollectionClassName.equals(className);
	} 
 
	public String getDecodedClassName(ExtendedObjectInput in, String className) {
Experience pair programming with AI  Get Codota for Java