Package tech.ydb.yoj.repository.db
Class EntityIdSchema<ID extends Entity.Id<?>>
java.lang.Object
tech.ydb.yoj.databind.schema.Schema<ID>
tech.ydb.yoj.repository.db.EntityIdSchema<ID>
- All Implemented Interfaces:
Comparator<ID>
public final class EntityIdSchema<ID extends Entity.Id<?>>
extends Schema<ID>
implements Comparator<ID>
-
Nested Class Summary
Nested classes/interfaces inherited from class tech.ydb.yoj.databind.schema.Schema
Schema.Changefeed, Schema.Dynamic, Schema.Index, Schema.JavaField, Schema.JavaFieldValue, Schema.TtlModifier -
Field Summary
FieldsFields inherited from class tech.ydb.yoj.databind.schema.Schema
PATH_DELIMITER, reflectType -
Method Summary
Modifier and TypeMethodDescriptionintstatic <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>from(EntitySchema<T> entitySchema) static <T extends Entity<T>>
Comparator<Entity.Id<T>>getIdComparator(Class<T> type) protected booleanisFlattenable(ReflectField field) static booleanisIdField(@NonNull Schema.JavaField field) static booleanisIdFieldName(@NonNull String name) static booleanisIdFieldPath(@NonNull String path) static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>of(Class<ID> idType, NamingStrategy namingStrategy) static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>of(SchemaRegistry registry, Class<ID> idType) static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>of(SchemaRegistry registry, Class<ID> idType, NamingStrategy namingStrategy) static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>ofEntity(Class<T> entityType, NamingStrategy namingStrategy) static <T extends Entity<T>,ID extends Entity.Id<T>>
EntityIdSchema<ID>ofEntity(SchemaRegistry registry, Class<T> entityType, NamingStrategy namingStrategy) Methods inherited from class tech.ydb.yoj.databind.schema.Schema
equals, findField, flatten, flattenFieldNames, flattenFields, flattenOneField, flattenToList, getChangefeeds, getField, getFields, getGlobalIndexes, getName, getNamingStrategy, getSchemaKey, getTtlModifier, getType, hashCode, isDynamic, newInstance, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
ID_FIELD_NAME
Nameand alsopathof Entity'sIDfield. Use this constant if you need to reference ID field in a query, filter or order expression.
If you need to check whether the specified field is a [part of] ID field, use theisIdField(JavaField),isIdFieldPath(String)andisIdFieldName(String)methods instead. -
SORT_ENTITY_BY_ID
-
-
Method Details
-
getIdComparator
-
isFlattenable
- Overrides:
isFlattenablein classSchema<ID extends Entity.Id<?>>
-
ofEntity
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> ofEntity(Class<T> entityType) -
ofEntity
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> ofEntity(Class<T> entityType, NamingStrategy namingStrategy) - Parameters:
namingStrategy- naming strategy with mandatory equals/hashCode.
-
ofEntity
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> ofEntity(SchemaRegistry registry, Class<T> entityType, NamingStrategy namingStrategy) - Parameters:
namingStrategy- naming strategy with mandatory equals/hashCode.
-
of
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> of(Class<ID> idType) -
of
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> of(Class<ID> idType, NamingStrategy namingStrategy) - Parameters:
namingStrategy- naming strategy with mandatory equals/hashCode.
-
of
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> of(SchemaRegistry registry, Class<ID> idType) -
of
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> of(SchemaRegistry registry, Class<ID> idType, NamingStrategy namingStrategy) - Parameters:
namingStrategy- naming strategy with mandatory equals/hashCode.
-
from
public static <T extends Entity<T>,ID extends Entity.Id<T>> EntityIdSchema<ID> from(EntitySchema<T> entitySchema) -
isIdField
-
isIdFieldPath
-
isIdFieldName
-
compare
- Specified by:
comparein interfaceComparator<ID extends Entity.Id<?>>
-