Deprecate MetaPropertyPath.get() in favor of MetaPropertyPath.getMetaProperties()

This commit is contained in:
Konstantin Krivopustov 2015-05-07 10:01:22 +00:00
parent 25355f280d
commit 16aa8e24ab
4 changed files with 6 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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();
}