Advertisement
Guest User

Untitled

a guest
Jan 9th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. <target name="schemaexport" depends="jar" description="Exports a generated schema to DB and files">
  2. <path id="lib.path">
  3. <fileset refid="lib" />
  4. <pathelement location="${jboss.home}/modules/org/apache/xerces/main/xercesImpl-2.9.1-jbossas-1.jar"/>
  5. <pathelement location="${jar.dir}" />
  6. </path>
  7.  
  8. <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
  9. classpathref="lib.path"/>
  10.  
  11. <hibernatetool destdir="${basedir}">
  12. <classpath refid="lib.path"/>
  13. <jpaconfiguration persistenceunit="TIC" propertyfile="hibernate-console.properties" />
  14. <hbm2ddl outputfilename="${dist.dir}/db_ddl.sql" format="true"/>
  15. </hibernatetool>
  16.  
  17. <concat destfile="${dist.dir}/tic.sql" fixlastline="yes">
  18. <filelist dir="${dist.dir}" files="db_ddl.sql" />
  19. <filelist dir="${jar.dir}" files="import.sql" />
  20. </concat>
  21. </target>
  22.  
  23. hibernate.connection.password=tic
  24. hibernate.connection.username=tic
  25. hibernate.connection.driver_class=org.postgresql.Driver
  26. hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
  27. hibernate.connection.url=jdbc:postgresql://127.0.0.1:5432/db
  28.  
  29. hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
  30. hibernate.datasource=
  31. hibernate.transaction.manager_lookup_class=
  32.  
  33. @Entity
  34. public class Title implements Serializable {
  35. @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
  36. private Long id;
  37.  
  38. @Size(max = 50) @NotEmpty @Column(length = 50)
  39. private String titlename;
  40.  
  41. @Size(max = 50)
  42. private String shortTitle;
  43. }
  44.  
  45. @Size(max = 50)
  46. private String shortTitle;
  47.  
  48. @Size(max = 50)
  49. @Column(length = 255)
  50. private String shortTitle;
  51.  
  52. @NotEmpty @Column(length = 50)
  53. private String titlename;
  54.  
  55. /** User visible short version of the title. */
  56. @Column(length = 50)
  57. private String shortTitle;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement