KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > oa > poa > IdUniquenessPolicyImpl


1 /*
2  * @(#)IdUniquenessPolicyImpl.java 1.15 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.oa.poa;
9
10 import org.omg.CORBA.*;
11 import org.omg.PortableServer.*;
12
13 final class IdUniquenessPolicyImpl
14     extends org.omg.CORBA.LocalObject JavaDoc implements IdUniquenessPolicy {
15
16     public IdUniquenessPolicyImpl(IdUniquenessPolicyValue value) {
17     this.value = value;
18     }
19
20     public IdUniquenessPolicyValue value() {
21     return value;
22     }
23  
24     public int policy_type()
25     {
26     return ID_UNIQUENESS_POLICY_ID.value ;
27     }
28
29     public Policy copy() {
30     return new IdUniquenessPolicyImpl(value);
31     }
32
33     public void destroy() {
34     value = null;
35     }
36
37     private IdUniquenessPolicyValue value;
38
39     public String JavaDoc toString()
40     {
41     return "IdUniquenessPolicy[" +
42         ((value.value() == IdUniquenessPolicyValue._UNIQUE_ID) ?
43         "UNIQUE_ID" : "MULTIPLE_ID" + "]") ;
44     }
45 }
46
Popular Tags