Package tenapull.data.entity.scan
Class ScanPlugin
java.lang.Object
tenapull.data.entity.scan.ScanPlugin
- All Implemented Interfaces:
NessusResponse.ResponseChild<ScanPlugin,ScanResponse>,ScanResponse.ScanResponseChild<ScanPlugin>,DbPojo,MapLookupPojo<ScanPlugin>
@Entity(name="ScanPlugin") public class ScanPlugin extends java.lang.Object implements MapLookupPojo<ScanPlugin>, ScanResponse.ScanResponseChild<ScanPlugin>
Represents the scan-specific fields (host_count, and hosts) in the plugin object from the "plugins"
array returned by the Nessus API in /scans/<scan-id>. Also serves as a join table
between scan_response and plugin
-
Field Summary
Fields Modifier and Type Field Description static MapLookupDao<ScanPlugin>dao -
Constructor Summary
Constructors Constructor Description ScanPlugin() -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>_getSearchMap()Return a map to be used by the POJO type's dao, to find the database record matching the same record that this pojo representsboolean_match(ScanPlugin o)Determine if this pojo represents the same DB record as another POJO of the same type.void_prepare()Perform any operations necessary to prepare this pojo for insertion or updating in the databasevoid_set(ScanPlugin o)Set the values in this POJO to be identical to another POJO representing the same DB recordbooleanequals(java.lang.Object o)java.lang.IntegergetHostCount()java.util.List<PluginHost>getHosts()intgetId()Get the surrogate or natural primary key id for the lookupPlugingetPlugin()ScanResponsegetResponse()Gets parent response.inthashCode()voidsetHostCount(java.lang.Integer hostCount)voidsetHosts(java.util.List<PluginHost> hosts)voidsetId(int id)Set the surrogate or natural primary key id for the lookupvoidsetPlugin(Plugin plugin)voidsetResponse(ScanResponse response)Sets parent response.com.fasterxml.jackson.databind.node.ObjectNodetoJsonNode()Convert the pojo into a JsonNodejava.lang.StringtoJsonString()Convert the pojo into a Json stringjava.lang.StringtoString()
-
Field Details
-
Constructor Details
-
ScanPlugin
public ScanPlugin()
-
-
Method Details
-
getId
public int getId()Description copied from interface:DbPojoGet the surrogate or natural primary key id for the lookup -
setId
public void setId(int id)Description copied from interface:DbPojoSet the surrogate or natural primary key id for the lookup -
toJsonNode
public com.fasterxml.jackson.databind.node.ObjectNode toJsonNode()Description copied from interface:DbPojoConvert the pojo into a JsonNode- Specified by:
toJsonNodein interfaceDbPojo- Returns:
- a JsonNode representing the serialization of this pojo
-
toJsonString
public java.lang.String toJsonString()Description copied from interface:DbPojoConvert the pojo into a Json string- Specified by:
toJsonStringin interfaceDbPojo- Returns:
- a string representing the Json serialization of this pojo
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
_prepare
public void _prepare()Description copied from interface:DbPojoPerform any operations necessary to prepare this pojo for insertion or updating in the database -
_match
Description copied from interface:MapLookupPojoDetermine if this pojo represents the same DB record as another POJO of the same type. Note that this is NOT the same as the equals() method (though it may be in certain cases). Equals may be used to determine if two pojos of the same type contain all of the same values, regardless of whether they represent the same DB record (depending on implementation) while _match determines only if they represent the same DB record even if some of the values may not be equivalent. In many cases the two methods may be the same, but their purpose is different.- Specified by:
_matchin interfaceMapLookupPojo<ScanPlugin>- Parameters:
o- the other pojo to match- Returns:
- true if the two pojos represent the same DB record, false if not
-
_getSearchMap
public java.util.Map<java.lang.String,java.lang.Object> _getSearchMap()Description copied from interface:MapLookupPojoReturn a map to be used by the POJO type's dao, to find the database record matching the same record that this pojo represents- Specified by:
_getSearchMapin interfaceMapLookupPojo<ScanPlugin>- Returns:
-
getPlugin
-
setPlugin
-
getHostCount
public java.lang.Integer getHostCount() -
setHostCount
public void setHostCount(java.lang.Integer hostCount) -
getHosts
-
setHosts
-
getResponse
Description copied from interface:NessusResponse.ResponseChildGets parent response.- Specified by:
getResponsein interfaceNessusResponse.ResponseChild<ScanPlugin,ScanResponse>- Returns:
- the response
-
setResponse
Description copied from interface:NessusResponse.ResponseChildSets parent response.- Specified by:
setResponsein interfaceNessusResponse.ResponseChild<ScanPlugin,ScanResponse>- Parameters:
response- the response
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
_set
Description copied from interface:MapLookupPojoSet the values in this POJO to be identical to another POJO representing the same DB record- Specified by:
_setin interfaceMapLookupPojo<ScanPlugin>
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-