| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.repository.RepositoryItemImpl
public abstract class RepositoryItemImpl
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSION | 
| static atg.repository.RepositoryItemImpl.NullObject | NULL_OBJECT | 
| Constructor Summary | |
|---|---|
| RepositoryItemImpl(ItemDescriptorImpl pDesc)The item descriptor for this item | |
| Method Summary | |
|---|---|
|  int | compareTo(java.lang.Object pOther)Compares this item to another Object. | 
|  boolean | equals(java.lang.Object pObject)Are these the same item? | 
|  RepositoryItemDescriptor | getItemDescriptor()Returns the RepositoryItemDescriptor property, which describes the known properties for the item. | 
| protected  ItemDescriptorImpl | getItemDescriptorImpl()Returns the item descriptor implementation class without throwing an exception and to avoid casting on every method call. | 
|  java.lang.String | getItemDisplayName()The name of this item which can be used in a UI. | 
| abstract  java.lang.Object | getOldPropertyValue(RepositoryPropertyDescriptor pDesc)Returns the value of this property not including any changes made by this transaction. | 
|  java.lang.Object | getPropertyValue(RepositoryPropertyDescriptor pDesc)This method is typically overridden by sub-classes. | 
|  java.lang.Object | getPropertyValue(java.lang.String pPropertyName)Returns the property of the given name. | 
|  Repository | getRepository()Returns the Repository which contains this item | 
| abstract  java.lang.String | getRepositoryId()Returns the unique id associated with this object in the repository. | 
| protected  RepositoryImpl | getRepositoryImpl() | 
|  RepositoryItemImpl | getWrappedItem() | 
|  int | hashCode()Make sure that the hashCode's match the equals method. | 
|  boolean | isMutable()Is this repository mutable? | 
| abstract  boolean | isRemoved()Returns true if this item has been removed. | 
| abstract  boolean | isTransient()Is this item in the repository yet? | 
|  java.lang.String | printItem()Returns the String representation of this object. | 
| abstract  void | removePropertyValueFromCache(RepositoryPropertyDescriptor pDesc)This method is called from user defined property types when they want to store a value in the cache for this particular property. | 
|  void | setItemDescriptor(RepositoryItemDescriptor pItemDescriptor)This method should only be used by adapter implementations, not by clients of the repository api. | 
| abstract  void | setPropertyValue(RepositoryPropertyDescriptor pDesc,
                 java.lang.Object pValue)Sets the given property for a particular property descriptor. | 
|  void | setPropertyValue(java.lang.String pPropertyName,
                 java.lang.Object pPropertyValue)Sets the property of the given name with the supplied object. | 
| abstract  void | setPropertyValueInCache(RepositoryPropertyDescriptor pDesc,
                        java.lang.Object pValue)This method is called from user defined property types when they want to store a value in the cache for this particular property. | 
| protected  void | setPropertyValueUnChecked(java.lang.String pPropertyName,
                          java.lang.Object pPropertyValue)Sets the property of the given name with the supplied object. | 
| protected abstract  void | setRemoved(boolean pRemoved)Called from the readObject method when we try to restore a reference to an item which has been removed. | 
| abstract  void | setRepositoryId(java.lang.String pId)If a user changes the id of an "id property", you need to implement this method. | 
| protected abstract  void | setTransient(boolean pTransient)Called from the readObject method to make this item transient | 
|  void | setWrappedItem(RepositoryItemImpl pWrappedItem)Sets the property WrappedItem. | 
|  java.lang.String | toString() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
public static final atg.repository.RepositoryItemImpl.NullObject NULL_OBJECT
| Constructor Detail | 
|---|
public RepositoryItemImpl(ItemDescriptorImpl pDesc)
| Method Detail | 
|---|
public abstract java.lang.String getRepositoryId()
getRepositoryId in interface RepositoryItempublic abstract void setRepositoryId(java.lang.String pId)
public abstract boolean isRemoved()
                           throws RepositoryException
RepositoryExceptionpublic java.lang.Object getPropertyValue(java.lang.String pPropertyName)
getPropertyValue in interface RepositoryItempublic abstract java.lang.Object getOldPropertyValue(RepositoryPropertyDescriptor pDesc)
getOldPropertyValue in interface atg.repository.RepositoryChangedItempPropertyDescriptor - property to get
public abstract void setPropertyValue(RepositoryPropertyDescriptor pDesc,
                                      java.lang.Object pValue)
public abstract void setPropertyValueInCache(RepositoryPropertyDescriptor pDesc,
                                             java.lang.Object pValue)
public abstract void removePropertyValueFromCache(RepositoryPropertyDescriptor pDesc)
public void setPropertyValue(java.lang.String pPropertyName,
                             java.lang.Object pPropertyValue)
This method is in here despite the fact that this is not a MutableRepositoryItem. If your implementation uses this base class for its mutable repository, you can just use this method to do preprocessing and then implement the version which takes a RepositoryPropertyDescriptor instead of a name.
setPropertyValue in interface MutableRepositoryItem
protected void setPropertyValueUnChecked(java.lang.String pPropertyName,
                                         java.lang.Object pPropertyValue)
This method is in here despite the fact that this is not a MutableRepositoryItem. If your implementation uses this base class for its mutable repository, you can just use this method to do preprocessing and then implement the version which takes a RepositoryPropertyDescriptor instead of a name. Note: Internal method to allow bypassing various checks
public java.lang.Object getPropertyValue(RepositoryPropertyDescriptor pDesc)
public Repository getRepository()
getRepository in interface RepositoryItempublic final RepositoryItemDescriptor getItemDescriptor()
getItemDescriptor in interface RepositoryItempublic void setItemDescriptor(RepositoryItemDescriptor pItemDescriptor)
public java.lang.String getItemDisplayName()
DisplayableItem
getItemDisplayName in interface DisplayableItempublic boolean isMutable()
protected RepositoryImpl getRepositoryImpl()
protected ItemDescriptorImpl getItemDescriptorImpl()
public abstract boolean isTransient()
isTransient in interface RepositoryItemprotected abstract void setTransient(boolean pTransient)
protected abstract void setRemoved(boolean pRemoved)
public int compareTo(java.lang.Object pOther)
ClassCastException.Nota Bene: the item descriptor is not considered in the comparsion for performance, and because Collections of repository items sorted with this method are intended to have the same item descriptor. This means that this method is not consistent with equals. In order to put RepositoryItems into a SortedSet or SortedMap the Set or Map must have a non null Comparator anyway, since RepositoryItem does not currently implement Comparable.
compareTo in interface java.lang.ComparablepOther - the Object to be compared.
getRepositoryId().compareTo(pOther.getRepositoryId())
ClassCastExceptionRepositoryItem.java.util.Comparable, 
SortedSet, 
SortDirectivespublic boolean equals(java.lang.Object pObject)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String printItem()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setWrappedItem(RepositoryItemImpl pWrappedItem)
pWrappedItem - new value to setpublic RepositoryItemImpl getWrappedItem()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||