wt.epm.upload
Class CacheObject

java.lang.Object
  extended bywt.epm.upload.CacheObject
All Implemented Interfaces:
CacheObjectOwner
Direct Known Subclasses:
CacheDocument, CacheDocument.CacheContainedInLink, CacheDocument.CacheDependencyLink, CacheDocument.CacheFamilyTableCell, CacheDocument.CacheFeatureValue, CacheDocument.CacheParameterMap, CacheDocument.CacheParameterValue, CacheDocument.CacheVariantLink, CacheFamilyTable, CacheFamilyTable.CacheFamilyTableColumn, CacheFamilyTable.CacheFeatureDefinition, CacheFamilyTable.CacheParameterDefinition

public class CacheObject
extends Object
implements CacheObjectOwner


Field Summary
private  Set attributeDefinitionNames
           
private static int CREATED
           
private static int DELETED
           
private  CacheId id
           
private static int MODIFIED
           
private  CacheObjectOwner owner
           
private  Persistable persistable
           
private static int RESERVED
           
private static String RESOURCE
           
private  BitSet status
           
 
Constructor Summary
CacheObject(CacheObjectOwner owner, Persistable persistable)
           
 
Method Summary
protected  void cacheCollection(Collection cacheObjects)
           
protected  void cacheObject(CacheObject cacheObject)
           
protected  void checkModifiability()
           
protected  void checkModifiability(String messageKey)
           
private  void checkStatusFlagValue(int flag)
           
 void clearStatus(int flag)
           
 void delete()
           
 void dump(PrintStream out, String shift)
           
 boolean equals(Object obj)
           
 Set getAttributeNames()
           
 Cache getCache()
           
 CacheId getCacheId()
           
protected  String getDisplayName()
           
 ObjectIdentifier getObjectIdentifier()
           
 Persistable getPersistableObject()
           
protected  String getStatusAsString()
           
 int hashCode()
           
 boolean isCreated()
           
 boolean isDeleted()
           
 boolean isHasAttributeDefinition(String name)
           
 boolean isMarkedAsCreated()
           
 boolean isMarkedAsModified()
           
 boolean isMarkedForDeletion()
           
 boolean isModified()
           
 boolean isPersisted()
           
 boolean isStatusSet(int flag)
           
 void markAsCreated()
           
 void markAsModified()
           
 void markAsModified(String messageKey)
           
 void markForDeletion()
           
static void markForDeletion(Collection cacheObjects)
           
 void markForDeletion(String messageKey)
           
 void prepareCreating()
           
 void prepareDeleting()
           
 void prepareUpdating()
           
 void refresh()
           
 void release()
           
 void releaseChildObject(CacheObject cacheObject)
          Removes child cache object from this owner cache object.
static void releaseCollection(Collection cacheObjects)
           
private  void releaseFromOwner()
           
static void releaseMap(Map cacheObjects)
           
static void releaseObject(CacheObject cacheObject)
           
static boolean removeValueFromMap(Map map, Object value)
           
 void save()
           
 void setMarkedAsCreated(boolean created)
           
 void setMarkedAsModified(boolean modified)
           
 void setMarkedForDeletion(boolean deleted)
           
(package private)  void setPersistableObject(Persistable persistable)
           
 void setStatus(int flag)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

owner

private CacheObjectOwner owner

id

private CacheId id

persistable

private Persistable persistable

CREATED

private static final int CREATED
See Also:
Constant Field Values

MODIFIED

private static final int MODIFIED
See Also:
Constant Field Values

DELETED

private static final int DELETED
See Also:
Constant Field Values

RESERVED

private static final int RESERVED
See Also:
Constant Field Values

status

private BitSet status

attributeDefinitionNames

private Set attributeDefinitionNames
Constructor Detail

CacheObject

public CacheObject(CacheObjectOwner owner,
                   Persistable persistable)
            throws WTException
Method Detail

getObjectIdentifier

public ObjectIdentifier getObjectIdentifier()

getCacheId

public CacheId getCacheId()

getPersistableObject

public Persistable getPersistableObject()

setPersistableObject

void setPersistableObject(Persistable persistable)
                    throws WTException
Throws:
WTException

isPersisted

public boolean isPersisted()

isStatusSet

public boolean isStatusSet(int flag)

setStatus

public void setStatus(int flag)
               throws WTException
Throws:
WTException

clearStatus

public void clearStatus(int flag)
                 throws WTException
Throws:
WTException

checkStatusFlagValue

private void checkStatusFlagValue(int flag)
                           throws WTException
Throws:
WTException

isCreated

public boolean isCreated()

isMarkedAsCreated

public boolean isMarkedAsCreated()

setMarkedAsCreated

public void setMarkedAsCreated(boolean created)

markAsCreated

public void markAsCreated()

isModified

public boolean isModified()

isMarkedAsModified

public boolean isMarkedAsModified()

setMarkedAsModified

public void setMarkedAsModified(boolean modified)

markAsModified

public void markAsModified()
                    throws WTException
Throws:
WTException

markAsModified

public void markAsModified(String messageKey)
                    throws WTException
Throws:
WTException

checkModifiability

protected void checkModifiability()
                           throws WTException
Throws:
WTException

checkModifiability

protected void checkModifiability(String messageKey)
                           throws WTException
Throws:
WTException

isDeleted

public boolean isDeleted()

isMarkedForDeletion

public boolean isMarkedForDeletion()

setMarkedForDeletion

public void setMarkedForDeletion(boolean deleted)

markForDeletion

public void markForDeletion()
                     throws WTException
Throws:
WTException

markForDeletion

public void markForDeletion(String messageKey)
                     throws WTException
Throws:
WTException

markForDeletion

public static void markForDeletion(Collection cacheObjects)
                            throws WTException
Throws:
WTException

refresh

public void refresh()
             throws WTException
Throws:
WTException

save

public void save()
          throws WTException
Throws:
WTException

delete

public void delete()
            throws WTException
Throws:
WTException

getCache

public Cache getCache()
               throws WTException
Specified by:
getCache in interface CacheObjectOwner
Throws:
WTException

releaseChildObject

public void releaseChildObject(CacheObject cacheObject)
                        throws WTException
Removes child cache object from this owner cache object. This method is called by CacheObject.release(). DO NOT USE THIS METHOD DIRECTLY.

Specified by:
releaseChildObject in interface CacheObjectOwner
Parameters:
cacheObject - CacheObject
Throws:
WTException

cacheObject

protected void cacheObject(CacheObject cacheObject)
                    throws WTException
Throws:
WTException

cacheCollection

protected void cacheCollection(Collection cacheObjects)
                        throws WTException
Throws:
WTException

release

public void release()
             throws WTException
Throws:
WTException

releaseObject

public static void releaseObject(CacheObject cacheObject)
                          throws WTException
Throws:
WTException

releaseCollection

public static void releaseCollection(Collection cacheObjects)
                              throws WTException
Throws:
WTException

releaseMap

public static void releaseMap(Map cacheObjects)
                       throws WTException
Throws:
WTException

releaseFromOwner

private void releaseFromOwner()
                       throws WTException
Throws:
WTException

removeValueFromMap

public static boolean removeValueFromMap(Map map,
                                         Object value)

getAttributeNames

public Set getAttributeNames()
                      throws WTException
Throws:
WTException

isHasAttributeDefinition

public boolean isHasAttributeDefinition(String name)
                                 throws WTException
Throws:
WTException

prepareCreating

public void prepareCreating()
                     throws WTException
Throws:
WTException

prepareUpdating

public void prepareUpdating()
                     throws WTException
Throws:
WTException

prepareDeleting

public void prepareDeleting()
                     throws WTException
Throws:
WTException

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

getStatusAsString

protected String getStatusAsString()

getDisplayName

protected String getDisplayName()

toString

public String toString()

dump

public void dump(PrintStream out,
                 String shift)
          throws WTException
Throws:
WTException