Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024,2025 Contributors to the Eclipse Foundation
* Copyright (c) 2024,2026 Contributors to the Eclipse Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
*/
package jakarta.data.metamodel.impl;

import jakarta.data.Sort;
import jakarta.data.metamodel.TextAttribute;

/**
Expand All @@ -28,4 +29,28 @@
@Deprecated(since = "1.1")
public record TextAttributeRecord<T>(String name)
implements TextAttribute<T> {

// The following overrides preserve the Data 1.0 behavior where
// static metamodels for different entities that have an identically named
// entity attribute can create Sort instances that are equal.

@Override
public Sort<T> asc() {
return Sort.asc(name);
}

@Override
public Sort<T> ascIgnoreCase() {
return Sort.ascIgnoreCase(name);
}

@Override
public Sort<T> desc() {
return Sort.desc(name);
}

@Override
public Sort<T> descIgnoreCase() {
return Sort.descIgnoreCase(name);
}
}