---
schema_version: "1"
id: 662aabb3bd298328236b0a338b76a123ba9b42f18eff6df58d9e91234c163dc3
title: Interface UnitOfWork
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-functions/functions/guide/javasdk/interfaces/java-unitofwork.md
canonical_url: https://developer.salesforce.com/docs/platform/functions/guide/java-unitofwork.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f57b1ad9a6b899f524d4482840e47ffca891160f0bf306436bf46983f97f6b91
products:
  - Salesforce Functions
---
# Interface UnitOfWork

------------------------------------------------------------------------

\@Immutable public interface UnitOfWork

Represents a UnitOfWork. Instances can be created via
`DataApi.newUnitOfWorkBuilder()`.

All implementations must be immutable and therefore thread-safe.

See Also: `DataApi.newUnitOfWorkBuilder()`,
`DataApi.commitUnitOfWork(UnitOfWork)`
