[jboss-user] [JBoss Seam] - seam-gen vs. reference doc re Home setId()

codelion do-not-reply at jboss.com
Wed Jan 31 18:38:13 EST 2007


seam-gen with generate-entities keeps generating methods like setSomethingId() and getSomethingId() in

public class SomethingHome extends EntityHome<Something> {
  | 
  | 	public void setSomethingId(String id) {
  | 		setId(id);
  | 	}
  | 
  | 	public String getSomethingId() {
  | 		return (String) getId();
  | 	}
  | 
  | 	@Override
  | 	protected Something createInstance() {
  | 		Something result = new Something();
  | 		return result;
  | 	}
  | }

Then in the generated Something.page.xml there is

<page>
  |    <param name="somethingFrom"/>
  |    <param name="somethingId" value="#{somethingHome.somethingId}"/>
  | </page>

In contrast, seam reference doc shows

<param name="personId" value="#{personHome.id}"/>

and no methods wrapping setId() and getId(), i.e. no setSomethingId() and no getSomethingId().

Big Question:  Is it safe to not have setSomethingId() and not have getSomethingId() in my own code, just use setId() and getId()?

And, are setSomethingId() and getSomethingId() there for a good reason we should know?

And, will setSomethingId() and getSomethingId() be removed in the future?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009116#4009116

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009116



More information about the jboss-user mailing list