All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buschmais.xo.neo4j.remote.impl.converter.RemoteParameterConverter Maven / Gradle / Ivy

The newest version!
package com.buschmais.xo.neo4j.remote.impl.converter;

import com.buschmais.xo.api.XOException;
import com.buschmais.xo.neo4j.remote.impl.model.AbstractRemotePropertyContainer;
import com.buschmais.xo.neo4j.spi.helper.TypeConverter;

public class RemoteParameterConverter implements TypeConverter {

    @Override
    public Class getType() {
        return AbstractRemotePropertyContainer.class;
    }

    @Override
    public Object convert(Object value) {
        if (value instanceof AbstractRemotePropertyContainer) {
            return ((AbstractRemotePropertyContainer) value).getId();
        }
        throw new XOException("Unsupported value " + value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy