1 19 20 package org.apache.cayenne.reflect; 21 22 import java.util.List ; 23 24 import org.apache.cayenne.ValueHolder; 25 import org.apache.cayenne.util.IndexPropertyList; 26 27 33 public class IndexedListProperty extends ListProperty { 34 35 protected String indexPropertyName; 36 37 public IndexedListProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor, 38 Accessor accessor, String reverseName, String indexPropertyName) { 39 40 super(owner, targetDescriptor, accessor, reverseName); 41 this.indexPropertyName = indexPropertyName; 42 } 43 44 47 protected ValueHolder createCollectionValueHolder(Object object) 48 throws PropertyException { 49 List unordered = (List ) super.createCollectionValueHolder(object); 50 return new IndexPropertyList(indexPropertyName, unordered, true); 51 } 52 } 53 | Popular Tags |