I'm having quite a time attempting to use a CMP bean with a custom PK class w/ support in the value object. I'm sure I'm missing something fairly simple.

Anyway, I've got a UUID class that looks something like:

public class UUID implements Serializable {
   public String id;  // docs suggest this should be public
   public String getId() { return this.id; }
   public void setId(String newId) { this.id = newId; }

    . . .
}


I'd like to have support for


public void setUUID(UUID id)
public UUID getUUID()

in the value object, it's not really all that necessary in the CMP

I'm using JBOSS3.2.2 and MySQL

In the Bean xdoclet

/**
* @ejb.bean name="Message"
* jndi-name="MessageBean"
* type="CMP"
* schema="mms"
* pk-field="id"
* cmp-version="2.x"
*
* @ejb.persistence
* table-name="MESSAGE"
*
* @ejb.pk class="com.messagegate.foundation.id.UUID" generate="false"
*
* @ejb.finder
* query="SELECT OBJECT(a) FROM mms as a" * signature="java.util.Collection findAll()" *
* <etc>
**/



The PK accessors/mutators: /** * Returns the id * @return the id * * @ejb.persistent-field * @ejb.persistence * column-name="ID" * sql-type="CHAR(32)" * @ejb.pk-field * * @ejb.interface-method * */ public abstract com.messagegate.foundation.id.UUID getUUID();

/**
* Sets the id
*
* @param java.lang.String the new id value
*
* @ejb.interface-method
*/
public abstract void setUUID(com.messagegate.foundation.id.UUID id);



Any help apreciated.


-bob






------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to