Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Treeverse LakeFS Java SDK Data Models

From Leeroopedia


Knowledge Sources
Domains Java_SDK, Data_Model, Code_Generation
Last Updated 2026-02-08 00:00 GMT

Overview

Design pattern for auto-generated, type-safe Java data transfer objects that map 1:1 to lakeFS API request and response schemas.

Description

The lakeFS Java SDK model layer consists of auto-generated classes produced by OpenAPI Generator. Each model class represents a JSON schema from the lakeFS OpenAPI specification, providing type-safe getters and setters, JSON serialization via Gson, and validation logic. These models form the data contract between Java clients and the lakeFS server.

Usage

Apply this principle when exchanging data with lakeFS API endpoints through the Java SDK. Model classes are used as method parameters (request bodies) and return types (response bodies) across all API classes.

Theoretical Basis

The data model pattern follows the Data Transfer Object (DTO) design pattern:

  1. Each API schema maps to exactly one Java class.
  2. Fields use @SerializedName annotations for JSON mapping.
  3. Type adapters handle complex types (dates, enums, nested objects).
  4. equals, hashCode, and toString are generated for consistency.

This ensures compile-time type safety and eliminates manual JSON parsing.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment