KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > cfg > annotations > ArrayBinder


1 package org.hibernate.cfg.annotations;
2
3 import org.hibernate.FetchMode;
4 import org.hibernate.mapping.Array;
5 import org.hibernate.mapping.Collection;
6 import org.hibernate.mapping.PersistentClass;
7
8 import javax.persistence.FetchType;
9
10 /**
11  * Bind an Array
12  * @author Anthony Patricio
13  */

14 public class ArrayBinder extends ListBinder {
15
16     public ArrayBinder() {}
17
18     public void setFetchType(FetchType fetch) {
19         //workaround to hibernate3 bug, remove it once fixed
20
fetchMode = FetchMode.SELECT;
21     }
22
23     protected Collection createCollection(PersistentClass persistentClass) {
24         return new Array(persistentClass);
25     }
26 }
27
Popular Tags