mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 20:28:00 +08:00
Deprecate MetaPropertyPath.get() in favor of MetaPropertyPath.getMetaProperties()
This commit is contained in:
parent
25355f280d
commit
16aa8e24ab
@ -95,8 +95,9 @@ public class MetaPropertyPath implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of MetaProperties between the originating MetaClass and target MetaProperty
|
||||
* DEPRECATED: use {@link #getMetaProperties()}
|
||||
*/
|
||||
@Deprecated
|
||||
public MetaProperty[] get() {
|
||||
return metaProperties;
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ public class MetadataTools {
|
||||
public MetaClass getPropertyEnclosingMetaClass(MetaPropertyPath propertyPath) {
|
||||
checkNotNullArgument(propertyPath, "Property path should not be null");
|
||||
|
||||
MetaProperty[] propertyChain = propertyPath.get();
|
||||
MetaProperty[] propertyChain = propertyPath.getMetaProperties();
|
||||
if (propertyChain.length > 1) {
|
||||
MetaProperty chainProperty = propertyChain[propertyChain.length - 2];
|
||||
return chainProperty.getRange().asClass();
|
||||
@ -449,7 +449,7 @@ public class MetadataTools {
|
||||
*/
|
||||
public boolean viewContainsProperty(@Nullable View view, MetaPropertyPath propertyPath) {
|
||||
View currentView = view;
|
||||
for (MetaProperty metaProperty : propertyPath.get()) {
|
||||
for (MetaProperty metaProperty : propertyPath.getMetaProperties()) {
|
||||
if (currentView == null)
|
||||
return false;
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class EntityByIdComparator<T extends Entity<K>, K> extends AbstractCompar
|
||||
public EntityByIdComparator(MetaPropertyPath propertyPath, CollectionDatasource<T, K> datasource, boolean asc) {
|
||||
super(asc);
|
||||
this.propertyPath = propertyPath;
|
||||
if (propertyPath.get().length == 1) {
|
||||
if (propertyPath.getMetaProperties().length == 1) {
|
||||
property = this.propertyPath.getMetaProperty();
|
||||
}
|
||||
this.datasource = datasource;
|
||||
|
@ -17,7 +17,7 @@ public class EntityComparator<T extends Entity> extends AbstractComparator<T> {
|
||||
public EntityComparator(MetaPropertyPath propertyPath, boolean asc) {
|
||||
super(asc);
|
||||
this.propertyPath = propertyPath;
|
||||
if (propertyPath.get().length == 1) {
|
||||
if (propertyPath.getMetaProperties().length == 1) {
|
||||
property = this.propertyPath.getMetaProperty();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user