Cash.State - corda

corda / net.corda.finance.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: AbstractParty)` A state representing a cash claim against some party. `State(amount: Amount<Issued<Currency>>, owner: AbstractParty)`

### Properties

#### amount | Amount represents a positive quantity of some issued product which can be cash, tokens, assets, or generally anything else that's quantifiable with integer quantities. See Issued and Amount for more details. `val amount: Amount<Issued<Currency>>`
#### exitKeys | 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. `val exitKeys: Set<PublicKey>`
#### owner | There must be a MoveCommand signed by this key to claim the amount. `val owner: AbstractParty`
#### participants | A participant is any party that should be notified when the state is created or consumed. `val participants: List<AbstractParty>`

### Functions

#### generateMappedObject | Object Relational Mapping support. `fun generateMappedObject(schema: MappedSchema): PersistentState`
#### issuedBy | `infix fun issuedBy(party: AbstractParty): State` `infix fun issuedBy(deposit: PartyAndReference): State`
#### ownedBy | `infix fun ownedBy(owner: AbstractParty): State`
#### supportedSchemas | Object Relational Mapping support. `fun supportedSchemas(): Iterable<MappedSchema>`
#### toString | `fun toString(): String`
#### withDeposit | `infix fun withDeposit(deposit: PartyAndReference): State`
#### withNewOwner | Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone. `fun withNewOwner(newOwner: AbstractParty): CommandAndState`
#### withNewOwnerAndAmount | Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the rest (exitKeys) alone. `fun withNewOwnerAndAmount(newAmount: Amount<Issued<Currency>>, newOwner: AbstractParty): FungibleAsset<Currency>`