package org.ovirt.engine.core.common.businessentities;

import java.util.HashMap;

public enum StorageType implements Identifiable {

    UNKNOWN(0, false),
    NFS(1, true),
    FCP(2, true),
    ISCSI(3, true),
    LOCALFS(4, true),
    POSIXFS(6, true),
    GLUSTERFS(7, true),
    GLANCE(8, true);

    private int value;
    // this member is indicating whether then enum value represents an actual storage type
    private boolean isConcreteStorageType;

    private static final java.util.HashMap<Integer, StorageType> mappings = new HashMap<Integer, StorageType>();

    static {
        for (StorageType storageType : values()) {
            mappings.put(storageType.getValue(), storageType);
        }
    }

    private StorageType(int value, boolean isConcreteStorageType) {
        this.value = value;
        this.isConcreteStorageType = isConcreteStorageType;
    }

    @Override
    public int getValue() {
        return this.value;
    }

    public boolean isConcreteStorageType() {
        return this.isConcreteStorageType;
    }

    public static StorageType forValue(int value) {
        return mappings.get(value);
    }

    public boolean isFileDomain() {
        return this == NFS || this == POSIXFS || this == LOCALFS || this == GLUSTERFS || this == GLANCE;
    }

    public boolean isBlockDomain() {
        return this == FCP || this == ISCSI;
    }

}

@@ -144,15 +144,8 @@
 WN(0
-, false
 ),%0A 
@@ -152,22 +152,16 @@
    NFS(1
-, true
 ),%0A    F
@@ -164,22 +164,16 @@
    FCP(2
-, true
 ),%0A    I
@@ -178,22 +178,16 @@
  ISCSI(3
-, true
 ),%0A    L
@@ -194,22 +194,16 @@
 OCALFS(4
-, true
 ),%0A    P
@@ -210,22 +210,16 @@
 OSIXFS(6
-, true
 ),%0A    G
@@ -228,22 +228,16 @@
 STERFS(7
-, true
 ),%0A    G
@@ -247,14 +247,8 @@
 CE(8
-, true
 );%0A%0A
@@ -273,142 +273,8 @@
 lue;
-%0A    // this member is indicating whether then enum value represents an actual storage type%0A    private boolean isConcreteStorageType;
 %0A%0A  
@@ -296,26 +296,16 @@
 c final 
-java.util.
 HashMap%3C
@@ -556,128 +556,37 @@
 alue
-, boolean isConcreteStorageType) %7B%0A        this.value = value;%0A        this.isConcreteStorageType = isConcreteStorageTyp
+) %7B%0A        this.value = valu
 e;%0A 
@@ -735,30 +735,19 @@
 this
-.isConcreteStorageType
+ != UNKNOWN
 ;%0A  
@@ -1082,11 +1082,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

Remove concreteStorageType property from StorageType enum.