KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > impl > core > NodeChangeState


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.services.jcr.impl.core;
7
8 /**
9  * Created by The eXo Platform SARL .
10  *
11  * @author <a HREF="mailto:geaz@users.sourceforge.net">Gennady Azarenkov</a>
12  * @version $Id: NodeChangeState.java,v 1.5 2004/09/16 15:26:53 geaz Exp $
13  */

14
15 public class NodeChangeState {
16   public static final int UNDEFINED = 0;
17   public static final int ADDED = 1;
18   public static final int UPDATED = 2;
19   public static final int DELETED = 3;
20   public static final int UNCHANGED = 4;
21   public static final int REF_ADDED = 5;
22
23
24   public static String JavaDoc getStateName(int state) {
25     if (state == ADDED)
26       return "ADDED";
27     else if (state == UPDATED)
28       return "UPDATED";
29     else if (state == DELETED)
30       return "DELETED";
31     else if (state == UNCHANGED)
32       return "UNCHANGED";
33     else if (state == REF_ADDED)
34       return "REFERENCE ADDED";
35     else
36       return "UNDEFINED";
37   }
38 }
39
Popular Tags