|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsync4j.syncclient.spds.engine.SyncItemImpl
SyncItemImpl is a basic implemenation of a SyncItem.
Field Summary | |
protected SyncItemKey |
key
The SyncItem's uique identifier - read only |
protected java.util.Hashtable |
properties
The SyncItem's properties - read and write |
protected char |
state
The state of this SyncItem |
protected SyncSource |
syncSource
The SyncSource this item belongs to |
Fields inherited from interface sync4j.syncclient.spds.engine.SyncItem |
PROPERTY_BINARY_CONTENT, PROPERTY_TIMESTAMP |
Constructor Summary | |
SyncItemImpl(SyncSource syncSource,
java.lang.Object key)
|
|
SyncItemImpl(SyncSource syncSource,
java.lang.Object key,
char state)
Creates a new SyncItem belonging to the given source. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Two SyncItems are equal if their keys are equal. |
SyncItemKey |
getKey()
|
static SyncItem |
getNotExistingSyncItem(SyncSource syncSource)
Creates and returns a "not-existing" SyncItem. |
java.util.Hashtable |
getProperties()
Returns the properties property. |
SyncItemProperty |
getProperty(java.lang.String propertyName)
Returns the property with the given name |
java.lang.Object |
getPropertyValue(java.lang.String propertyName)
Returns the value of the property with the given name. |
char |
getState()
|
SyncSource |
getSyncSource()
Getter for property syncSource. |
void |
setProperties(java.util.Hashtable properties)
Sets the properties property. |
void |
setProperty(SyncItemProperty property)
Sets/adds the given property to this SyncItem |
void |
setPropertyValue(java.lang.String propertyName,
java.lang.String propertyValue)
Sets the value of the property with the given name. |
void |
setState(char state)
|
void |
setSyncSource(SyncSource syncSource)
Setter for property syncSource. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SyncItemKey key
protected char state
protected java.util.Hashtable properties
protected SyncSource syncSource
Constructor Detail |
public SyncItemImpl(SyncSource syncSource, java.lang.Object key)
public SyncItemImpl(SyncSource syncSource, java.lang.Object key, char state)
syncSource
- the source this item belongs tokey
- the item identifierstate
- one of the state value defined in SyncItemStateMethod Detail |
public SyncItemKey getKey()
getKey
in interface SyncItem
public char getState()
getState
in interface SyncItem
public void setState(char state)
setState
in interface SyncItem
public java.util.Hashtable getProperties()
getProperties
in interface SyncItem
public void setProperties(java.util.Hashtable properties)
setProperties
in interface SyncItem
properties
- the new valuespublic void setProperty(SyncItemProperty property)
setProperty
in interface SyncItem
property
- The property to set/addpublic SyncItemProperty getProperty(java.lang.String propertyName)
getProperty
in interface SyncItem
propertyName
- The property name
public SyncSource getSyncSource()
getSyncSource
in interface SyncItem
public void setSyncSource(SyncSource syncSource)
syncSource
- New value of property syncSource. NOT NULLpublic void setPropertyValue(java.lang.String propertyName, java.lang.String propertyValue)
setPropertyValue
in interface SyncItem
propertyName
- The property's namepropertyValue
- The new valuepublic java.lang.Object getPropertyValue(java.lang.String propertyName)
getPropertyValue
in interface SyncItem
propertyName
- The property's name
public boolean equals(java.lang.Object o)
o
- the object this instance must be compared to.
public static SyncItem getNotExistingSyncItem(SyncSource syncSource)
syncSource
- the SyncSource the not existing item belongs to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |