You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ujjwala Kulkarni <uj...@bea.com> on 2003/07/22 01:25:16 UTC

Set date issue

Hello, 

This is Ujjwala. I am using betwixt. My bean has set and get methods. BeanWriter writes the date so the beanReader tries to invoke the setDate method with String. 

I get a warning that 'Can not evaluate method setDate' with parameter type String. IllegalArgumentException is thrown.

I will appreciate if you help me with this issue. 

Thanks and Regards,
Ujjwala




Posssible bug in Betwixt alpha

Posted by Ujjwala Kulkarni <uj...@bea.com>.
Hi , 

I guess , when user calls method beanReader.parse(file) , the  ‘update’ of class org.apache.commons.betwixt.expression.MethodUpdater  gets called. 

I observed that if the data types are java.util.Date , int the attributes are not getting converted to the required data type and hence I get the InvalidArgumentExcetion as the default attribute type passed is ‘String’ 

If the date is java.sql.Date then there is no problem but if it is java.util.Date type then I get this exception. One possible cause is that these data types do not have constructors accepting String as only argument. 

e.g java.util.Date  has deprecated new Date(String) constructor. 

And the Interger can not be converted to int like  new int(String)  the code 

 “newValue = ConvertUtils.convert( (String) newValue, valueType );”  will always fail to convert to int or java.util.Date. 

I modified MethodUpdater and the log file I got. And added following statements 

                System.out.println(" UJ -  "+valueType);
                System.out.println(" UJ dest-  "+newValue.getClass());

And  pasting the log I got shows that the type conversion is not working properly. 

_______________________________
 
 UJ in update method
 UJ -  class java.lang.String
 UJ dest-  class java.lang.String
 UJ in update method
 UJ -  class java.lang.String
 UJ dest-  class java.lang.String
 UJ in update method
 UJ -  class java.lang.String
 UJ dest-  class java.lang.String
 UJ in update method
 UJ -  int
 UJ dest-  class java.lang.Integer
Jul 22, 2003 3:46:01 PM org.apache.commons.betwixt.expression.MethodUpdater update
WARNING: Cannot call setter method: addNumber on bean: [com.bea.it.cib.test.CustomerBean: ID=null, name=James] with type: com.bea.it.cib.test.CustomerBean as parameter should be of type: int but is: java.lang.Integer
 UJ in update method
 UJ -  int
 UJ dest-  class java.lang.Integer
Jul 22, 2003 3:46:01 PM org.apache.commons.betwixt.expression.MethodUpdater update
WARNING: Cannot call setter method: addNumber on bean: [com.bea.it.cib.test.CustomerBean: ID=null, name=James] with type: com.bea.it.cib.test.CustomerBean as parameter should be of type: int but is: java.lang.Integer
 UJ in update method
 UJ -  int
 UJ dest-  class java.lang.Integer
Jul 22, 2003 3:46:01 PM org.apache.commons.betwixt.expression.MethodUpdater update
WARNING: Cannot call setter method: addNumber on bean: [com.bea.it.cib.test.CustomerBean: ID=null, name=James] with type: com.bea.it.cib.test.CustomerBean as parameter should be of type: int but is: java.lang.Integer
 UJ in update method
 UJ -  class java.lang.String
 UJ dest-  class java.lang.String
 UJ in update method
 UJ -  class java.lang.String
 UJ dest-  class java.lang.String
 UJ in update method
 UJ -  class java.util.Date
 UJ dest-  class java.lang.String
Jul 22, 2003 3:46:02 PM org.apache.commons.betwixt.expression.MethodUpdater update
WARNING: Cannot call setter method: setDate on bean: [com.bea.it.cib.test.CustomerBean: ID=null, name=James] with type: com.bea.it.cib.test.CustomerBean as parameter should be of type: java.util.Date but is: java.lang.String
 UJ in update method
 UJ -  class java.sql.Time
 UJ dest-  class java.sql.Time
 UJ in update method
 UJ -  class java.sql.Timestamp
 UJ dest-  class java.sql.Timestamp
 UJ in update method
 UJ -  class java.math.BigDecimal
 UJ dest-  class java.math.BigDecimal
 UJ in update method
 UJ -  class java.math.BigInteger
 UJ dest-  class java.math.BigInteger
File read ..null
Process terminated with exit code 0
_______________________________


Thanks 
Ujjwala


RE: Set date issue

Posted by Ujjwala Kulkarni <uj...@bea.com>.
Hey Robert, 

So does that mean that the bean reader will set the dates correctly? I am so excited to get this news. Which night build I should try? Let me know. 

And could you send me some example as what I need to change so that it will be easy for me. 

Thanks and Regards,
Ujjwala

-----Original Message-----
From: robert burrell donkin [mailto:robertburrelldonkin@blueyonder.co.uk] 
Sent: Thursday, July 31, 2003 2:50 PM
To: Jakarta Commons Users List
Subject: Re: Set date issue

hi

i had a good think about what you said, about the need to retain backwards 
compatibility and also the needs for advanced users to register custom 
converters with ConvertUtils, the good news is that i think that i've come 
up with a way to satisfy everyone :)

i haven't had time to fully document the changes i've made (and i have 
some more related features that i hope to add very soon). but if you'd 
like to check out and build CVS HEAD (or wait for a new nightly) java.util.
Dates should map to their toString() format and back again with the 
default configuration.

(for anyone interested in betwixt development, i've added a pluggable 
strategy interface whose default implementation delegates to ConvertUtils 
except for java.util.Date subclasses which are not in java.sql.)

- robert

On Tuesday, July 29, 2003, at 10:47 PM, Ujjwala Kulkarni wrote:

> Hi ,
> Thanks for replying.
> I have a very basic question. All I am doing is to use the betwixt API to 
> convert and the betwixt is using the ConvertUtils internally . Now how 
> does that make sense for me to register the date class with the convert 
> utils.
>
> The bean writer writes the dates in the standard format that is 
> date.toString() format. Then should't the bean reader try to create the 
> date assuming that the format is default because it is created by the 
> writer.
>
> I am confused as why I need to register the java.util.Date class  and why 
> the betwixt internally take care of it?
>
> Let me know,
> Thanks
> Ujjwala
>
> -----Original Message-----
> From: robert burrell donkin [mailto:robertburrelldonkin@blueyonder.co.uk]
> Sent: Tuesday, July 29, 2003 2:41 PM
> To: Jakarta Commons Users List
> Subject: Re: Set date issue
>
> On Monday, July 28, 2003, at 11:29 PM, Ujjwala Kulkarni wrote:
>
>> Hi ,
>>
>> Thanks for replying. Let me try that for Date.
>
> i'm pretty sure that this works with CVS HEAD (i've added some unit tests
> to make sure).
>
>> I also observed that betwixt can not convert the 'int' as the object
>> passed  to the method is Integer instead of int. I do not see any error
>> but the  values set in the bean are 0's which are default values .
>>
>> I supplied a bean to betwixt and converted it to XML. Then used the
>> betwixt to read the XML to convert it to bean. I do not see the bean's
>> 'int' attributes populated as I supplied in the first place.
>
> this sounds a little mysterious. there are quite a few tests that use
> beans that have int attributes. does the property take an int or an
> Integer?
>
> if you could supply an example that i could use to replicate the problem
> in a test case then i'd be glad to take a look.
>
> - robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



Re: Set date issue

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi

i had a good think about what you said, about the need to retain backwards 
compatibility and also the needs for advanced users to register custom 
converters with ConvertUtils, the good news is that i think that i've come 
up with a way to satisfy everyone :)

i haven't had time to fully document the changes i've made (and i have 
some more related features that i hope to add very soon). but if you'd 
like to check out and build CVS HEAD (or wait for a new nightly) java.util.
Dates should map to their toString() format and back again with the 
default configuration.

(for anyone interested in betwixt development, i've added a pluggable 
strategy interface whose default implementation delegates to ConvertUtils 
except for java.util.Date subclasses which are not in java.sql.)

- robert

On Tuesday, July 29, 2003, at 10:47 PM, Ujjwala Kulkarni wrote:

> Hi ,
> Thanks for replying.
> I have a very basic question. All I am doing is to use the betwixt API to 
> convert and the betwixt is using the ConvertUtils internally . Now how 
> does that make sense for me to register the date class with the convert 
> utils.
>
> The bean writer writes the dates in the standard format that is 
> date.toString() format. Then should't the bean reader try to create the 
> date assuming that the format is default because it is created by the 
> writer.
>
> I am confused as why I need to register the java.util.Date class  and why 
> the betwixt internally take care of it?
>
> Let me know,
> Thanks
> Ujjwala
>
> -----Original Message-----
> From: robert burrell donkin [mailto:robertburrelldonkin@blueyonder.co.uk]
> Sent: Tuesday, July 29, 2003 2:41 PM
> To: Jakarta Commons Users List
> Subject: Re: Set date issue
>
> On Monday, July 28, 2003, at 11:29 PM, Ujjwala Kulkarni wrote:
>
>> Hi ,
>>
>> Thanks for replying. Let me try that for Date.
>
> i'm pretty sure that this works with CVS HEAD (i've added some unit tests
> to make sure).
>
>> I also observed that betwixt can not convert the 'int' as the object
>> passed  to the method is Integer instead of int. I do not see any error
>> but the  values set in the bean are 0's which are default values .
>>
>> I supplied a bean to betwixt and converted it to XML. Then used the
>> betwixt to read the XML to convert it to bean. I do not see the bean's
>> 'int' attributes populated as I supplied in the first place.
>
> this sounds a little mysterious. there are quite a few tests that use
> beans that have int attributes. does the property take an int or an
> Integer?
>
> if you could supply an example that i could use to replicate the problem
> in a test case then i'd be glad to take a look.
>
> - robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


RE: Set date issue

Posted by Ujjwala Kulkarni <uj...@bea.com>.
Hi , 
Thanks for replying. 
I have a very basic question. All I am doing is to use the betwixt API to convert and the betwixt is using the ConvertUtils internally . Now how does that make sense for me to register the date class with the convert utils. 

The bean writer writes the dates in the standard format that is date.toString() format. Then should't the bean reader try to create the date assuming that the format is default because it is created by the writer. 

I am confused as why I need to register the java.util.Date class  and why the betwixt internally take care of it? 

Let me know, 
Thanks 
Ujjwala

-----Original Message-----
From: robert burrell donkin [mailto:robertburrelldonkin@blueyonder.co.uk] 
Sent: Tuesday, July 29, 2003 2:41 PM
To: Jakarta Commons Users List
Subject: Re: Set date issue

On Monday, July 28, 2003, at 11:29 PM, Ujjwala Kulkarni wrote:

> Hi ,
>
> Thanks for replying. Let me try that for Date.

i'm pretty sure that this works with CVS HEAD (i've added some unit tests 
to make sure).

> I also observed that betwixt can not convert the 'int' as the object 
> passed  to the method is Integer instead of int. I do not see any error 
> but the  values set in the bean are 0's which are default values .
>
> I supplied a bean to betwixt and converted it to XML. Then used the 
> betwixt to read the XML to convert it to bean. I do not see the bean's 
> 'int' attributes populated as I supplied in the first place.

this sounds a little mysterious. there are quite a few tests that use 
beans that have int attributes. does the property take an int or an 
Integer?

if you could supply an example that i could use to replicate the problem 
in a test case then i'd be glad to take a look.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



Re: Set date issue

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Monday, July 28, 2003, at 11:29 PM, Ujjwala Kulkarni wrote:

> Hi ,
>
> Thanks for replying. Let me try that for Date.

i'm pretty sure that this works with CVS HEAD (i've added some unit tests 
to make sure).

> I also observed that betwixt can not convert the 'int' as the object 
> passed  to the method is Integer instead of int. I do not see any error 
> but the  values set in the bean are 0's which are default values .
>
> I supplied a bean to betwixt and converted it to XML. Then used the 
> betwixt to read the XML to convert it to bean. I do not see the bean's 
> 'int' attributes populated as I supplied in the first place.

this sounds a little mysterious. there are quite a few tests that use 
beans that have int attributes. does the property take an int or an 
Integer?

if you could supply an example that i could use to replicate the problem 
in a test case then i'd be glad to take a look.

- robert


RE: Set date issue

Posted by Ujjwala Kulkarni <uj...@bea.com>.
Hi , 

Thanks for replying. Let me try that for Date. 

I also observed that betwixt can not convert the 'int' as the object passed  to the method is Integer instead of int. I do not see any error but the  values set in the bean are 0's which are default values .

I supplied a bean to betwixt and converted it to XML. Then used the betwixt to read the XML to convert it to bean. I do not see the bean's 'int' attributes populated as I supplied in the first place. 

Thanks and Regards,
Ujjwala

-----Original Message-----
From: robert burrell donkin [mailto:robertburrelldonkin@blueyonder.co.uk] 
Sent: Monday, July 28, 2003 3:17 PM
To: Jakarta Commons Users List
Subject: Re: Set date issue

hi

betwixt uses ConvertUtils to perform date to string conversions. if you 
haven't, then try registering a converter that understands the date format 
you use.

for example

      MyDateConverter converter = new MyDateConverter();
      ConvertUtils.register(converter, java.util.Date.class);

- robert

On Tuesday, July 22, 2003, at 06:39 PM, Ujjwala Kulkarni wrote:

> Hi ,
>
> Not sure why I am not able to attach the java file but pasting the code 
> for
>
> /*
>  * Created on Feb 20, 2003
>  *
>  * To change this generated comment go to
>  * Window>Preferences>Java>Code Generation>Code Template
>  */
> package com.bea.it.cib.common.license;
>
> import java.util.Collection;
> import java.util.Date;
> import java.util.ArrayList;
> import java.io.Serializable;
>
> import com.bea.it.cib.common.order.OrderRequestLineDTO;
> import com.bea.is.domain.DomainObject;
> import com.bea.is.data.persistence.PersistenceCommand;
>
> /**
>  * @author CIB Team
>  */
> public class LicenseActivityDTO extends DomainObject implements 
> Serializable {
>
> 	private String activitySeq = null;
> 	private Collection fromLicense = new ArrayList();
> 	private Collection toLicense = new ArrayList();
> 	private LicenseActivityType activityType = null; //constants
> 	private SourceType SourceType = null;
> 	private Date createDate = null;
> 	private Date lastUpdate = null;
> 	private Date lastUpdateUserId = null;
> 	private OrderRequestLineDTO orderRequestLine = null;
> 	private Collection oldKeysRef = new ArrayList();
> 	// only used if old lic isnt avail
> 	private Collection oldOrderLinesRef = new ArrayList();
> 	//used in the ELA Burndown scenario
>
> 	public LicenseActivityDTO() {
> 		this(null);
> 	}
>
> 	public LicenseActivityDTO(LicenseActivityType activityType) {
> 		this.activityType = activityType;
> 		this.setCommand(PersistenceCommand.NEW);
> 	}
>
> 	/**
> 	 * @return String
> 	 */
> 	public String getActivitySeq() {
> 		return activitySeq;
> 	}
>
> 	/**
> 	 * @return Calendar
> 	 */
> 	public Date getCreateDate() {
> 		return createDate;
> 	}
>
> 	/**
> 	 * @return LicenseDTO
> 	 */
> 	public Collection getFromLicense() {
> 		return fromLicense;
> 	}
>
> 	/**
> 	 * @return Date
> 	 */
> 	public Date getLastUpdate() {
> 		return lastUpdate;
> 	}
>
> 	/**
> 	 * @return Date
> 	 */
> 	public Date getLastUpdateUserId() {
> 		return lastUpdateUserId;
> 	}
>
> 	/**
> 	 * @return OrderRequestLineDTO
> 	 */
> 	public OrderRequestLineDTO getOrderRequestLine() {
> 		return orderRequestLine;
> 	}
>
> 	/**
> 	 * @return RequestSourceType
> 	 */
> 	public SourceType getSourceType() {
> 		return SourceType;
> 	}
>
> 	/**
> 	 * @return LicenseDTO
> 	 */
> 	public Collection getToLicense() {
> 		return toLicense;
> 	}
>
> 	/**
> 	 * Sets the activitySeq.
> 	 * @param activitySeq The activitySeq to set
> 	 */
> 	public void setActivitySeq(String activitySeq) {
> 		this.activitySeq = activitySeq;
> 	}
>
> 	/**
> 	 * Sets the createDate.
> 	 * @param createDate The createDate to set
> 	 */
> 	public void setCreateDate(Date createDate) {
> 		this.createDate = createDate;
> 	}
>
> 	/**
> 	 * Sets the lastUpdate.
> 	 * @param lastUpdate The lastUpdate to set
> 	 */
> 	public void setLastUpdate(Date lastUpdate) {
> 		this.lastUpdate = lastUpdate;
> 	}
>
> 	/**
> 	 * Sets the lastUpdateUserId.
> 	 * @param lastUpdateUserId The lastUpdateUserId to set
> 	 */
> 	public void setLastUpdateUserId(Date lastUpdateUserId) {
> 		this.lastUpdateUserId = lastUpdateUserId;
> 	}
>
> 	/**
> 	 * Sets the orderRequestLine.
> 	 * @param orderRequestLine The orderRequestLine to set
> 	 */
> 	public void setOrderRequestLine(OrderRequestLineDTO 
> orderRequestLine) {
> 		this.orderRequestLine = orderRequestLine;
> 	}
>
> 	/**
> 	 * Sets the requestSourceType.
> 	 * @param SourceType The SourceType to set
> 	 */
> 	public void setRequestSourceType(SourceType SourceType) {
> 		this.SourceType = SourceType;
> 	}
>
> 	/**
> 	 * @return LicenseActivityTypeEnum
> 	 */
> 	public LicenseActivityType getActivityType() {
> 		return activityType;
> 	}
>
> 	/**
> 	 * Sets the activityType.
> 	 * @param activityType The activityType to set
> 	 */
> 	public void setActivityType(LicenseActivityType activityType) {
> 		this.activityType = activityType;
> 	}
>
> 	public Collection getOldKeysRef() {
> 		return oldKeysRef;
> 	}
>
> 	public void addOldKeyRef(LicenseKeyDTO licKey) {
> 		this.oldKeysRef.add(licKey);
> 	}
>
> 	public Collection getOldOrderLinesRef() {
> 		return oldOrderLinesRef;
> 	}
>
> 	public void addOldOrderLinesRef(OrderRequestLineDTO orld) {
> 		this.oldOrderLinesRef.add(orld);
> 	}
> 	/* (non-Javadoc)
> 	 * @see java.lang.Object#toString()
> 	 */
> 	public String toString() {
> 		StringBuffer strBuf = new StringBuffer();
> 		strBuf.append("\n\t===================================");
> 		strBuf.append("\n\tStart Contents of License Activity ");
> 		strBuf.append("\n\t===================================");
> 		strBuf.append("\n\tActivity Sequence = " + this.activitySeq);
> 		strBuf.append("\n\tActivity Type = " + this.activityType);
> 		strBuf.append("\n\tPersistence Command = " + this.command);
> 		strBuf.append("\n\tCreate Date = " + this.createDate);
> 		strBuf.append("\n\tFrom License = " + this.fromLicense);
> 		strBuf.append("\n\tLast Update = " + this.lastUpdate);
> 		strBuf.append("\n\tLast Updated User ID = " + this.lastUpdateUserId);
> 		strBuf.append("\n\tOld Keys Ref = " + this.oldKeysRef);
> 		strBuf.append("\n\tOld Order Line Ref = " + this.oldOrderLinesRef);
> 		strBuf.append("\n\tOrder Request Line = " + this.orderRequestLine);
> 		strBuf.append("\n\tSource Type = " + this.SourceType);
> 		strBuf.append("\n\t===================================");
> 		strBuf.append("\n\tEnd Contents of License Activity ");
> 		strBuf.append("\n\t===================================");
>
> 		return strBuf.toString();
> 	}
>
> }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



Re: Set date issue

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi

betwixt uses ConvertUtils to perform date to string conversions. if you 
haven't, then try registering a converter that understands the date format 
you use.

for example

      MyDateConverter converter = new MyDateConverter();
      ConvertUtils.register(converter, java.util.Date.class);

- robert

On Tuesday, July 22, 2003, at 06:39 PM, Ujjwala Kulkarni wrote:

> Hi ,
>
> Not sure why I am not able to attach the java file but pasting the code 
> for
>
> /*
>  * Created on Feb 20, 2003
>  *
>  * To change this generated comment go to
>  * Window>Preferences>Java>Code Generation>Code Template
>  */
> package com.bea.it.cib.common.license;
>
> import java.util.Collection;
> import java.util.Date;
> import java.util.ArrayList;
> import java.io.Serializable;
>
> import com.bea.it.cib.common.order.OrderRequestLineDTO;
> import com.bea.is.domain.DomainObject;
> import com.bea.is.data.persistence.PersistenceCommand;
>
> /**
>  * @author CIB Team
>  */
> public class LicenseActivityDTO extends DomainObject implements 
> Serializable {
>
> 	private String activitySeq = null;
> 	private Collection fromLicense = new ArrayList();
> 	private Collection toLicense = new ArrayList();
> 	private LicenseActivityType activityType = null; //constants
> 	private SourceType SourceType = null;
> 	private Date createDate = null;
> 	private Date lastUpdate = null;
> 	private Date lastUpdateUserId = null;
> 	private OrderRequestLineDTO orderRequestLine = null;
> 	private Collection oldKeysRef = new ArrayList();
> 	// only used if old lic isnt avail
> 	private Collection oldOrderLinesRef = new ArrayList();
> 	//used in the ELA Burndown scenario
>
> 	public LicenseActivityDTO() {
> 		this(null);
> 	}
>
> 	public LicenseActivityDTO(LicenseActivityType activityType) {
> 		this.activityType = activityType;
> 		this.setCommand(PersistenceCommand.NEW);
> 	}
>
> 	/**
> 	 * @return String
> 	 */
> 	public String getActivitySeq() {
> 		return activitySeq;
> 	}
>
> 	/**
> 	 * @return Calendar
> 	 */
> 	public Date getCreateDate() {
> 		return createDate;
> 	}
>
> 	/**
> 	 * @return LicenseDTO
> 	 */
> 	public Collection getFromLicense() {
> 		return fromLicense;
> 	}
>
> 	/**
> 	 * @return Date
> 	 */
> 	public Date getLastUpdate() {
> 		return lastUpdate;
> 	}
>
> 	/**
> 	 * @return Date
> 	 */
> 	public Date getLastUpdateUserId() {
> 		return lastUpdateUserId;
> 	}
>
> 	/**
> 	 * @return OrderRequestLineDTO
> 	 */
> 	public OrderRequestLineDTO getOrderRequestLine() {
> 		return orderRequestLine;
> 	}
>
> 	/**
> 	 * @return RequestSourceType
> 	 */
> 	public SourceType getSourceType() {
> 		return SourceType;
> 	}
>
> 	/**
> 	 * @return LicenseDTO
> 	 */
> 	public Collection getToLicense() {
> 		return toLicense;
> 	}
>
> 	/**
> 	 * Sets the activitySeq.
> 	 * @param activitySeq The activitySeq to set
> 	 */
> 	public void setActivitySeq(String activitySeq) {
> 		this.activitySeq = activitySeq;
> 	}
>
> 	/**
> 	 * Sets the createDate.
> 	 * @param createDate The createDate to set
> 	 */
> 	public void setCreateDate(Date createDate) {
> 		this.createDate = createDate;
> 	}
>
> 	/**
> 	 * Sets the lastUpdate.
> 	 * @param lastUpdate The lastUpdate to set
> 	 */
> 	public void setLastUpdate(Date lastUpdate) {
> 		this.lastUpdate = lastUpdate;
> 	}
>
> 	/**
> 	 * Sets the lastUpdateUserId.
> 	 * @param lastUpdateUserId The lastUpdateUserId to set
> 	 */
> 	public void setLastUpdateUserId(Date lastUpdateUserId) {
> 		this.lastUpdateUserId = lastUpdateUserId;
> 	}
>
> 	/**
> 	 * Sets the orderRequestLine.
> 	 * @param orderRequestLine The orderRequestLine to set
> 	 */
> 	public void setOrderRequestLine(OrderRequestLineDTO 
> orderRequestLine) {
> 		this.orderRequestLine = orderRequestLine;
> 	}
>
> 	/**
> 	 * Sets the requestSourceType.
> 	 * @param SourceType The SourceType to set
> 	 */
> 	public void setRequestSourceType(SourceType SourceType) {
> 		this.SourceType = SourceType;
> 	}
>
> 	/**
> 	 * @return LicenseActivityTypeEnum
> 	 */
> 	public LicenseActivityType getActivityType() {
> 		return activityType;
> 	}
>
> 	/**
> 	 * Sets the activityType.
> 	 * @param activityType The activityType to set
> 	 */
> 	public void setActivityType(LicenseActivityType activityType) {
> 		this.activityType = activityType;
> 	}
>
> 	public Collection getOldKeysRef() {
> 		return oldKeysRef;
> 	}
>
> 	public void addOldKeyRef(LicenseKeyDTO licKey) {
> 		this.oldKeysRef.add(licKey);
> 	}
>
> 	public Collection getOldOrderLinesRef() {
> 		return oldOrderLinesRef;
> 	}
>
> 	public void addOldOrderLinesRef(OrderRequestLineDTO orld) {
> 		this.oldOrderLinesRef.add(orld);
> 	}
> 	/* (non-Javadoc)
> 	 * @see java.lang.Object#toString()
> 	 */
> 	public String toString() {
> 		StringBuffer strBuf = new StringBuffer();
> 		strBuf.append("\n\t===================================");
> 		strBuf.append("\n\tStart Contents of License Activity ");
> 		strBuf.append("\n\t===================================");
> 		strBuf.append("\n\tActivity Sequence = " + this.activitySeq);
> 		strBuf.append("\n\tActivity Type = " + this.activityType);
> 		strBuf.append("\n\tPersistence Command = " + this.command);
> 		strBuf.append("\n\tCreate Date = " + this.createDate);
> 		strBuf.append("\n\tFrom License = " + this.fromLicense);
> 		strBuf.append("\n\tLast Update = " + this.lastUpdate);
> 		strBuf.append("\n\tLast Updated User ID = " + this.lastUpdateUserId);
> 		strBuf.append("\n\tOld Keys Ref = " + this.oldKeysRef);
> 		strBuf.append("\n\tOld Order Line Ref = " + this.oldOrderLinesRef);
> 		strBuf.append("\n\tOrder Request Line = " + this.orderRequestLine);
> 		strBuf.append("\n\tSource Type = " + this.SourceType);
> 		strBuf.append("\n\t===================================");
> 		strBuf.append("\n\tEnd Contents of License Activity ");
> 		strBuf.append("\n\t===================================");
>
> 		return strBuf.toString();
> 	}
>
> }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


RE: Set date issue

Posted by Ujjwala Kulkarni <uj...@bea.com>.
Hi , 

Not sure why I am not able to attach the java file but pasting the code for 

/*
 * Created on Feb 20, 2003
 *
 * To change this generated comment go to
 * Window>Preferences>Java>Code Generation>Code Template
 */
package com.bea.it.cib.common.license;

import java.util.Collection;
import java.util.Date;
import java.util.ArrayList;
import java.io.Serializable;

import com.bea.it.cib.common.order.OrderRequestLineDTO;
import com.bea.is.domain.DomainObject;
import com.bea.is.data.persistence.PersistenceCommand;

/**
 * @author CIB Team
 */
public class LicenseActivityDTO extends DomainObject implements Serializable {

	private String activitySeq = null;
	private Collection fromLicense = new ArrayList();
	private Collection toLicense = new ArrayList();
	private LicenseActivityType activityType = null; //constants
	private SourceType SourceType = null;
	private Date createDate = null;
	private Date lastUpdate = null;
	private Date lastUpdateUserId = null;
	private OrderRequestLineDTO orderRequestLine = null;
	private Collection oldKeysRef = new ArrayList();
	// only used if old lic isnt avail
	private Collection oldOrderLinesRef = new ArrayList();
	//used in the ELA Burndown scenario

	public LicenseActivityDTO() {
		this(null);
	}

	public LicenseActivityDTO(LicenseActivityType activityType) {
		this.activityType = activityType;
		this.setCommand(PersistenceCommand.NEW);
	}

	/**
	 * @return String
	 */
	public String getActivitySeq() {
		return activitySeq;
	}

	/**
	 * @return Calendar
	 */
	public Date getCreateDate() {
		return createDate;
	}

	/**
	 * @return LicenseDTO
	 */
	public Collection getFromLicense() {
		return fromLicense;
	}

	/**
	 * @return Date
	 */
	public Date getLastUpdate() {
		return lastUpdate;
	}

	/**
	 * @return Date
	 */
	public Date getLastUpdateUserId() {
		return lastUpdateUserId;
	}

	/**
	 * @return OrderRequestLineDTO
	 */
	public OrderRequestLineDTO getOrderRequestLine() {
		return orderRequestLine;
	}

	/**
	 * @return RequestSourceType
	 */
	public SourceType getSourceType() {
		return SourceType;
	}

	/**
	 * @return LicenseDTO
	 */
	public Collection getToLicense() {
		return toLicense;
	}

	/**
	 * Sets the activitySeq.
	 * @param activitySeq The activitySeq to set
	 */
	public void setActivitySeq(String activitySeq) {
		this.activitySeq = activitySeq;
	}

	/**
	 * Sets the createDate.
	 * @param createDate The createDate to set
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	/**
	 * Sets the lastUpdate.
	 * @param lastUpdate The lastUpdate to set
	 */
	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	/**
	 * Sets the lastUpdateUserId.
	 * @param lastUpdateUserId The lastUpdateUserId to set
	 */
	public void setLastUpdateUserId(Date lastUpdateUserId) {
		this.lastUpdateUserId = lastUpdateUserId;
	}

	/**
	 * Sets the orderRequestLine.
	 * @param orderRequestLine The orderRequestLine to set
	 */
	public void setOrderRequestLine(OrderRequestLineDTO orderRequestLine) {
		this.orderRequestLine = orderRequestLine;
	}

	/**
	 * Sets the requestSourceType.
	 * @param SourceType The SourceType to set
	 */
	public void setRequestSourceType(SourceType SourceType) {
		this.SourceType = SourceType;
	}

	/**
	 * @return LicenseActivityTypeEnum
	 */
	public LicenseActivityType getActivityType() {
		return activityType;
	}

	/**
	 * Sets the activityType.
	 * @param activityType The activityType to set
	 */
	public void setActivityType(LicenseActivityType activityType) {
		this.activityType = activityType;
	}

	public Collection getOldKeysRef() {
		return oldKeysRef;
	}

	public void addOldKeyRef(LicenseKeyDTO licKey) {
		this.oldKeysRef.add(licKey);
	}

	public Collection getOldOrderLinesRef() {
		return oldOrderLinesRef;
	}

	public void addOldOrderLinesRef(OrderRequestLineDTO orld) {
		this.oldOrderLinesRef.add(orld);
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		StringBuffer strBuf = new StringBuffer();
		strBuf.append("\n\t===================================");
		strBuf.append("\n\tStart Contents of License Activity ");
		strBuf.append("\n\t===================================");
		strBuf.append("\n\tActivity Sequence = " + this.activitySeq);
		strBuf.append("\n\tActivity Type = " + this.activityType);
		strBuf.append("\n\tPersistence Command = " + this.command);
		strBuf.append("\n\tCreate Date = " + this.createDate);
		strBuf.append("\n\tFrom License = " + this.fromLicense);
		strBuf.append("\n\tLast Update = " + this.lastUpdate);
		strBuf.append("\n\tLast Updated User ID = " + this.lastUpdateUserId);
		strBuf.append("\n\tOld Keys Ref = " + this.oldKeysRef);
		strBuf.append("\n\tOld Order Line Ref = " + this.oldOrderLinesRef);
		strBuf.append("\n\tOrder Request Line = " + this.orderRequestLine);
		strBuf.append("\n\tSource Type = " + this.SourceType);
		strBuf.append("\n\t===================================");
		strBuf.append("\n\tEnd Contents of License Activity ");
		strBuf.append("\n\t===================================");

		return strBuf.toString();
	}

}


RE: Set date issue

Posted by Ujjwala Kulkarni <uj...@bea.com>.
Hi, 

Thanks for replying. 
Attaching the file that is giving me problem. 

Thanks and Regards,
Ujjwala

-----Original Message-----
From: Larry Young [mailto:lyoung@dalmatian.com] 
Sent: Monday, July 21, 2003 5:12 PM
To: Jakarta Commons Users List
Subject: Re: Set date issue

Ujjwala,

         It would sound like your bean doesn't have the symmetric 
signatures for get and set.

         Could you include the Java file for the bean which is causing this 
problem?

--- regards ---
Larry


At 04:25 PM 7/21/03 -0700, you wrote:
>Hello,
>
>This is Ujjwala. I am using betwixt. My bean has set and get methods. 
>BeanWriter writes the date so the beanReader tries to invoke the setDate 
>method with String.
>
>I get a warning that 'Can not evaluate method setDate' with parameter type 
>String. IllegalArgumentException is thrown.
>
>I will appreciate if you help me with this issue.
>
>Thanks and Regards,
>Ujjwala
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org

--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Set date issue

Posted by Larry Young <ly...@dalmatian.com>.
Ujjwala,

         It would sound like your bean doesn't have the symmetric 
signatures for get and set.

         Could you include the Java file for the bean which is causing this 
problem?

--- regards ---
Larry


At 04:25 PM 7/21/03 -0700, you wrote:
>Hello,
>
>This is Ujjwala. I am using betwixt. My bean has set and get methods. 
>BeanWriter writes the date so the beanReader tries to invoke the setDate 
>method with String.
>
>I get a warning that 'Can not evaluate method setDate' with parameter type 
>String. IllegalArgumentException is thrown.
>
>I will appreciate if you help me with this issue.
>
>Thanks and Regards,
>Ujjwala
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org

--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com