KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > notification > filter > ConstraintEntry


1 package org.jacorb.notification.filter;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1999-2004 Gerald Brose
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  */

23
24 import org.jacorb.notification.EventTypeWrapper;
25 import org.omg.CosNotifyFilter.ConstraintInfo;
26
27 /**
28  * @author Alphonse Bendt
29  * @version $Id: ConstraintEntry.java,v 1.1 2005/02/14 00:04:35 alphonse.bendt Exp $
30  */

31
32 public class ConstraintEntry
33 {
34     private final FilterConstraint filterConstraint_;
35
36     private final ConstraintInfo constraintInfo_;
37
38     ////////////////////////////////////////
39

40     public ConstraintEntry( FilterConstraint filterConstraint,
41                      ConstraintInfo constraintInfo )
42     {
43         filterConstraint_ = filterConstraint;
44         constraintInfo_ = constraintInfo;
45     }
46
47     ////////////////////////////////////////
48

49     public EventTypeWrapper getEventTypeWrapper( int index )
50     {
51         return new EventTypeWrapper( constraintInfo_.constraint_expression.event_types[ index ] );
52     }
53
54
55     public int getEventTypeCount()
56     {
57         return constraintInfo_.constraint_expression.event_types.length;
58     }
59
60
61     public int getConstraintId()
62     {
63         return constraintInfo_.constraint_id;
64     }
65
66
67     public ConstraintInfo getConstraintInfo()
68     {
69         return constraintInfo_;
70     }
71
72     public String JavaDoc getConstraintExpression()
73     {
74         return constraintInfo_.constraint_expression.constraint_expr;
75     }
76
77     public FilterConstraint getFilterConstraint()
78     {
79         return filterConstraint_;
80     }
81 }
82
Popular Tags