User: mulder  
  Date: 00/06/06 17:02:53

  Modified:    src/main/org/jboss/verifier/event VerificationEvent.java
  Log:
  Add Primary Key validations for Entity Beans.
  
  Revision  Changes    Path
  1.2       +24 -19    jboss/src/main/org/jboss/verifier/event/VerificationEvent.java
  
  Index: VerificationEvent.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/event/VerificationEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VerificationEvent.java    2000/05/29 18:26:31     1.1
  +++ VerificationEvent.java    2000/06/07 00:02:52     1.2
  @@ -13,13 +13,13 @@
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
  - * 
  + *
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    *
    * This package and its source code is available at www.gjt.org
  - * $Id: VerificationEvent.java,v 1.1 2000/05/29 18:26:31 juha Exp $
  + * $Id: VerificationEvent.java,v 1.2 2000/06/07 00:02:52 mulder Exp $
    *
    * You can reach the author by sending email to [EMAIL PROTECTED] or
    * directly to [EMAIL PROTECTED]
  @@ -42,17 +42,17 @@
    * @see     << OTHER RELATED CLASSES >>
    *
    * @author   Juha Lindfors
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    * @since    JDK 1.3
    */
   public class VerificationEvent extends EventObject {
   
       public static final String WARNING  = "WARNING";
       public static final String OK       = "OK";
  -    
  +
       private boolean isOk      = false;
       private boolean isWarning = false;
  -    
  +
   
       /*
        * Contains a short, one line message for this event.
  @@ -63,55 +63,60 @@
        * Contains a more verbose description of this event.
        */
       private String verbose = "";
  -    
  -    
  +
  +
       /*
        * Constructor
        */
       public VerificationEvent(VerificationEventGenerator source) {
           super(source);
       }
  -    
  +
  +    public VerificationEvent(VerificationEventGenerator source, String message) {
  +        this(source);
  +        setMessage(message);
  +    }
  +
       public void setState(String state) {
  -        
  +
           if (WARNING.equalsIgnoreCase(state)) {
               isWarning = true;
               isOk      = false;
           }
  -            
  +
           else if (OK.equalsIgnoreCase(state)) {
               isOk      = true;
               isWarning = false;
           }
  -            
  -        else 
  +
  +        else
               throw new IllegalArgumentException(STATE_NOT_RECOGNIZED + ": " + state);
       }
  -    
  +
       public boolean isOk() {
           return isOk;
       }
  -    
  +
       public boolean isWarning() {
           return isWarning;
       }
  -    
  +
       public void setMessage(String msg) {
           this.message = msg;
       }
  -    
  +
       public void setVerbose(String msg) {
           this.verbose = msg;
       }
  -    
  +
       public String getMessage() {
           return message;
       }
  -    
  +
       public String getVerbose() {
           return verbose;
       }
  -    
  +
       /*
        * String constants
        */
  
  
  

Reply via email to