com.atlassian.greenhopper.manager.rank.instruction
Class InsertRowInstruction

java.lang.Object
  extended by com.atlassian.greenhopper.manager.rank.instruction.Instruction
      extended by com.atlassian.greenhopper.manager.rank.instruction.BaseInstruction
          extended by com.atlassian.greenhopper.manager.rank.instruction.InsertRowInstruction

public class InsertRowInstruction
extends BaseInstruction

Create Row instruction Creates a row, reexecutable


Field Summary
 
Fields inherited from class com.atlassian.greenhopper.manager.rank.instruction.BaseInstruction
customFieldId, issueId
 
Constructor Summary
InsertRowInstruction(com.atlassian.activeobjects.external.ActiveObjects ao, java.lang.Long customFieldId, java.lang.Long issueId, java.lang.Long nextIssueId)
           
 
Method Summary
 void execute()
          Execute a create row instruction Either the row doesn't exist in which case we create it or if it already exists we verify that next points to the correct issueId
 java.lang.String getAfterState()
          Get the state of the db after executing this instruction
 java.lang.String getBeforeState()
          Get the state of the db before executing this instruction
 java.lang.Long getNextIssueId()
           
 void sanityCheck()
          Sanity check row creation Either the row does not exist or it points to the expected nextId
 
Methods inherited from class com.atlassian.greenhopper.manager.rank.instruction.BaseInstruction
getCustomFieldId, getIssueId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertRowInstruction

public InsertRowInstruction(com.atlassian.activeobjects.external.ActiveObjects ao,
                            java.lang.Long customFieldId,
                            java.lang.Long issueId,
                            java.lang.Long nextIssueId)
Method Detail

sanityCheck

public void sanityCheck()
Sanity check row creation Either the row does not exist or it points to the expected nextId

Overrides:
sanityCheck in class Instruction

execute

public void execute()
Execute a create row instruction Either the row doesn't exist in which case we create it or if it already exists we verify that next points to the correct issueId

Overrides:
execute in class Instruction

getBeforeState

public java.lang.String getBeforeState()
Description copied from class: Instruction
Get the state of the db before executing this instruction

Overrides:
getBeforeState in class Instruction

getAfterState

public java.lang.String getAfterState()
Description copied from class: Instruction
Get the state of the db after executing this instruction

Overrides:
getAfterState in class Instruction

getNextIssueId

public java.lang.Long getNextIssueId()


Copyright © 2007-2014 Atlassian. All Rights Reserved.