1 23 24 package com.sun.enterprise.admin.common; 25 26 31 32 public class EntityStatus extends Status 33 { 34 35 public static final long serialVersionUID = 120287380119583589L; 36 37 public static final String kEnabledStr = "enabled"; 38 public static final String kDisabledStr = "disabled"; 39 40 43 public EntityStatus() 44 { 45 super(Status.kEntityEnabledCode, kEnabledStr); 46 } 47 48 50 public EntityStatus(int code, String str) 51 { 52 super(code, str); 53 } 54 55 public void setDisabled() 56 { 57 if (!isDisabled()) 58 { 59 mStatusCode = Status.kEntityDisabledCode; 60 mStatusString = kDisabledStr; 61 } 62 } 63 64 67 public void setEnabled() 68 { 69 if (!isEnabled()) 70 { 71 mStatusCode = Status.kEntityEnabledCode; 72 mStatusString = kEnabledStr; 73 } 74 } 75 76 81 public boolean isEnabled () 82 { 83 return (mStatusCode == Status.kEntityEnabledCode); 84 } 85 86 91 public boolean isDisabled () 92 { 93 return (mStatusCode == Status.kEntityDisabledCode); 94 } 95 } | Popular Tags |