This is the quickest, but least flexible, way to run Recompute. You invoke it as follows:
Note that you cannot set all possible options using this approach.
It is often more convenient to specify all the parameters in a config file. This is a standard Java properties file, which means that anything after a hash mark is ignored, and you can continue a line on the next line with a backslash.
# Sample Recompute config, with all possible options
# What to do. Can be either scan, plan or fix
action = fix
# The location of a Hibernate configuration file
hibernate_config_file = c:/Users/jdoe/recompute/myapp.cfg.xml
# The name of a JPA unit. Y
ou can specify either
jpa_unit_name, but not both
# jpa_unit_name = MyApp
# This can be either xml, or sql, or the full name of a class implementing
# the com.autobizlogic.recompute.format.ReportFormatter interface
output_formatter = xml
# The name of the output file. If none is specified, standard output is used.
# You can use the following variables in the file name:
# %Y : year (4 digits)
# %M : month (2 digits)
# %D : day of month (2 digits, 1-31)
# %h : hour (2 digits, 00-23)
# %m : minutes (2 digits, 00-59)
# %s : seconds (2 digits, 00-59)
output_file_name = c:/temp/RecomputeReport_%Y%M%D_%h%m%s.xml
# A final SQL command that should be issued after a fix.
# This is used for databases (such as Hypersonic) that require an orderly shutdown.
final_command = shutdown
# The full name of a class implementing the RecomputeListener interface
recompute_listener = com.acme.myapp.RecomputeListener
# A comma-separated list of packages containing the logic classes
logic_packages = com.acme.myapp.money.logic, com.acme.myapp.customer.logic
# A comma-separated list of the entities to check. If this is specified, then only these entities
# will be checked. If this is not specified, then all the entities in the model will be checked.
# You can also specify a single attribute using the notation com.acme.Customer:balance
entities_to_check = com.acme.myapp.Customer, com.acme.myapp.Account, \
# A comma-separated list of the entities to *not* check.
# Any entities specified here will be skipped.
entities_to_skip = com.acme.myapp.Product
# If you need to check only a subset of certain entities, you can enter qualifications here (at most
# one per entity). The format is:
# where_<entity-name> = <clause>
where_com.acme.myapp.Account = openDate > TO_DATE('31/07/2012', 'DD/MM/YYYY')
where_com.acme.myapp.Customer = name = 'Acme Ltd'
Once you have the config file, you can invoke Recompute as follows (assuming of course that all required classes are in the classpath):