commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhanu Pabreja" <pabr...@infigroup.com>
Subject [BeanUtil]- how to extend the DynaBean.
Date Thu, 04 Dec 2003 16:35:14 GMT
Hi All,

I hava a interface which has certain properties which are missing from the
DynaBean interface like the a field like
mode - which reflects the state of the bean.

Actually I was using TOs in my project which all implemented this interface
and since every TO represented a row in a database the state which was in
the field 'mode' was every important.

Now using the BasicDynaBean was a good idea but then I missed this field.

How can I actually put this property in my Base interface or class so that
it is available every where.

Also my interface has some static final String which are required also since
they are the constants which reflect the mode of the object.

If I am not clear please do ask me.

Thanx in advance,

Bhanu Pabreja


This is my interface which I am using which:

public interface SOBBaseTOInterface extends Serializable {

	/**
	 * variable holding the value of unknown mode
	 **/
	public static final int MODE_UNKNOWN	=	0;

	/**
	 * variable holding the value of failure mode
	 **/
	public static final int MODE_FAILURE	=	1;

	/**
	 * variable holding the value of success mode
	 **/
	public static final int MODE_SUCCESS	=	2;
	/**
	 * variable holding the value of insert mode
	 **/
	public static final int MODE_INSERT		=	3;

	/**
	 * variable holding the value of update mode
	 **/
	public static final int MODE_UPDATE		=	4;

	/**
	 * variable holding the value of select mode
	 **/
	public static final int MODE_SELECT		=	5;

	/**
	 * variable holding the value of delete mode
	 **/
	public static final int MODE_DELETE		=	6;

	/**
	 * variable holding the value of static mode
	 **/
	public static final int MODE_STATIC		=	7;


	/**
	 * This method used to set Mode of the Operation.
	 *
	 * @param 		String
	 *
	 * @return 		none
	 *
	 * @exception 	none
	 **/
	public void setMode(int mode);


	/**
	 * This method is used to get Mode of the Operation.
	 *
	 * @param 		none
	 *
	 * @return 		String
	 *
	 * @exception 	none
	 */
	public int getMode();

}


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


Mime
View raw message