home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 2.8 KB | 92 lines |
- /*
- * @(#ExceptionEvent.java
- *
- * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
- *
- */
-
- //This class specifies an Exception event for an given Exception. The Exception event's parameters include
- // the Exception name, which should be descriptive enough
-
- // the event type, which is one of EXCEPTION_SQL, EXCEPTION_APPLICATION.
-
- // the object that created the event.
- // the data item referred to by the event
-
- package symantec.itools.db.beans.binding;
-
-
- public class ExceptionEvent extends java.util.EventObject
- {
- //EXCEPTION_SQL
- //Event type sent by a source to announce a SQLException.
- public static final int EXCEPTION_SQL =0;
-
- //EXCEPTION_APPLICATION
- //Event type sent by a source to indicate that an application Exception.
- public static final int EXCEPTION_APPLICATION =1;
-
- //EXCEPTION_CAST
- //Event type sent by a source to indicate that an application Exception.
- public static final int EXCEPTION_CAST =2;
-
- //EXCEPTION_NOROWS
- //Event type sent by QueryNavigator to indicate that the RecordSet has no rows at all.
- public static final int EXCEPTION_NOROWS =3;
-
- //EXCEPTION_FIRSTROW
- //Event type sent by QueryNavigator to indicate that the RecordSet has been reaching the first row.
- public static final int EXCEPTION_FIRSTROW=5;
-
- //EXCEPTION_LASTROW
- //Event type sent by QueryNavigator to indicate that the RecordSet has been reaching the last row.
- public static final int EXCEPTION_LASTROW =6;
- //EXCEPTION_PARENT_INVALID_RECORD
- //Event type sent by QueryNavigator to indicate that navigation is tried in the details of a new inserted Master
- public static final int EXCEPTION_PARENT_INVALID_RECORD =7;
-
- //Event type sent by QueryNavigator to indicate that we try to make a M/D with the same QN
- public static final int EXCEPTION_ILLEGAL_RELATIONSHIP =7;
- //Event type sent by QueryNavigator to indicate that we couldn't solve the relationship between
- //the Master and the Detail in the QuerySynchronizer
- public static final int EXCEPTION_RELATIONSHIP_PENDING=8;
-
- // this event type is used for debugging purpose. All the lines of codes including this line should be comment out when shipping
- public static final int DEBUGGING_MESSAGE=100;
-
-
- private int ty;
- private String itNa;
- private Exception ex;
-
- public ExceptionEvent(int type, String itemName, Object source)
- {
- super(source);
- ty=type;
- itNa=itemName;
- }
-
- public ExceptionEvent(int type, String itemName, Object source, Exception e)
- {
- super(source);
- ty=type;
- itNa=itemName;
- ex=e;
- }
-
-
- public synchronized Exception getException()
- {
- return ex;
- }
-
- public synchronized int getEventType()
- {
- return ty;
- }
-
- public synchronized String getExceptionName()
- {
- return itNa;
- }
- }