org.nuiton.topia.persistence.util
Enum DiffState

java.lang.Object
  extended by java.lang.Enum<DiffState>
      extended by org.nuiton.topia.persistence.util.DiffState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DiffState>

public enum DiffState
extends java.lang.Enum<DiffState>

Pour qualifier l'etat d'une entite lors du calcul d'un differentiel entre deux entites.

Since:
2.2.0
Author:
tchemit
See Also:
TopiaEntityHelper.buildDifferentiel(List, List)

Nested Class Summary
static class DiffState.DiffStateMap
           
 
Enum Constant Summary
MODIFIED
          entite modifie dans le storage de reference (voir topiaVersion).
NEW
          nouvel entite dans le storage de reference.
REMOVED
          entité supprimée dans le storage de reference.
 
Method Summary
static void addAll(DiffState.DiffStateMap mainMap, DiffState.DiffStateMap toAdd)
          Ajoute dans le premier dictionnaire, les listes du second dictionnaire.
static void clear(DiffState.DiffStateMap mainMap)
          Nettoye un dictionnaire donnee de toute ses donnees.
static DiffState.DiffStateMap newMap()
          Construit un dictionnaire avec pour tous les états une liste vide.
static void removeEmptyStates(DiffState.DiffStateMap mainMap)
          Supprime toutes les entrees vides du dictionnaire .
static DiffState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DiffState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NEW

public static final DiffState NEW
nouvel entite dans le storage de reference.

A ajouter dans le storage local.


MODIFIED

public static final DiffState MODIFIED
entite modifie dans le storage de reference (voir topiaVersion).

A mettre a jour dans le storage local.


REMOVED

public static final DiffState REMOVED
entité supprimée dans le storage de reference.

A supprimer du storage local (apres remplacement par autre chose...)

Method Detail

values

public static DiffState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DiffState c : DiffState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DiffState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

newMap

public static DiffState.DiffStateMap newMap()
Construit un dictionnaire avec pour tous les états une liste vide.

Returns:
le dictionnaire crée

addAll

public static void addAll(DiffState.DiffStateMap mainMap,
                          DiffState.DiffStateMap toAdd)
Ajoute dans le premier dictionnaire, les listes du second dictionnaire.

Parameters:
mainMap - le dictionnaire principale
toAdd - le dictionne a ajouter dans le dictionnaire principale

clear

public static void clear(DiffState.DiffStateMap mainMap)
Nettoye un dictionnaire donnee de toute ses donnees.

Parameters:
mainMap - le dictionnaire a nettoyer.

removeEmptyStates

public static void removeEmptyStates(DiffState.DiffStateMap mainMap)
Supprime toutes les entrees vides du dictionnaire .

Parameters:
mainMap - le dictionnaire a nettoyer


Copyright © 2004-2010 CodeLutin. All Rights Reserved.