org.rhq.enterprise.server.plugins.drift.mongodb.entities
Class MongoDBChangeSet

java.lang.Object
  extended by org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet
All Implemented Interfaces:
Serializable, DriftChangeSet<MongoDBChangeSetEntry>

@Entity(value="changesets")
public class MongoDBChangeSet
extends Object
implements DriftChangeSet<MongoDBChangeSetEntry>, Serializable

A change set that is stored in a MongoDB database. The change set along with its entries are stored as a single document. A change set consists of one or more entries.

See Also:
Serialized Form

Constructor Summary
MongoDBChangeSet()
           
 
Method Summary
 MongoDBChangeSet add(MongoDBChangeSetEntry entry)
           
 DriftChangeSetCategory getCategory()
           
 Long getCtime()
           
 int getDriftDefinitionId()
           
 String getDriftDefinitionName()
           
 DriftConfigurationDefinition.DriftHandlingMode getDriftHandlingMode()
           
 Set<MongoDBChangeSetEntry> getDrifts()
           
 String getId()
           
 org.bson.types.ObjectId getObjectId()
           
 int getResourceId()
           
 int getVersion()
           
 void setCategory(DriftChangeSetCategory category)
           
 void setCtime(Long ctime)
          This is here only for testing.
 void setDriftDefinitionId(int id)
           
 void setDriftDefinitionName(String name)
           
 void setDriftHandlingMode(DriftConfigurationDefinition.DriftHandlingMode driftHandlingMode)
           
 void setDrifts(Set<MongoDBChangeSetEntry> drifts)
           
 void setId(org.bson.types.ObjectId id)
           
 void setId(String id)
           
 void setResourceId(int id)
           
 void setVersion(int version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoDBChangeSet

public MongoDBChangeSet()
Method Detail

getObjectId

public org.bson.types.ObjectId getObjectId()

getId

public String getId()
Specified by:
getId in interface DriftChangeSet<MongoDBChangeSetEntry>

setId

public void setId(String id)
Specified by:
setId in interface DriftChangeSet<MongoDBChangeSetEntry>

setId

public void setId(org.bson.types.ObjectId id)

getCtime

public Long getCtime()
Specified by:
getCtime in interface DriftChangeSet<MongoDBChangeSetEntry>

setCtime

public void setCtime(Long ctime)
This is here only for testing.

Parameters:
ctime - The timestamp

getVersion

public int getVersion()
Specified by:
getVersion in interface DriftChangeSet<MongoDBChangeSetEntry>

setVersion

public void setVersion(int version)
Specified by:
setVersion in interface DriftChangeSet<MongoDBChangeSetEntry>

getCategory

public DriftChangeSetCategory getCategory()
Specified by:
getCategory in interface DriftChangeSet<MongoDBChangeSetEntry>

setCategory

public void setCategory(DriftChangeSetCategory category)
Specified by:
setCategory in interface DriftChangeSet<MongoDBChangeSetEntry>

getDriftDefinitionId

public int getDriftDefinitionId()
Specified by:
getDriftDefinitionId in interface DriftChangeSet<MongoDBChangeSetEntry>

setDriftDefinitionId

public void setDriftDefinitionId(int id)
Specified by:
setDriftDefinitionId in interface DriftChangeSet<MongoDBChangeSetEntry>

getDriftDefinitionName

public String getDriftDefinitionName()

setDriftDefinitionName

public void setDriftDefinitionName(String name)

getDriftHandlingMode

public DriftConfigurationDefinition.DriftHandlingMode getDriftHandlingMode()
Specified by:
getDriftHandlingMode in interface DriftChangeSet<MongoDBChangeSetEntry>

setDriftHandlingMode

public void setDriftHandlingMode(DriftConfigurationDefinition.DriftHandlingMode driftHandlingMode)
Specified by:
setDriftHandlingMode in interface DriftChangeSet<MongoDBChangeSetEntry>

getResourceId

public int getResourceId()
Specified by:
getResourceId in interface DriftChangeSet<MongoDBChangeSetEntry>

setResourceId

public void setResourceId(int id)
Specified by:
setResourceId in interface DriftChangeSet<MongoDBChangeSetEntry>

getDrifts

public Set<MongoDBChangeSetEntry> getDrifts()
Specified by:
getDrifts in interface DriftChangeSet<MongoDBChangeSetEntry>

add

public MongoDBChangeSet add(MongoDBChangeSetEntry entry)

setDrifts

public void setDrifts(Set<MongoDBChangeSetEntry> drifts)
Specified by:
setDrifts in interface DriftChangeSet<MongoDBChangeSetEntry>


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.