Code example for PersistentSet

0
	public SetType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { 
		super( typeScope, role, propertyRef, isEmbeddedInXML ); 
	} 
 
	public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { 
		return new PersistentSet(session); 
	} 
 
	public Class getReturnedClass() { 
		return java.util.Set.class; 
	} 
 
	public PersistentCollection wrap(SessionImplementor session, Object collection) { 
		return new PersistentSet( session, (java.util.Set) collection ); 
	} 
 
	public Object instantiate(int anticipatedSize) { 
		return anticipatedSize <= 0 
		       ? new HashSet() 
		       : new HashSet( anticipatedSize + (int)( anticipatedSize * .75f ), .75f ); 
Experience pair programming with AI  Get Codota for Java