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

org.vertexium.VertexiumSerializer Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium;

public interface VertexiumSerializer {
    byte[] objectToBytes(Object object);

     T bytesToObject(byte[] bytes);

    default  T bytesToObject(ElementType elementType, String elementId, byte[] bytes) {
        try {
            return bytesToObject(bytes);
        } catch (Exception ex) {
            throw new VertexiumException("Could not deserialize: " + elementType + ":" + elementId, ex);
        }
    }

    default  T bytesToObject(Element sourceElement, byte[] bytes) {
        try {
            return bytesToObject(bytes);
        } catch (Exception ex) {
            throw new VertexiumException("Could not deserialize: " + sourceElement, ex);
        }
    }

    default  T bytesToObject(ExtendedDataRowId rowId, byte[] bytes) {
        try {
            return bytesToObject(bytes);
        } catch (Exception ex) {
            throw new VertexiumException("Could not deserialize: " + rowId, ex);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy