Record Class CALocation
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CALocation
- Record Components:
id- The location IDparent- The location parent, if anypath- The location pathtimeCreated- The time the location was createdtimeUpdated- The time the location was last updatedmetadata- The metadata associated with the locationattachments- The attachments associated with the locationtypes- The types associated with the location
- All Implemented Interfaces:
CAInventoryObjectType<CALocationSummary>
public record CALocation(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, SortedMap<CATypeRecordFieldIdentifier, CAMetadataType> metadata, SortedMap<CAAttachmentKey, CAAttachment> attachments, SortedSet<CATypeRecordIdentifier> types)
extends Record
implements CAInventoryObjectType<CALocationSummary>
A location.
-
Constructor Summary
ConstructorsConstructorDescriptionCALocation(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, SortedMap<CATypeRecordFieldIdentifier, CAMetadataType> metadata, SortedMap<CAAttachmentKey, CAAttachment> attachments, SortedSet<CATypeRecordIdentifier> types) Construct a location. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.name()parent()Returns the value of theparentrecord component.path()Returns the value of thepathrecord component.summary()Returns the value of thetimeCreatedrecord component.Returns the value of thetimeUpdatedrecord component.final StringtoString()Returns a string representation of this record class.types()Returns the value of thetypesrecord component.Methods inherited from interface CAInventoryObjectType
attachmentsWithRelation, firstAttachmentWithRelation, hasAttachmentWithRelation
-
Constructor Details
-
CALocation
public CALocation(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, SortedMap<CATypeRecordFieldIdentifier, CAMetadataType> metadata, SortedMap<CAAttachmentKey, CAAttachment> attachments, SortedSet<CATypeRecordIdentifier> types) Construct a location.- Parameters:
id- The location IDparent- The location parent, if anypath- The location pathtimeCreated- The time the location was createdtimeUpdated- The time the location was last updatedmetadata- The metadata associated with the locationattachments- The attachments associated with the locationtypes- The types associated with the location
-
-
Method Details
-
displayId
- Returns:
- The location display ID
-
summary
- Specified by:
summaryin interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- A summary of the object
-
name
- Returns:
- The location name (the last path component)
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
-
parent
-
path
-
timeCreated
Returns the value of thetimeCreatedrecord component.- Returns:
- the value of the
timeCreatedrecord component
-
timeUpdated
Returns the value of thetimeUpdatedrecord component.- Returns:
- the value of the
timeUpdatedrecord component
-
metadata
Returns the value of themetadatarecord component.- Specified by:
metadatain interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- the value of the
metadatarecord component
-
attachments
Returns the value of theattachmentsrecord component.- Specified by:
attachmentsin interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- the value of the
attachmentsrecord component
-
types
Returns the value of thetypesrecord component.- Specified by:
typesin interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- the value of the
typesrecord component
-