Class QueryHelper
- java.lang.Object
-
- com.h2tcoin.takamakachain.utils.Query.QueryHelper
-
public class QueryHelper extends Object
- Author:
- iris.dimni
-
-
Constructor Summary
Constructors Constructor Description QueryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QueryBeancreateChainInfoBeanRequest()create a prop state request for chain infostatic ChainInfoBeandecodeQueryResponse(QueryBean qb)returns the query resultObjectwith the correct typestatic <T extends QueryHelper>
TgetQueryResult(QueryBean query)returns a the result of the query as specified by the input parametersstatic ClassgetTypeClass(KeyContexts.QueryType qType)returns the Class of each query type's result objectstatic QueryBeaninitLoadBlockQuery(String block)create a query containing the passed gson encoded block
-
-
-
Method Detail
-
getQueryResult
public static <T extends QueryHelper> T getQueryResult(QueryBean query)
returns a the result of the query as specified by the input parameters- Type Parameters:
T-- Parameters:
query-- Returns:
-
getTypeClass
public static Class getTypeClass(KeyContexts.QueryType qType)
returns the Class of each query type's result object- Parameters:
qType-- Returns:
-
initLoadBlockQuery
public static QueryBean initLoadBlockQuery(String block)
create a query containing the passed gson encoded block- Parameters:
block-- Returns:
-
createChainInfoBeanRequest
public static QueryBean createChainInfoBeanRequest()
create a prop state request for chain info- Returns:
-
decodeQueryResponse
public static ChainInfoBean decodeQueryResponse(QueryBean qb)
returns the query resultObjectwith the correct type- Parameters:
qb-- Returns:
-
-