Added getting identifier objects from models
This commit is contained in:
parent
889b927b10
commit
a29471f2c5
@ -2,11 +2,16 @@ package ru.dragonestia.picker.api.model.node;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import ru.dragonestia.picker.api.repository.type.NodeIdentifier;
|
||||||
|
|
||||||
public interface INode {
|
public interface INode {
|
||||||
|
|
||||||
@NotNull String getIdentifier();
|
@NotNull String getIdentifier();
|
||||||
|
|
||||||
|
default @NotNull NodeIdentifier getIdentifierObject() {
|
||||||
|
return NodeIdentifier.of(getIdentifier());
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull PickingMethod getPickingMethod();
|
@NotNull PickingMethod getPickingMethod();
|
||||||
|
|
||||||
@Nullable Boolean isPersist();
|
@Nullable Boolean isPersist();
|
||||||
|
|||||||
@ -12,8 +12,16 @@ public interface IRoom {
|
|||||||
|
|
||||||
@NotNull String getIdentifier();
|
@NotNull String getIdentifier();
|
||||||
|
|
||||||
|
default @NotNull RoomIdentifier getIdentifierObject() {
|
||||||
|
return RoomIdentifier.of(getIdentifier());
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull String getNodeIdentifier();
|
@NotNull String getNodeIdentifier();
|
||||||
|
|
||||||
|
default @NotNull NodeIdentifier getNodeIdentifierObject() {
|
||||||
|
return NodeIdentifier.of(getNodeIdentifier());
|
||||||
|
}
|
||||||
|
|
||||||
default @NotNull RoomPath getPath() {
|
default @NotNull RoomPath getPath() {
|
||||||
return new RoomPath(NodeIdentifier.of(getNodeIdentifier()), RoomIdentifier.of(getIdentifier()));
|
return new RoomPath(NodeIdentifier.of(getNodeIdentifier()), RoomIdentifier.of(getIdentifier()));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,10 +2,15 @@ package ru.dragonestia.picker.api.model.user;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import ru.dragonestia.picker.api.repository.type.UserIdentifier;
|
||||||
|
|
||||||
public interface IUser {
|
public interface IUser {
|
||||||
|
|
||||||
@NotNull String getIdentifier();
|
@NotNull String getIdentifier();
|
||||||
|
|
||||||
|
default @NotNull UserIdentifier getIdentifierObject() {
|
||||||
|
return UserIdentifier.of(getIdentifier());
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable String getDetail(@NotNull UserDetails detail);
|
@Nullable String getDetail(@NotNull UserDetails detail);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user