The invention relates to a searching method for building a
query statement based on
class information, comprising the steps of S1, scanning, by a
server, a persistent class file to extract
Java class information and its attribute information; reading a preset configuration file to acquire default configuration of each attribute; automatically generating a
class information data table file according to the
Java class information, attribute information and configuration information; S2, setting, by a user, service parameters through a
client, and dynamically adding to a text input box; inputting, by the user, query content to the text input box, and transmitting the input query content and the service parameters together to the
server; S3, receiving, by the
server, the query content and service parameters input by the
client to automatically splice an
SQL (structured
query language) statement, performing corresponding
database search operations according to the
SQL statement, and performing
information feedback on the
client. The method of the invention has the advantages that searching speed is increased, a user may be assisted in operating quickly, and codes are simplified.