java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.Account
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe interface Graph ql filter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaccType()Returns the value of theaccTyperecord component.balance()Returns the value of thebalancerecord component.boc()Returns the value of thebocrecord component.code()Returns the value of thecoderecord component.codeHash()Returns the value of thecodeHashrecord component.data()Returns the value of thedatarecord component.dataHash()Returns the value of thedataHashrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinitCodeHashrecord component.isActive()Checks if accType field of account query equals to 1.Returns the value of thelastTransLtrecord component.static AccountFactory method to create Account object.static AccountOf address account.ofAddressList(int sdk, String... addresses) Does the same as ofAddress() factory, but uses an array of addresses as "in" filter for GraphQL querystatic AccountOf uninit account.static AccountOf uninit account.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Account
public Account(String id, int accType, String balance, String boc, String data, String dataHash, String code, String codeHash, String initCodeHash, String lastTransLt) Creates an instance of aAccountrecord class.- Parameters:
id- the value for theidrecord componentaccType- the value for theaccTyperecord componentbalance- the value for thebalancerecord componentboc- the value for thebocrecord componentdata- the value for thedatarecord componentdataHash- the value for thedataHashrecord componentcode- the value for thecoderecord componentcodeHash- the value for thecodeHashrecord componentinitCodeHash- the value for theinitCodeHashrecord componentlastTransLt- the value for thelastTransLtrecord component
-
-
Method Details
-
ofAddress
public static Account ofAddress(int sdk, String addressString) throws tech.deplant.java4ever.binding.EverSdkException Factory method to create Account object. Makes a net.query_collection request to EVER-SDK (accounts collection query), then constructs Account object from the result. If query doesn't find account, method will construct empty Account object with accType=0 (not deployed).- Parameters:
sdk- that will be used for queryaddressString- address of account- Returns:
- GraphQL result with fields (id acc_type balance boc data data_hash code code_hash init_code_hash last_paid) as Account object
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
ofAddress
-
ofUninit
-
ofUninit
-
ofAddressList
public static List<Account> ofAddressList(int sdk, String... addresses) throws tech.deplant.java4ever.binding.EverSdkException Does the same as ofAddress() factory, but uses an array of addresses as "in" filter for GraphQL query- Parameters:
sdk- that will be used for queryaddresses- vararg/array of account addresses to check- Returns:
- list of created Account objects
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
isActive
Checks if accType field of account query equals to 1.- Returns:
- true if account is active
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
accType
public int accType()Returns the value of theaccTyperecord component.- Returns:
- the value of the
accTyperecord component
-
balance
Returns the value of thebalancerecord component.- Returns:
- the value of the
balancerecord component
-
boc
Returns the value of thebocrecord component.- Returns:
- the value of the
bocrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
dataHash
Returns the value of thedataHashrecord component.- Returns:
- the value of the
dataHashrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
codeHash
Returns the value of thecodeHashrecord component.- Returns:
- the value of the
codeHashrecord component
-
initCodeHash
Returns the value of theinitCodeHashrecord component.- Returns:
- the value of the
initCodeHashrecord component
-
lastTransLt
Returns the value of thelastTransLtrecord component.- Returns:
- the value of the
lastTransLtrecord component
-