1 package org.hibernate.tuple; 3 4 import java.util.Map ; 5 6 import org.hibernate.mapping.Component; 7 import org.hibernate.mapping.Property; 8 import org.hibernate.property.Getter; 9 import org.hibernate.property.PropertyAccessor; 10 import org.hibernate.property.PropertyAccessorFactory; 11 import org.hibernate.property.Setter; 12 13 16 public class DynamicMapComponentTuplizer extends AbstractComponentTuplizer { 17 18 public Class getMappedClass() { 19 return Map .class; 20 } 21 22 protected Instantiator buildInstantiator(Component component) { 23 return new DynamicMapInstantiator(); 24 } 25 26 public DynamicMapComponentTuplizer(Component component) { 27 super(component); 28 } 29 30 private PropertyAccessor buildPropertyAccessor(Property property) { 31 return PropertyAccessorFactory.getDynamicMapPropertyAccessor(); 32 } 33 34 protected Getter buildGetter(Component component, Property prop) { 35 return buildPropertyAccessor(prop).getGetter( null, prop.getName() ); 36 } 37 38 protected Setter buildSetter(Component component, Property prop) { 39 return buildPropertyAccessor(prop).getSetter( null, prop.getName() ); 40 } 41 42 } 43 | Popular Tags |