Here it is. I am sorry if I happened to ignore any code posting rules. I am
not aware of any as of now....

package org.appfuse.model;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.apache.commons.lang.builder.HashCodeBuilder;


/**
 * @hibernate.class table="person"
 */
public class Person extends BaseObject implements Serializable{

        private Long id;
        private String firstName;
        private String lastName;
        private String email;
        private String phone;
        
        private Long userId;

        /**
     * @hibernate.property column="user_id"
         */
        public Long getUserId(){
                return userId;
        }
        
        public void setUserId(Long userId){
                this.userId = userId;
        }
        
        /**
     * @hibernate.id column="id" generator-class="native"
unsaved-value="null"
     */
        public Long getId() {
                return id;
        }
        
        public void setId(Long id) {
                this.id = id;
        }
                
        /**
     * @hibernate.property column="email" length="50"
     */
        public String getEmail() {
                return email;
        }
        
        /**
         * @spring.validator type="required"
         */
        public void setEmail(String email) {
                this.email = email;
        }
        
        /**
     * @hibernate.property column="first_name" length="50"
     */
        public String getFirstName() {
                return firstName;
        }

        /**
         * @spring.validator type="required"
         */
        public void setFirstName(String firstName) {
                this.firstName = firstName;
        }

        /**
     * @hibernate.property column="last_name" length="50"
     */
        public String getLastName() {
                return lastName;
        }

        /**
         * @spring.validator type="required"
         */
        public void setLastName(String lastName) {
                this.lastName = lastName;
        }
                
        /**
     * @hibernate.property column="phone" length="50"
     */
        public String getPhone() {
                return phone;
        }
        
        /**
     * @spring.validator type="mask" msgkey="errors.phone"
     * @spring.validator-var name="mask" value="${phone}"
     */
        public void setPhone(String phone) {
                this.phone = phone;
        }


        /**
         * @see java.lang.Comparable#compareTo(Object)
         */
        public int compareTo(Object object) {
                Person myClass = (Person) object;
                return new CompareToBuilder().append(this.phone, 
myClass.phone).append(
                                this.email, 
myClass.email).append(this.firstName,
                                myClass.firstName).append(this.id, 
myClass.id).append(
                                this.lastName, myClass.lastName).toComparison();
        }

        /**
         * @see java.lang.Object#equals(Object)
         */
        public boolean equals(Object object) {
                if (!(object instanceof Person)) {
                        return false;
                }
                Person rhs = (Person) object;
                return new EqualsBuilder().append(
                                this.phone, rhs.phone).append(this.email, 
rhs.email).append(
                                this.firstName, rhs.firstName).append(this.id, 
rhs.id).append(
                                this.lastName, rhs.lastName).isEquals();
        }

        /**
         * @see java.lang.Object#toString()
         */
        public String toString() {
                return new ToStringBuilder(this, 
ToStringStyle.DEFAULT_STYLE).append(
                                "phone", this.phone).append("email", 
this.email).append(
                                "firstName", this.firstName).append("id", 
this.id).append(
                                "lastName", this.lastName).toString();
        }

        /**
         * @see java.lang.Object#hashCode()
         */
        public int hashCode() {
                return new HashCodeBuilder(204206699, -1681338249).appendSuper(
                                
234234234).append(this.phone).append(this.email).append(
                                
this.firstName).append(this.id).append(this.lastName)
                                .toHashCode();
        }
        
        
}




mraible wrote:
> 
> Can you post your Person.java?
> 
> On 3/1/07, 23455432 <[EMAIL PROTECTED]> wrote:
>>
>> I have the following setup:
>>
>>
>> User has one to many calls,
>> user has many to many roles,
>> user has one to many persons,
>> call has many to many persons
>>
>> I am trying to model the call to person (many to many) the same way as
>> the
>> user to roles.
>>
>> When I create a new call object and try to save it I get the following
>> error:
>>
>>
>>  ERROR [http-8080-Processor23] BasicPropertyAccessor.get(167) |
>> IllegalArgumentException in class: org.appfuse.model.Person, getter
>> method
>> of property: id
>>
>>
>> I am a newbie, so any direction would be appreciated. There is no other
>> stack trace. I have debug turned on.
>>
>> Thanks
>>
>> ~rk
>>
>> --
>> View this message in context:
>> http://www.nabble.com/IllegatlArgumentException-with-hibernate-tf3331607s2369.html#a9263861
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/IllegatlArgumentException-with-hibernate-tf3331607s2369.html#a9264176
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to