Class ContractCompanion.WithKey<Ct,Id,Data,Key>
- java.lang.Object
-
- com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion<Ct,Id,Data,Data>
-
- com.daml.ledger.javaapi.data.codegen.ContractCompanion<Ct,Id,Data>
-
- com.daml.ledger.javaapi.data.codegen.ContractCompanion.WithKey<Ct,Id,Data,Key>
-
- Type Parameters:
Key
-Data
's key type as represented in Java codegen.
- Enclosing class:
- ContractCompanion<Ct,Id,Data>
public static final class ContractCompanion.WithKey<Ct,Id,Data,Key> extends ContractCompanion<Ct,Id,Data>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ContractCompanion.WithKey.NewContract<Ct,Id,Data,Key>
-
Nested classes/interfaces inherited from class com.daml.ledger.javaapi.data.codegen.ContractCompanion
ContractCompanion.FromJson<T>, ContractCompanion.WithKey<Ct,Id,Data,Key>, ContractCompanion.WithoutKey<Ct,Id,Data>
-
-
Field Summary
-
Fields inherited from class com.daml.ledger.javaapi.data.codegen.ContractCompanion
fromJson
-
Fields inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion
choices, TEMPLATE_ID, TEMPLATE_ID_WITH_PACKAGE_ID
-
-
Constructor Summary
Constructors Constructor Description WithKey(java.lang.String templateClassName, Identifier templateId, java.util.function.Function<java.lang.String,Id> newContractId, java.util.function.Function<DamlRecord,Data> fromValue, ContractCompanion.FromJson<Data> fromJson, ContractCompanion.WithKey.NewContract<Ct,Id,Data,Key> newContract, java.util.List<Choice<Data,?,?>> choices, java.util.function.Function<Value,Key> keyFromValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ct
fromCreatedEvent(CreatedEvent event)
Tries to parse a contract from an event expected to create aCt
contract.Ct
fromIdAndRecord(java.lang.String contractId, DamlRecord record$, java.util.Optional<java.lang.String> agreementText, java.util.Optional<Key> key, java.util.Set<java.lang.String> signatories, java.util.Set<java.lang.String> observers)
-
Methods inherited from class com.daml.ledger.javaapi.data.codegen.ContractCompanion
fromJson, valueDecoder
-
Methods inherited from class com.daml.ledger.javaapi.data.codegen.ContractTypeCompanion
toContractId
-
-
-
-
Constructor Detail
-
WithKey
public WithKey(java.lang.String templateClassName, Identifier templateId, java.util.function.Function<java.lang.String,Id> newContractId, java.util.function.Function<DamlRecord,Data> fromValue, ContractCompanion.FromJson<Data> fromJson, ContractCompanion.WithKey.NewContract<Ct,Id,Data,Key> newContract, java.util.List<Choice<Data,?,?>> choices, java.util.function.Function<Value,Key> keyFromValue)
-
-
Method Detail
-
fromIdAndRecord
public Ct fromIdAndRecord(java.lang.String contractId, DamlRecord record$, java.util.Optional<java.lang.String> agreementText, java.util.Optional<Key> key, java.util.Set<java.lang.String> signatories, java.util.Set<java.lang.String> observers)
-
fromCreatedEvent
public Ct fromCreatedEvent(CreatedEvent event)
Description copied from class:ContractTypeCompanion
Tries to parse a contract from an event expected to create aCt
contract. This is either theCreatedEvent.getArguments()
forContractCompanion
, or one ofCreatedEvent.getInterfaceViews()
for anInterfaceCompanion
.- Specified by:
fromCreatedEvent
in classContractTypeCompanion<Ct,Id,Data,Data>
- Parameters:
event
- the event to try to parse a contract from- Returns:
- The parsed contract, with payload and metadata, if present.
-
-