Package net.solarnetwork.domain
Class BasicInstructionStatus
java.lang.Object
net.solarnetwork.domain.BasicInstructionStatus
- All Implemented Interfaces:
Serializable,InstructionStatus
Basic implementation of
InstructionStatus.- Since:
- 2.0
- Version:
- 1.0
- Author:
- matt
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.domain.InstructionStatus
InstructionStatus.InstructionState -
Field Summary
Fields inherited from interface net.solarnetwork.domain.InstructionStatus
ERROR_CODE_RESULT_PARAM, MESSAGE_RESULT_PARAM -
Constructor Summary
ConstructorsConstructorDescriptionBasicInstructionStatus(Long instructionId, InstructionStatus.InstructionState instructionState, Instant statusDate) Constructor.BasicInstructionStatus(Long instructionId, InstructionStatus.InstructionState instructionState, Instant statusDate, Map<String, ?> resultParameters) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the ID of the instruction this state is associated with.Get the current instruction state.Get result parameters.Get the date/time the instruction state was queried.inthashCode()newCopyWithState(InstructionStatus.InstructionState newState, Map<String, ?> resultParameters) Create a new InstructionStatus copy with a new state and result parameters.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.domain.InstructionStatus
newCopyWithState
-
Constructor Details
-
BasicInstructionStatus
public BasicInstructionStatus(Long instructionId, InstructionStatus.InstructionState instructionState, Instant statusDate) Constructor.- Parameters:
instructionId- the instruction IDinstructionState- the instruction statestatusDate- the status date
-
BasicInstructionStatus
public BasicInstructionStatus(Long instructionId, InstructionStatus.InstructionState instructionState, Instant statusDate, Map<String, ?> resultParameters) Constructor.- Parameters:
instructionId- the instruction IDinstructionState- the instruction statestatusDate- the status dateresultParameters- the result parameters
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
newCopyWithState
public InstructionStatus newCopyWithState(InstructionStatus.InstructionState newState, Map<String, ?> resultParameters) Description copied from interface:InstructionStatusCreate a new InstructionStatus copy with a new state and result parameters.- Specified by:
newCopyWithStatein interfaceInstructionStatus- Parameters:
newState- the new stateresultParameters- the result parameters- Returns:
- the new instance
-
getInstructionId
Description copied from interface:InstructionStatusGet the ID of the instruction this state is associated with.- Specified by:
getInstructionIdin interfaceInstructionStatus- Returns:
- the primary key
-
getInstructionState
Description copied from interface:InstructionStatusGet the current instruction state.- Specified by:
getInstructionStatein interfaceInstructionStatus- Returns:
- the current instruction state
-
getStatusDate
Description copied from interface:InstructionStatusGet the date/time the instruction state was queried.- Specified by:
getStatusDatein interfaceInstructionStatus- Returns:
- the status date
-
getResultParameters
Description copied from interface:InstructionStatusGet result parameters.- Specified by:
getResultParametersin interfaceInstructionStatus- Returns:
- the result parameters, or null if none available
-