[
https://issues.jboss.org/browse/SEAMFORGE-70?page=com.atlassian.jira.plug...
]
Lincoln Baxter III closed SEAMFORGE-70.
---------------------------------------
Resolution: Done
[example] domain $ new-entity --named User
In which package you'd like to create this @Entity, or enter for default:
[com.example.domain]
Wrote /home/lb3/Desktop/example/src/main/java/com/example/domain/User.java
Created @Entity [com.example.domain.User]
Picked up type <JavaResource>: com.example.domain.User
[example] User.java $
[example] User.java $ ls
[fields]
private::int::version; private::long::id;
[methods]
public::getId()::long public::getVersion()::int
public::setId(final long id)::void public::setVersion(final int
version)::void
[example] User.java $ rm get
getId()::long getVersion()::int
[example] User.java $ rm getId()::long
delete: getId()::long: are you sure? [Y/n]
[example] User.java $ ls
[fields]
private::int::version; private::long::id;
[methods]
public::getVersion()::int public::setId(final long id)::void
public::setVersion(final int version)::void
[example] User.java $
Ls and Rm do not function on JavaResource members
-------------------------------------------------
Key: SEAMFORGE-70
URL:
https://issues.jboss.org/browse/SEAMFORGE-70
Project: Seam Forge
Issue Type: Bug
Components: Parsers / File Manipulation, Shell
Affects Versions: 1.0.0.Alpha2
Reporter: Lincoln Baxter III
Assignee: Lincoln Baxter III
Fix For: 1.0.0.Alpha3
[example] UserProfile.java $ ls
[fields]
private::User::user; private::User::user; private::int::version;
private::long::id;
[methods]
public::getId()::long public::getUser()::User
public::getUser()::User public::getVersion()::int
public::setId(final long id)::void public::setUser(final User user)::void
public::setUser(final User user)::void public::setVersion(final int
version)::void
[example] UserProfile.java $ cat
[example] UserProfile.java $ cat .
package com.example.domain;
import javax.persistence.Entity;
import java.io.Serializable;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.persistence.Version;
import javax.persistence.OneToOne;
import com.example.domain.User;
@Entity public class UserProfile implements java.io.Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="id",updatable=false,nullable=false)
private long id=0;
@Version private @Column(name="version") int version=0;
public long getId(){
return this.id;
}
public void setId( final long id){
this.id=id;
}
public int getVersion(){
return this.version;
}
public void setVersion( final int version){
this.version=version;
}
@OneToOne private User user;
public User getUser(){
return this.user;
}
public void setUser( final User user){
this.user=user;
}
}
[example] UserProfile.java $ rm id
***ERROR*** [rm] command option 'at index [1]' must be of type
'Resource[]'
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira