Package com.storedobject.core
Interface Detail
- All Known Subinterfaces:
SingleInstanceDetail
- All Known Implementing Classes:
AbstractCheckListItem,AccountDocument,AlarmSwitch,ApplicableDataLogic,Attachment,AuditTrailLinkConfiguration,BusinessDocument,CheckListItem,CheckListTemplateItem,ColumnDefinition,ConsignmentItem,ConsignmentPacket,Contact,Document,Entry,Error,ExternalSystemUser,FileCirculation,FileData,FileFolder,FullConsumption,IndexDefinition,InventoryAPN,InventoryGRNItem,InventoryLoanOutItem,InventoryPOItem,InventoryReturnItem,InventoryROItem,InventorySaleItem,InventoryTransferItem,LandedCost,LinkDefinition,MaterialIssuedItem,MaterialRequestItem,MaterialReturnedItem,MaterialTransferredItem,MCPParameter,MemoAttachment,MessageEscalation,ModuleLogic,PersonalDocument,PseudoTranApproval,PseudoTranDetail,ReportColumnDefinition,ServerLink,UIFieldMetadata,UnpostedJournalEntry,ValueDefinition,ValueImagePosition,ValueLimit,VirtualFileData
public interface Detail
The interface to denote that a
StoredObject class is keeping details of a "master"
StoredObject class.- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidcopyValuesFrom(Detail detail) Deprecated.Not to be used.getId()Get theIdof the detail class instance.default IdGet theIdof the class instance that makes this instance unique.default ObjectGet the unique value that determines the uniqueness of the detail entries.booleanisDetailOf(Class<? extends StoredObject> masterClass) Check if the given class is a "master" for this class.
-
Method Details
-
getId
-
getUniqueId
Get theIdof the class instance that makes this instance unique. (By default, generally, theIdof this instance is returned).Note: if a more complex uniqueness check is required, a static method named isDuplicate(first,second) can be defined in the class where it is implemented. The parameters should be the two instances to be compared and should be of the same type as the class implementing this interface.
- Returns:
Idof the class instance that makes this instance unique.
-
getUniqueValue
Get the unique value that determines the uniqueness of the detail entries. By default,nullis returned so that no uniqueness can be checked using this. (In most cases,getUniqueId()may be enough unless some other type of values needs to be checked).Note: if a more complex uniqueness check is required, a static method named isDuplicate(first,second) can be defined in the class where it is implemented. The parameters should be the two instances to be compared and should be of the same type as the class implementing this interface.
- Returns:
- Return the value to determine the uniqueness of the detail entries.
-
copyValuesFrom
Deprecated.Not to be used.Copy the attribute values from another instance. (This method is no more in use and may be removed in the future).- Parameters:
detail- Another instance from which values to be copied.
-
isDetailOf
Check if the given class is a "master" for this class. (Must return a consistent value).- Parameters:
masterClass- Class to check.- Returns:
- True if it is a "master" to this detail class. Otherwise, false.
-