class TripDatabaseAdapter implements DatabaseAdapter<Trip> {

    @Override
    @NonNull
    public Trip build(@NonNull Trip trip, int primaryKey, @NonNull UUID uuid, @NonNull DatabaseOperationMetadata databaseOperationMetadata) {
        return new TripBuilderFactory(trip)
                .setId(primaryKey)
                .setUuid(uuid)
                .setDirectory(storageManager.getFile(trip.getName()))
                .setSyncState(syncStateAdapter.get(trip.getSyncState(), databaseOperationMetadata))
                .build();
    }

    public  TripDatabaseAdapter(@NonNull StorageManager storageManager, @NonNull UserPreferenceManager preferences, @NonNull SyncStateAdapter syncStateAdapter);

}