net.corda.contracts.asset / Cash / State

# State

`data class State : FungibleAsset<Currency>, QueryableState`

A state representing a cash claim against some party.

### Constructors

<init> | `State(deposit: PartyAndReference, amount: Amount<Currency>, owner: CompositeKey)``State(amount: Amount<Issued<Currency>>, owner: CompositeKey, encumbrance: Int? = null)` A state representing a cash claim against some party.

### Properties

amount | `val amount: Amount<Issued<Currency>>`
contract | `val contract: Cash` An instance of the contract class that will verify this state.
encumbrance | `val encumbrance: Int?` All contract states may be encumbered by up to one other state.
exitKeys | `val exitKeys: <ERROR CLASS>` There must be an ExitCommand signed by these keys to destroy the amount. While all states require their owner to sign, some (i.e. cash) also require the issuer.
owner | `val owner: CompositeKey` There must be a MoveCommand signed by this key to claim the amount.
participants | `val participants: <ERROR CLASS>` A participant is any party that is able to consume this state in a valid transaction.

### Functions

generateMappedObject | `fun generateMappedObject(schema: MappedSchema): PersistentState` Object Relational Mapping support.
move | `fun move(newAmount: Amount<Issued<Currency>>, newOwner: CompositeKey): FungibleAsset<Currency>`
supportedSchemas | `fun supportedSchemas(): Iterable<MappedSchema>` Object Relational Mapping support.
toString | `fun toString(): String`
withNewOwner | `fun withNewOwner(newOwner: CompositeKey): <ERROR CLASS>` Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone

### Extension Functions

issued by | `infix fun State.issued by(party: Party): State` `infix fun State.issued by(deposit: PartyAndReference): State`
issuedBy | `fun State.issuedBy(party: Party): State` `fun State.issuedBy(deposit: PartyAndReference): State`
owned by | `infix fun State.owned by(owner: CompositeKey): State`
ownedBy | `fun State.ownedBy(owner: CompositeKey): State`
with deposit | `infix fun State.with deposit(deposit: PartyAndReference): State`
withDeposit | `fun State.withDeposit(deposit: PartyAndReference): State`