org.apache.olingo.odata2.jpa.processor.ref.util

## Class DataGenerator

- java.lang.Object
- - org.apache.olingo.odata2.jpa.processor.ref.util.DataGenerator

-     public class DataGenerator
      extends Object

  This is a utility class for generating and cleaning data. The generated data would be used by the application.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataGenerator(javax.persistence.EntityManager entityManager)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clean()` This method deletes data from JPA tables created.
    `void` | `generate()` This method generates data to be used in the application.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataGenerator

          public DataGenerator(javax.persistence.EntityManager entityManager)

  - ### Method Detail

    - #### generate

          public void generate()

      This method generates data to be used in the application. It does so by reading properties file. Currently it iterates through comma separated file names in file SQLInsertConfig and gets the insert statements from those files in the order provided in the file.

    - #### clean

          public void clean()

      This method deletes data from JPA tables created. This method reads comma separated SQL delete statements from DataDeleteSQLs properties files and executes them in order.

Copyright © 2013-2023 The Apache Software Foundation. All Rights Reserved.