/** * PUBLIC: * Set the class each element in the database row's * collection should be converted to, before the collection * is inserted into the database. * This is optional - if left null, the elements will be added * to the database row's collection unconverted. */ public void setFieldElementClass(Class fieldElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setDataClass(fieldElementClass); }
/** * PUBLIC: * Set the class each element in the object's * collection should be converted to, before the collection * is inserted into the object. * This is optional - if left null, the elements will be added * to the object's collection unconverted. */ public void setAttributeElementClassName(String attributeElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setObjectClassName(attributeElementClass); }
/** * PUBLIC: * Set the class each element in the database row's * collection should be converted to, before the collection * is inserted into the database. * This is optional - if left null, the elements will be added * to the database row's collection unconverted. */ public void setFieldElementClass(Class fieldElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setDataClass(fieldElementClass); }
/** * PUBLIC: * Set the class each element in the object's * collection should be converted to, before the collection * is inserted into the object. * This is optional - if left null, the elements will be added * to the object's collection unconverted. */ public void setAttributeElementClass(Class attributeElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setObjectClass(attributeElementClass); }
/** * PUBLIC: * Set the class each element in the object's * collection should be converted to, before the collection * is inserted into the object. * This is optional - if left null, the elements will be added * to the object's collection unconverted. */ public void setAttributeElementClass(Class attributeElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setObjectClass(attributeElementClass); }
/** * PUBLIC: * Set the class each element in the object's * collection should be converted to, before the collection * is inserted into the object. * This is optional - if left null, the elements will be added * to the object's collection unconverted. */ public void setAttributeElementClass(Class attributeElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setObjectClass(attributeElementClass); }
/** * PUBLIC: * Set the class each element in the object's * collection should be converted to, before the collection * is inserted into the object. * This is optional - if left null, the elements will be added * to the object's collection unconverted. */ public void setAttributeElementClassName(String attributeElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setObjectClassName(attributeElementClass); }
/** * PUBLIC: * Set the class each element in the database row's * collection should be converted to, before the collection * is inserted into the database. * This is optional - if left null, the elements will be added * to the database row's collection unconverted. */ public void setFieldElementClass(Class fieldElementClass) { TypeConversionConverter converter; if (getValueConverter() instanceof TypeConversionConverter) { converter = (TypeConversionConverter)getValueConverter(); } else { converter = new TypeConversionConverter(); setValueConverter(converter); } converter.setDataClass(fieldElementClass); }
/** * INTERNAL: */ protected void setConverter(DatabaseMapping mapping, Converter converter, boolean isForMapKey) { if (mapping.isDirectMapMapping() && isForMapKey) { ((DirectMapMapping) mapping).setKeyConverter(converter); } else if (mapping.isDirectCollectionMapping()) { ((DirectCollectionMapping) mapping).setValueConverter(converter); } else if (mapping instanceof AbstractCompositeDirectCollectionMapping) { ((AbstractCompositeDirectCollectionMapping) mapping).setValueConverter(converter); } else if (mapping.isAggregateCollectionMapping()) { // TODO: Be nice to support converters on AggregateCollections keys. // For now they are silently ignored. } else if (mapping.isDirectToFieldMapping()) { ((AbstractDirectMapping) mapping).setConverter(converter); } }
((AbstractCompositeDirectCollectionMapping)nextMapping).setValueConverter(converter);
((AbstractCompositeDirectCollectionMapping)nextMapping).setValueConverter(converter);
((AbstractCompositeDirectCollectionMapping)nextMapping).setValueConverter(converter);