public class PersistenceOperations extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_UNIT_DESC |
static String |
DEFAULT_UNIT_NAME |
| Constructor and Description |
|---|
PersistenceOperations() |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.forge.addon.parser.java.resources.JavaResource |
newEntity(org.jboss.forge.addon.resource.DirectoryResource target,
String entityName,
String entityPackage,
javax.persistence.GenerationType idStrategy)
Creates a new
JavaResource in the specified target. |
org.jboss.forge.addon.parser.java.resources.JavaResource |
newEntity(org.jboss.forge.addon.projects.Project project,
String entityName,
String entityPackage,
javax.persistence.GenerationType idStrategy)
Creates a new
JavaResource in the specified project. |
org.jboss.forge.addon.resource.FileResource<?> |
setup(String unitName,
org.jboss.forge.addon.projects.Project project,
JPADataSource dataSource,
boolean configureMetadata)
Setups JPA in the project
|
public static final String DEFAULT_UNIT_NAME
public static final String DEFAULT_UNIT_DESC
public org.jboss.forge.addon.resource.FileResource<?> setup(String unitName, org.jboss.forge.addon.projects.Project project, JPADataSource dataSource, boolean configureMetadata)
project - dataSource - configureMetadata - public org.jboss.forge.addon.parser.java.resources.JavaResource newEntity(org.jboss.forge.addon.projects.Project project,
String entityName,
String entityPackage,
javax.persistence.GenerationType idStrategy)
throws FileNotFoundException
JavaResource in the specified project. If no project is available, use
newEntity(DirectoryResource, String, String, GenerationType)project - the current project to create the entity. Must not be nullentityName - the name of the entityentityPackage - the package of the entity to be createdidStrategy - the ID strategy chosen for this entityFileNotFoundException - if something wrong happens while saving the JavaClasspublic org.jboss.forge.addon.parser.java.resources.JavaResource newEntity(org.jboss.forge.addon.resource.DirectoryResource target,
String entityName,
String entityPackage,
javax.persistence.GenerationType idStrategy)
JavaResource in the specified target. If a project is available, use
newEntity(Project, String, String, GenerationType)target - the target directory resource to create this classentityName - the name of the entityentityPackage - the package of the entity to be createdidStrategy - the ID strategy chosen for this entityFileNotFoundException - if something wrong happens while saving the JavaClassCopyright © 2013 JBoss by Red Hat. All Rights Reserved.