Class BSimQuery<R extends QueryResponseRecord>
java.lang.Object
ghidra.features.bsim.query.protocol.BSimQuery<R>
- Type Parameters:
R
- TheQueryResponseRecord
response implementation class
- Direct Known Subclasses:
AdjustVectorIndex
,CreateDatabase
,DropDatabase
,InsertOptionalValues
,InsertRequest
,InstallCategoryRequest
,InstallMetadataRequest
,InstallTagRequest
,PasswordChange
,PrewarmRequest
,QueryChildren
,QueryCluster
,QueryDelete
,QueryExeCount
,QueryExeInfo
,QueryInfo
,QueryName
,QueryNearest
,QueryNearestVector
,QueryOptionalExist
,QueryOptionalValues
,QueryPair
,QueryUpdate
,QueryVectorId
,QueryVectorMatch
BSimQuery
facilitates all BSim FunctionDatabase
queries
which when executed provide a specific QueryResponseRecord
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
final R
execute
(FunctionDatabase database) Executes this query via theFunctionDatabase.query(BSimQuery)
method.BSimQuery
<?> getName()
static BSimQuery
<?> restoreQuery
(XmlPullParser parser, LSHVectorFactory vectorFactory) Restore a query from a streamabstract void
restoreXml
(XmlPullParser parser, LSHVectorFactory vectorFactory) abstract void
-
Field Details
-
name
-
response
-
-
Constructor Details
-
BSimQuery
-
-
Method Details
-
execute
Executes this query via theFunctionDatabase.query(BSimQuery)
method. The use of this method is preferred due to its type enforcement on the returned response object.- Parameters:
database
- BSim function database to be queried- Returns:
- query response or null on error (see
FunctionDatabase.getLastError()
).
-
clearResponse
public void clearResponse() -
getResponse
-
getName
-
buildResponseTemplate
public void buildResponseTemplate() -
saveXml
- Throws:
IOException
-
restoreXml
public abstract void restoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory) throws LSHException - Throws:
LSHException
-
getDescriptionManager
-
getLocalStagingCopy
- Returns:
- a partial clone of this query suitable for holding local stages of the query via StagingManager
-
restoreQuery
public static BSimQuery<?> restoreQuery(XmlPullParser parser, LSHVectorFactory vectorFactory) throws LSHException Restore a query from a stream- Parameters:
parser
- is the XmlPullParser already queued up with the stream to processvectorFactory
- is used to generate any vector objects from the XML- Returns:
- one of the Query* instances derived from QueryResponseRecord
- Throws:
LSHException
- for errors creating the command
-