Properties are inherited from the EntityManagerFactory,
that is, they may be specified via persistence.xml or
Persistence#createEntityManagerFactory(String, Map).
EntityManagerFactory#getSchemaManager()
| Modifier and Type | Method and Description |
|---|---|
| public void | create(boolean
if createSchemas)true, attempt to create schemas,
otherwise, assume the schemas already existCreate database objects mapped by entities belonging to the persistence unit. |
| public void | drop(boolean
if dropSchemas)true, drop schemas,
otherwise, leave them beDrop database objects mapped by entities belonging to the persistence unit, undoing the effects of the previous creation. |
| public void | truncate()
Truncate the database tables mapped by entities belonging to the persistence unit, and then re-import initial data from any configured SQL scripts for data loading. |
| public void | validate()
Validate that the database objects mapped by entities belonging to the persistence unit have the expected definitions. |
| create | back to summary |
|---|---|
| public void create(boolean createSchemas) Create database objects mapped by entities belonging to the persistence unit. If a DDL operation fails, the behavior is undefined. A provider may throw an exception, or it may ignore the problem and continue.
| |
| drop | back to summary |
|---|---|
| public void drop(boolean dropSchemas) Drop database objects mapped by entities belonging to the persistence unit, undoing the effects of the previous creation. If a DDL operation fails, the behavior is undefined. A provider may throw an exception, or it may ignore the problem and continue.
| |
| truncate | back to summary |
|---|---|
| public void truncate() Truncate the database tables mapped by entities belonging to the persistence unit, and then re-import initial data from any configured SQL scripts for data loading. If a SQL operation fails, the behavior is undefined. A provider may throw an exception, or it may ignore the problem and continue. | |
| validate | back to summary |
|---|---|
| public void validate() throws SchemaValidationException Validate that the database objects mapped by entities belonging to the persistence unit have the expected definitions. The persistence provider is not required to perform any specific validation, so the semantics of this operation are entirely provider-specific.
| |