class ReferenceAttributeConverter implements AttributeConverter<Reference, String> {

    @Override
    public String convertToDatabaseColumn( Reference attribute )
    {
        return (attribute == null) ? null : (attribute.getType() + SEPARATOR + attribute.getValue());
    }

}