Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class Identifier

  1. Object
  2. Identifier
Immutable composite identity, in the model’s declared identifier-field order.

Methods

public static Identifier of(Object... values)Creates a composite identifier, normalizing scalar storage representations.
public Object[] values()Returns a copy of the normalized key component array.
public boolean equals(Object other)Compares normalized components in identifier-field order.
public int hashCode()Computes a hash from the normalized key components.

Inherited methods

Method details

of

public static Identifier of(Object... values)
Creates a composite identifier, normalizing scalar storage representations. Integral byte, short, and int values compare as longs. Copies the supplied array; components should be immutable. Binary components are unsupported.

Parameters

values Object...
key components in declared identifier-field order

Returns

composite identifier for session lookup

Throws

IllegalArgumentException
if a component is binary

values

public Object[] values()
Returns a copy of the normalized key component array.

Returns

components in identifier-field order

equals

public boolean equals(Object other)
Compares normalized components in identifier-field order.

Parameters

other Object
object to compare

Returns

true if the other identifier has equal components

hashCode

public int hashCode()
Computes a hash from the normalized key components.

Returns

component-based hash code