org.electrocodeogram.cpc.core.api.data
Class CompositCloneDiff

java.lang.Object
  extended by org.electrocodeogram.cpc.core.api.data.CloneDiff
      extended by org.electrocodeogram.cpc.core.api.data.CompositCloneDiff
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<CloneDiff>, ICloneDataElement, ICloneObjectSupport, IStatefulObject

Deprecated. this class is currently not in use.

@Deprecated
public class CompositCloneDiff
extends CloneDiff

A special composite version of the CloneDiff class.
The IStoreProvider may merge multiple CloneDiff objects into one to reduce the number of objects and thereby the storage complexity. If multiple CloneDiff events are merged, the resulting composite diff is of this type.

Author:
vw
See Also:
CloneDiff, Serialized Form

Field Summary
 java.lang.String PERSISTENCE_CLASS_IDENTIFIER
          Deprecated. IStatefulObject persistence class identifier, value: "composite_clone_diff"
 
Fields inherited from class org.electrocodeogram.cpc.core.api.data.CloneDiff
automaticChange, creationDate, creator, length, offset, PERSISTENCE_OBJECT_IDENTIFIER, text
 
Constructor Summary
CompositCloneDiff(java.util.Date startOfRangeDate, java.util.Date endOfRangeDate, java.lang.String creator, java.util.Date creationDate, boolean automaticChange, int offset, int length, java.lang.String text)
          Deprecated. Creates a new CompositCloneDiff.
 
Method Summary
 java.lang.String getCreator()
          Deprecated. Retrieves the creator (username) of this composite diff.
 java.util.Date getEndOfRangeDate()
          Deprecated. The CloneDiff.getCreationDate() of the last CloneDiff object in this composite diff.
 java.lang.String getPersistenceClassIdentifier()
          Deprecated. Returns a string which uniquely identifies the object type.
 java.util.Date getStartOfRangeDate()
          Deprecated. The CloneDiff.getCreationDate() of the first CloneDiff object in this composite diff.
 java.util.Map<java.lang.String,java.lang.Comparable<? extends java.lang.Object>> getState()
          Deprecated. Returns a map which fully describes the internal state of this object.
 java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Object>> getStateTypes()
          Deprecated. Returns a list of all keys which are needed to persist this objects internal state.
 void setState(java.util.Map<java.lang.String,java.lang.Comparable<? extends java.lang.Object>> state)
          Deprecated. Restores the internal state of this object to the state which was extracted by means of getState() earlier.
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class org.electrocodeogram.cpc.core.api.data.CloneDiff
clone, compareTo, equals, getCreationDate, getLength, getOffset, getPersistenceObjectIdentifier, getText, getTextLength, hashCode, isAutomaticChange, isSealed, seal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PERSISTENCE_CLASS_IDENTIFIER

public final java.lang.String PERSISTENCE_CLASS_IDENTIFIER
Deprecated. 
IStatefulObject persistence class identifier, value: "composite_clone_diff"

See Also:
Constant Field Values
Constructor Detail

CompositCloneDiff

public CompositCloneDiff(java.util.Date startOfRangeDate,
                         java.util.Date endOfRangeDate,
                         java.lang.String creator,
                         java.util.Date creationDate,
                         boolean automaticChange,
                         int offset,
                         int length,
                         java.lang.String text)
Deprecated. 
Creates a new CompositCloneDiff.
A CompositCloneDiff does not contain a list of CloneDiff objects. Instead the changes made by the included CloneDiff objects is merged into a single diff object.

A CompositCloneDiff object must always contain all CloneDiff objects which fall into the given date range described by getStartOfRangeDate() and getEndOfRangeDate(). No CloneDiff object may be left out.
Once a CompositCloneDiff is stored, its underlying individual CloneDiff objects may not be made accessible to a client in any way.
I.e. care must be taken that the IStoreProvider.getFullCloneObjectExtension(ICloneObject, Class) command does not return any CloneDiff objects which are already "contained" within an also returned CompositCloneDiff object.

Please refer to the CloneDiff constructor for more information about the common parameters.

Parameters:
startOfRangeDate - creation date of the oldest CloneDiff in this composite, never null.
endOfRangeDate - creation date of the youngest CloneDiff in this composite, never null.
creator - creator (username) value of the oldest CloneDiff object in this composite for which the creator is defined, may be NULL if no CloneDiff object specified a creator.
See Also:
CloneDiff.CloneDiff(String, Date, boolean, int, int, String)
Method Detail

getStartOfRangeDate

public java.util.Date getStartOfRangeDate()
Deprecated. 
The CloneDiff.getCreationDate() of the first CloneDiff object in this composite diff.

Returns:
creation date of oldest CloneDiff object in this composite, never null.

getEndOfRangeDate

public java.util.Date getEndOfRangeDate()
Deprecated. 
The CloneDiff.getCreationDate() of the last CloneDiff object in this composite diff.

Returns:
creation date of youngest CloneDiff object in this composite, never null.

getCreator

public java.lang.String getCreator()
Deprecated. 
Retrieves the creator (username) of this composite diff.
If the underlying CloneDiff objects refer to different creators, the first (oldest) defined creator value will be used for the composite diff.
The value may be NULL if the creator was undefined for all underlying CloneDiff objects.

Overrides:
getCreator in class CloneDiff
Returns:
creator of this diff, may be NULL.

getPersistenceClassIdentifier

public java.lang.String getPersistenceClassIdentifier()
Deprecated. 
Description copied from interface: IStatefulObject
Returns a string which uniquely identifies the object type.

For the default ICloneObject sub interfaces the return values must equal the PERSISTENCE_CLASS_IDENTIFIER constant defined in the interface.

3rd party clone objects can define their own persistence identifiers.
Allowed are only letters, numbers and the underscore. Furthermore an identifier needs to contain at least one letter, may not begin with an underscore and may not contain multiple consecutive underscores.

A typical store provider will use this method to derive directory/file or table names.

Specified by:
getPersistenceClassIdentifier in interface IStatefulObject
Overrides:
getPersistenceClassIdentifier in class CloneDiff
Returns:
unique identifier for the object type, never null.

getState

public java.util.Map<java.lang.String,java.lang.Comparable<? extends java.lang.Object>> getState()
Deprecated. 
Description copied from interface: IStatefulObject
Returns a map which fully describes the internal state of this object. The map is persisted by the IStoreProvider and the setState() method is used to restore a persisted state.

In case of an ICloneObject, the map does not include any data for ICloneObjectExtension which are stored under the object.

The values in the map are restricted to the following object types:

The keys in the map should correspond to the following schema: IMPORTANT NOTEs:

Specified by:
getState in interface IStatefulObject
Overrides:
getState in class CloneDiff
Returns:
a map describing the internal state of this object, never null.
See Also:
IStatefulObject.setState(Map)

getStateTypes

public java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Object>> getStateTypes()
Deprecated. 
Description copied from interface: IStatefulObject
Returns a list of all keys which are needed to persist this objects internal state. The values in the returned Map correspond to the classes of the values which will be used in the Map returned by getState().

I.e. if getState() will return a Map which contains the key "uuid" with the value "jda83ds-..." then this Map contains the key "uuid" with the value String.class.

Specified by:
getStateTypes in interface IStatefulObject
Overrides:
getStateTypes in class CloneDiff
Returns:
map which contains all keys and their data types, never null
See Also:
IStatefulObject.getState()

setState

public void setState(java.util.Map<java.lang.String,java.lang.Comparable<? extends java.lang.Object>> state)
Deprecated. 
Description copied from interface: IStatefulObject
Restores the internal state of this object to the state which was extracted by means of getState() earlier.

For a description of the internal structure of the map, see getState().

Specified by:
setState in interface IStatefulObject
Overrides:
setState in class CloneDiff
Parameters:
state - a map describing the internal state of this object, never null
See Also:
IStatefulObject.getState()

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class CloneDiff