openArchitectureWare.org

oAW has moved to Eclipse.

At this site you will find information about the outdated version openArchitectureWare 4, only.
Please read our letter of intent for further information.

 

 Forum Index > openArchitectureWare > General Discussions New Topic Post Reply
 Package Creation in template in generated Code
 |  Printable Version
Nina
 Sunday, December 13 2009 @ 04:21 PM CET (Read 907 times)  


Status: offline

Registered: 12/13/09
Posts: 2

Hi everybody,

I want to create classes into a package not the default package created automaticly by the generation of the codebut i don't no how to create the package this my Root.xpt:(template)

«DEFINE Root FOR data::DataModel»
«EXPAND Entity FOREACH entity»
«ENDDEFINE»
«DEFINE Entity FOR data::Entity»

«FILE name + ".java"»
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity; 
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
@Entity
 public class «name» implements Serializable{
    @Id
      «FOREACH attribute AS a»
        private «a.type» «a.name»;........................................................




i tried to do this but it does not create me a package but it create a folder: Question
«DEFINE Entity FOR data::Entity»

  «FILE "packageEntity/"+name.toFirstUpper() + ".java"»
    package packageEntity;
 import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.Column;
    import javax.persistence.Table;
    import javax.persistence.Id;...................................

what i have to do thank you so much!!!


 
Profile Email
Quote
Christian Dietrich
 Sunday, December 13 2009 @ 04:28 PM CET  
Forum Expert
Expert

Status: online

Registered: 10/11/06
Posts: 587

hi, a package is a folder in java isn't it? the only thing you have to do is to make dir you generate to a source folder.


 
Profile Email Website
Quote
Content generated in: 0.03 seconds
New Topic Post Reply



 All times are CEST. The time is now 03:45 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content