java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.Account
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
The interface Graph ql filter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
accType()
Returns the value of theaccType
record component.balance()
Returns the value of thebalance
record component.boc()
Returns the value of theboc
record component.code()
Returns the value of thecode
record component.codeHash()
Returns the value of thecodeHash
record component.data()
Returns the value of thedata
record component.dataHash()
Returns the value of thedataHash
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theinitCodeHash
record component.isActive()
Checks if accType field of account query equals to 1.Returns the value of thelastTransLt
record component.static Account
Factory method to create Account object.static Account
Of 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 Account
Of uninit account.static Account
Of uninit account.final String
toString()
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 aAccount
record class.- Parameters:
id
- the value for theid
record componentaccType
- the value for theaccType
record componentbalance
- the value for thebalance
record componentboc
- the value for theboc
record componentdata
- the value for thedata
record componentdataHash
- the value for thedataHash
record componentcode
- the value for thecode
record componentcodeHash
- the value for thecodeHash
record componentinitCodeHash
- the value for theinitCodeHash
record componentlastTransLt
- the value for thelastTransLt
record 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 theid
record component.- Returns:
- the value of the
id
record component
-
accType
public int accType()Returns the value of theaccType
record component.- Returns:
- the value of the
accType
record component
-
balance
Returns the value of thebalance
record component.- Returns:
- the value of the
balance
record component
-
boc
Returns the value of theboc
record component.- Returns:
- the value of the
boc
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-
dataHash
Returns the value of thedataHash
record component.- Returns:
- the value of the
dataHash
record component
-
code
Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-
codeHash
Returns the value of thecodeHash
record component.- Returns:
- the value of the
codeHash
record component
-
initCodeHash
Returns the value of theinitCodeHash
record component.- Returns:
- the value of the
initCodeHash
record component
-
lastTransLt
Returns the value of thelastTransLt
record component.- Returns:
- the value of the
lastTransLt
record component
-