Package no.fintlabs.adapter.models.sync
Class SyncPageEntry
- java.lang.Object
-
- no.fintlabs.adapter.models.sync.SyncPageEntry
-
public class SyncPageEntry extends java.lang.Object
Represents 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 boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.String
getIdentifier()
The unique identifier for the resource.java.lang.Object
getResource()
The FINT resource.int
hashCode()
static SyncPageEntry
of(java.lang.String identifier, java.lang.Object resource)
Creates a newSyncPageEntry
using a provided identifier and resource.static <T extends no.fint.model.resource.FintLinks>
SyncPageEntryofIdentifierName(java.lang.String identifierName, T resource)
Creates aSyncPageEntry
using a specific identifier name.static <T extends no.fint.model.resource.FintLinks>
SyncPageEntryofSystemId(T resource)
Helper method to create an SyncPageEntry withsystemId
as identifier.void
setIdentifier(java.lang.String identifier)
The unique identifier for the resource.void
setResource(java.lang.Object resource)
The FINT resource.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static SyncPageEntry of(java.lang.String identifier, java.lang.Object resource)
Creates a newSyncPageEntry
using a provided identifier and resource.- Parameters:
identifier
- The identifier value.resource
- The FINT resource object.- Returns:
- A new
SyncPageEntry
instance.
-
ofSystemId
public static <T extends no.fint.model.resource.FintLinks> SyncPageEntry ofSystemId(T resource)
Helper method to create an SyncPageEntry withsystemId
as 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 aSyncPageEntry
using 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
SyncPageEntry
instance 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:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-