/** * PUBLIC: * This is a helper method to get the object class from the value converter * if it is a TypeConversionConverter. * This returns null if not using a TypeConversionConverter value converter. */ public Class getValueClass() { if (!(getValueConverter() instanceof TypeConversionConverter)) { return null; } return ((TypeConversionConverter)getValueConverter()).getObjectClass(); }
/** * INTERNAL: * Initialize and validate the mapping properties. */ public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); initializeDirectKeyField(session); initializeContainerPolicy(session); if (getKeyConverter() != null) { getKeyConverter().initialize(this, session); } if (getValueConverter() != null) { getValueConverter().initialize(this, session); } }
if (getValueConverter() != null) { referenceValue = getValueConverter().convertDataValueToObjectValue(referenceValue, query.getSession());
/** * set the key and value fields that are used to build the container from database rows */ protected void initializeContainerPolicy(AbstractSession session) { ((DirectMapContainerPolicy)getContainerPolicy()).setKeyField(getDirectKeyField()); ((DirectMapContainerPolicy)getContainerPolicy()).setValueField(getDirectField()); ((DirectMapContainerPolicy)getContainerPolicy()).setKeyConverter(getKeyConverter()); ((DirectMapContainerPolicy)getContainerPolicy()).setValueConverter(getValueConverter()); }
key = getKeyConverter().convertObjectValueToDataValue(key, writeQuery.getSession()); if (getValueConverter() != null){ value = getValueConverter().convertObjectValueToDataValue(value, writeQuery.getSession());
key = getKeyConverter().convertObjectValueToDataValue(key, query.getSession()); if (getValueConverter() != null) { value = getValueConverter().convertObjectValueToDataValue(value, query.getSession());