How to generate tables from entities using EclipseLink
How to generate entities from tables using EclipseLink. Simple example using one-to-one database relationship. @MappedSuperclass example included
How to read XML file in Java using DOM
How to read XML file in Java using DOM. 2 methods: one reading each element by the name and second parsing the entire DOMobject.
How to create XML file in Java using DOM
How to create XML file in Java using DOM. Simple example with pretty printing to output the content to console or to a file.
How to define one-to-one relationship in MySQL
How to define one-to-one relationship in MySQL using the foreign key and unique property to limit the row count from the child table
How to read and write files in Java
How to read and write files in Java using BufferedReader and BufferedWriter. The example highlights the classic resource release and try-with-resource approach.
How to read and write JSON with json-simple
How to read and write JSON with json-simple library. Full example how to create an object, write it to a file, read it and use it.