Package no.fintlabs.adapter.models.sync
Class SyncPageEntry
- java.lang.Object
-
- no.fintlabs.adapter.models.sync.SyncPageEntry
-
public class SyncPageEntry extends java.lang.ObjectRepresents an entry in the page data.
-
-
Constructor Summary
Constructors Constructor Description SyncPageEntry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetIdentifier()The unique identifier for the resource.java.lang.ObjectgetResource()The FINT resource.inthashCode()static SyncPageEntryof(java.lang.String identifier, java.lang.Object resource)Creates a newSyncPageEntryusing a provided identifier and resource.static <T extends no.fint.model.resource.FintLinks>
SyncPageEntryofIdentifierName(java.lang.String identifierName, T resource)Creates aSyncPageEntryusing a specific identifier name.static <T extends no.fint.model.resource.FintLinks>
SyncPageEntryofSystemId(T resource)Helper method to create an SyncPageEntry withsystemIdas identifier.voidsetIdentifier(java.lang.String identifier)The unique identifier for the resource.voidsetResource(java.lang.Object resource)The FINT resource.java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static SyncPageEntry of(java.lang.String identifier, java.lang.Object resource)
Creates a newSyncPageEntryusing a provided identifier and resource.- Parameters:
identifier- The identifier value.resource- The FINT resource object.- Returns:
- A new
SyncPageEntryinstance.
-
ofSystemId
public static <T extends no.fint.model.resource.FintLinks> SyncPageEntry ofSystemId(T resource)
Helper method to create an SyncPageEntry withsystemIdas identifier.- Type Parameters:
T- The FINT resource type- Parameters:
resource-resource- Returns:
- A SyncPageEntry
-
ofIdentifierName
public static <T extends no.fint.model.resource.FintLinks> SyncPageEntry ofIdentifierName(java.lang.String identifierName, T resource)
Creates aSyncPageEntryusing a specific identifier name.The identifier is extracted from the self link matching the given identifier name and returned as the raw value (last segment of the link).
- Type Parameters:
T- The resource type extendingFintLinks.- Parameters:
identifierName- The name of the self link identifier (e.g. "feidenavn", "brukernavn", "elevnummer").resource- The FINT resource.- Returns:
- A
SyncPageEntryinstance with the identifier value extracted from the resource. - See Also:
- FINT resource Elev
-
getIdentifier
public java.lang.String getIdentifier()
The unique identifier for the resource.This is now stored as a raw identifier value (e.g.
32a83959-2896-4882-94b2-9157cad009d2), rather than a full self link URL.Typically obtained via
LinkUtilities.getSelfLinkBy(String, FintLinks).
-
getResource
public java.lang.Object getResource()
The FINT resource.
-
setIdentifier
public void setIdentifier(java.lang.String identifier)
The unique identifier for the resource.This is now stored as a raw identifier value (e.g.
32a83959-2896-4882-94b2-9157cad009d2), rather than a full self link URL.Typically obtained via
LinkUtilities.getSelfLinkBy(String, FintLinks).
-
setResource
public void setResource(java.lang.Object resource)
The FINT resource.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-