Photo web hosting - APPENDIX B n HIBERNATE TOOLS 291 n HIBERNATE

APPENDIX B n HIBERNATE TOOLS 291 n HIBERNATE TOOLS 291 In principle, the element allows you to specify an arbitrary HQL query that will be run against the database using the configuration s mapping information. Table B-9 shows the attributes that can be supplied. Table B-9. The Properties Available to the Exporter Element Property Default Description destdir If set, overrides, for this exporter only, the destination directory specified on the tools task. destfile If set, specifies the file into which the output of the queries will be written. If left unset, the query is carried out, but the output is not saved. The HQL query itself is included as the body of the element. select n.owner from Notepad n If you want to include multiple SQL queries in the task, you can include multiple nested elements thus: select n.owner from Notepad n select n.owner from Note n Reverse Engineering As we discussed in the previous section, the task can be used to create a configuration metamodel directly from a database schema. However, a database schema is not necessarily an exact match for the entity mappings that we want to create. It may contain tables and columns that we would prefer to omit from our entities. It may also lack some of the information that we want to express. For example, database types such as VARCHAR do not map exactly to Java types such as char[]and java.lang.String, and the tables will have names that do not conform to the Java naming conventions. Used as is, the task will select sensible defaults for the type names, and will assign the reverse-engineered tables suitable Java names derived from the table names. It also provides an attribute to allow you to directly specify a suitable package name. Even so, we would really like more control over the specifics of the reverse engineering process. Note that while it also provides a naming strategy attribute, this has no effect during the reverse engineering process, as naming strategy classes can only be used to determine schema names from mapping information, not vice versa. Hibernate provides two ways in which this process can be controlled you can specify one of two attributes on the task to override the default behavior.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply