Class AbstractOsidRelationship
java.lang.Object
net.okapia.osid.jamocha.spi.AbstractIdentifiable
net.okapia.osid.jamocha.spi.AbstractOsidObject
net.okapia.osid.jamocha.spi.AbstractTemporalOsidObject
net.okapia.osid.jamocha.spi.AbstractOsidRelationship
- All Implemented Interfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal
- Direct Known Subclasses:
AbstractActivity, AbstractActivityRegistration, AbstractAppointment, AbstractAssessmentEntry, AbstractAuthorization, AbstractAvailability, AbstractAwardEntry, AbstractBid, AbstractBudget, AbstractBudgetEntry, AbstractCandidate, AbstractComment, AbstractCommission, AbstractCommitment, AbstractConferral, AbstractContact, AbstractCourseEntry, AbstractCourseOffering, AbstractCourseRegistration, AbstractCredentialEntry, AbstractCredit, AbstractDeed, AbstractDocet, AbstractEdge, AbstractEffort, AbstractEnrollment, AbstractEntry, AbstractGradeEntry, AbstractHold, AbstractInput, AbstractInstruction.OsidRelationship, AbstractIssue, AbstractLease, AbstractLesson, AbstractOffering, AbstractOrderItem, AbstractParticipant, AbstractPath, AbstractPlan, AbstractProficiency, AbstractProfileEntry, AbstractProgramEntry, AbstractProgramOffering, AbstractProvision, AbstractProvisionable, AbstractRegistration, AbstractRelationship, AbstractRelevancy, AbstractRequest, AbstractRequestTransaction, AbstractResourceRelationship, AbstractResponse, AbstractRoute, AbstractSubscription, AbstractVote
public abstract class AbstractOsidRelationship
extends AbstractTemporalOsidObject
implements OsidRelationship
Defines a simple OSID relationship to draw from. using this
abstract class requires that
setId() must be done
before passing this interface to a consumer in order to maintain
compliance with the OSID specification.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractTemporalOsidObject
AbstractTemporalOsidObject.TemporalModifier and TypeClassDescriptionprotected classComposed Temporal.Nested classes/interfaces inherited from class AbstractOsidObject
AbstractOsidObject.BrowsableModifier and TypeClassDescriptionprotected classComposed Browsable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a state indicating why this relationship has ended.Gets a stateIdindicating why this relationship has ended.booleanTests if a reason this relationship came to an end is known.protected voidsetEndReason(State state) Sets the end state.Methods inherited from class AbstractTemporalOsidObject
getEndDate, getStartDate, isEffective, setEndDate, setStartDateModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.protected voidsetEndDate(DateTime date) Sets the end date.protected voidsetStartDate(DateTime date) Sets the start date.Methods inherited from class AbstractOsidObject
addProperties, addRecordType, getDescription, getDisplayName, getGenusType, getProperties, getPropertiesByRecordType, getRecordTypes, hasRecordType, isOfGenusType, setDescription, setDisplayName, setGenusTypeModifier and TypeMethodDescriptionprotected voidaddProperties(Collection<Property> set, Type recordType) Adds a property set.protected voidaddRecordType(Type recordType) Adds a record type.Gets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.Gets a list of all properties of this object including those corresponding to data within this object's records.getPropertiesByRecordType(Type recordType) Gets the properties by record type.Gets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.protected voidsetDescription(DisplayText description) Sets the description of this object.protected voidsetDisplayName(DisplayText displayName) Sets the displayName for this object.protected voidsetGenusType(Type genusType) Sets a genus type.Methods inherited from class AbstractIdentifiable
current, equals, getId, hashCode, isCurrent, setId, stale, toStringModifier and TypeMethodDescriptionprotected voidcurrent()Sets the current flag totrue.final booleanDetermines if the givenIdis equal to this one.getId()Gets theIdassociated with this instance of this OSID object.inthashCode()Returns a hash code value for thisOsidObjectbased on theId.booleanTests to see if the last method invoked retrieved up-to-date data.protected voidSets theIdassociated with this instance of this OSID object.protected voidstale()Sets the current flag tofalse.toString()Returns a string representation of this OsidObject.
-
Constructor Details
-
AbstractOsidRelationship
public AbstractOsidRelationship()Constructs a newAbstractOsidRelationship.
-
-
Method Details
-
hasEndReason
Tests if a reason this relationship came to an end is known.- Specified by:
hasEndReasonin interfaceOsidRelationship- Returns:
trueif an end reason is available,falseotherwise- Throws:
IllegalStateException-isEffectiveistrue
-
getEndReasonId
Gets a stateIdindicating why this relationship has ended.- Specified by:
getEndReasonIdin interfaceOsidRelationship- Returns:
- a state
Id - Throws:
IllegalStateException-hasEndReason()isfalse
-
getEndReason
Gets a state indicating why this relationship has ended.- Specified by:
getEndReasonin interfaceOsidRelationship- Returns:
- a state
- Throws:
IllegalStateException-hasEndReason()isfalseOperationFailedException- unable to complete request
-
setEndReason
Sets the end state.- Parameters:
state- the end state- Throws:
NullArgumentException-stateisnull
-