Skip to content

Mapping

Sonatype Nexus (Releases) Sonatype Nexus (Snapshots)

SADU provides a mapping module to easily register mappings from rows to java objects. Import into your project to use it.

dependencies {
    implementation("de.chojo.sadu", "sadu-mapper", "<version>")
}

Every class that has a registered row mapping can then be passed into the mapAs method during query retrieval.

MappedClass methodMappedClass = query("Select 'test' as test")
        .single()
        .mapAs(MappedClass.class)
        .first()
        .get();