FileDocCategorySizeDatePackage
EntityStatus.javaAPI DocGlassfish v2 API3547Fri May 04 22:33:16 BST 2007com.sun.enterprise.admin.common

EntityStatus

public class EntityStatus extends Status
A class representing the status of an entity.
author
Kedar Mhaswade
version
1.0

Fields Summary
public static final long
serialVersionUID
public static final String
kEnabledStr
public static final String
kDisabledStr
Constructors Summary
public EntityStatus()
Creates new EntityStatus that represents an ENABLED entity.


                        
     
    
        super(Status.kEntityEnabledCode, kEnabledStr);
    
public EntityStatus(int code, String str)

        super(code, str);
    
Methods Summary
public booleanisDisabled()
Returns whether the entity is disabled.

return
true if the entity is disabled, false otherwise

        return (mStatusCode == Status.kEntityDisabledCode);
    
public booleanisEnabled()
Returns whether the entity is enabled.

return
true if the entity is enabled, false otherwise

        return (mStatusCode == Status.kEntityEnabledCode);
    
public voidsetDisabled()

        if (!isDisabled())
        {
            mStatusCode     = Status.kEntityDisabledCode;
            mStatusString   = kDisabledStr;
        }
    
public voidsetEnabled()

        if (!isEnabled())
        {
            mStatusCode     = Status.kEntityEnabledCode;
            mStatusString   = kEnabledStr;
        }