Remove deprecated methods in ebean-api - plugin BeanType. Migrate getFoo() -> foo()

These methods are deprecated getters, migrate to the associated accessor method.
This commit is contained in:
Rob Bygrave committed 2022-04-06 20:09:07 +12:00
1 parent e7dd5570a5
commit 495af7ae4a
4 files changed
+7 -197

No files matched your search

@@ -32,15 +32,7 @@ public interface BeanDocType<T> {
/** /**
* Return the FetchPath for the embedded document. * Return the FetchPath for the embedded document.
*/ */
default FetchPath embedded(String path) { FetchPath embedded(String path);
return getEmbedded(path);
}
/**
* Deprecated migrate to embedded().
*/
@Deprecated
FetchPath getEmbedded(String path);
/** /**
* For embedded 'many' properties we need a FetchPath relative to the root which is used to * For embedded 'many' properties we need a FetchPath relative to the root which is used to
@@ -22,53 +22,21 @@ public interface BeanType<T> {
*/ */
String name(); String name();
/**
* Deprecated migrate to name().
*/
@Deprecated
default String getName() {
return name();
}
/** /**
* Return the full name of the bean type. * Return the full name of the bean type.
*/ */
String fullName(); String fullName();
/**
* Deprecated migrate to fullName().
*/
@Deprecated
default String getFullName() {
return fullName();
}
/** /**
* Return the class type this BeanDescriptor describes. * Return the class type this BeanDescriptor describes.
*/ */
Class<T> type(); Class<T> type();
/**
* Deprecated migrate to type().
*/
@Deprecated
default Class<T> getBeanType() {
return type();
}
/** /**
* Return the type bean for an OneToMany or ManyToOne or ManyToMany property. * Return the type bean for an OneToMany or ManyToOne or ManyToMany property.
*/ */
BeanType<?> beanTypeAtPath(String propertyName); BeanType<?> beanTypeAtPath(String propertyName);
/**
* Deprecated migrate to beanTypeAtPath().
*/
@Deprecated
default BeanType<?> getBeanTypeAtPath(String propertyName) {
return beanTypeAtPath(propertyName);
}
/** /**
* Return all the properties for this bean type. * Return all the properties for this bean type.
*/ */
@@ -79,53 +47,21 @@ public interface BeanType<T> {
*/ */
Property idProperty(); Property idProperty();
/**
* Deprecated migrate to idProperty().
*/
@Deprecated
default Property getIdProperty() {
return idProperty();
}
/** /**
* Return the when modified property if there is one defined. * Return the when modified property if there is one defined.
*/ */
Property whenModifiedProperty(); Property whenModifiedProperty();
/**
* Deprecated migrate to idProperty().
*/
@Deprecated
default Property getWhenModifiedProperty() {
return whenModifiedProperty();
}
/** /**
* Return the when created property if there is one defined. * Return the when created property if there is one defined.
*/ */
Property whenCreatedProperty(); Property whenCreatedProperty();
/**
* Deprecated migrate to idProperty().
*/
@Deprecated
default Property getWhenCreatedProperty() {
return whenCreatedProperty();
}
/** /**
* Return the Property to read values from a bean. * Return the Property to read values from a bean.
*/ */
Property property(String propertyName); Property property(String propertyName);
/**
* Deprecated migrate to property().
*/
@Deprecated
default Property getProperty(String propertyName) {
return property(propertyName);
}
/** /**
* Return the ExpressionPath for a given property path. * Return the ExpressionPath for a given property path.
* <p> * <p>
@@ -134,14 +70,6 @@ public interface BeanType<T> {
*/ */
ExpressionPath expressionPath(String path); ExpressionPath expressionPath(String path);
/**
* Deprecated migrate to expressionPath().
*/
@Deprecated
default ExpressionPath getExpressionPath(String path) {
return expressionPath(path);
}
/** /**
* Return true if the property is a valid known property or path for the given bean type. * Return true if the property is a valid known property or path for the given bean type.
*/ */
@@ -177,14 +105,6 @@ public interface BeanType<T> {
*/ */
String baseTable(); String baseTable();
/**
* Deprecated migrate to baseTable().
*/
@Deprecated
default String getBaseTable() {
return baseTable();
}
/** /**
* Create a new instance of the bean. * Create a new instance of the bean.
*/ */
@@ -195,98 +115,36 @@ public interface BeanType<T> {
*/ */
Object id(Object bean); Object id(Object bean);
/**
* Deprecated migrate to id()
*/
@Deprecated
default Object beanId(Object bean) {
return id(bean);
}
/**
* Deprecated migrate to id()
*/
@Deprecated
Object getBeanId(T bean);
/** /**
* Set the id value to the bean. * Set the id value to the bean.
*/ */
void setId(T bean, Object idValue); void setId(T bean, Object idValue);
/**
* Deprecated migrate to setId()
*/
@Deprecated
default void setBeanId(T bean, Object idValue) {
setId(bean, idValue);
}
/** /**
* Return the bean persist controller. * Return the bean persist controller.
*/ */
BeanPersistController persistController(); BeanPersistController persistController();
/**
* Deprecated migrate to persistController()
*/
@Deprecated
default BeanPersistController getPersistController() {
return persistController();
}
/** /**
* Return the bean persist listener. * Return the bean persist listener.
*/ */
BeanPersistListener persistListener(); BeanPersistListener persistListener();
/**
* Deprecated migrate to persistListener()
*/
@Deprecated
default BeanPersistListener getPersistListener() {
return persistListener();
}
/** /**
* Return the beanFinder. Usually null unless overriding the finder. * Return the beanFinder. Usually null unless overriding the finder.
*/ */
BeanFindController findController(); BeanFindController findController();
/**
* Deprecated migrate to findController()
*/
@Deprecated
default BeanFindController getFindController() {
return findController();
}
/** /**
* Return the BeanQueryAdapter or null if none is defined. * Return the BeanQueryAdapter or null if none is defined.
*/ */
BeanQueryAdapter queryAdapter(); BeanQueryAdapter queryAdapter();
/**
* Deprecated migrate to queryAdapter()
*/
@Deprecated
default BeanQueryAdapter getQueryAdapter() {
return queryAdapter();
}
/** /**
* Return the identity generation type. * Return the identity generation type.
*/ */
IdType idType(); IdType idType();
/**
* Deprecated migrate to idType()
*/
@Deprecated
default IdType getIdType() {
return idType();
}
/** /**
* Return true if this bean type has doc store backing. * Return true if this bean type has doc store backing.
*/ */
@@ -301,27 +159,11 @@ public interface BeanType<T> {
*/ */
DocMapping docMapping(); DocMapping docMapping();
/**
* Deprecated migrate to docMapping()
*/
@Deprecated
default DocMapping getDocMapping() {
return docMapping();
}
/** /**
* Return the doc store queueId for this bean type. * Return the doc store queueId for this bean type.
*/ */
String docStoreQueueId(); String docStoreQueueId();
/**
* Deprecated migrate to docStoreQueueId()
*/
@Deprecated
default String getDocStoreQueueId() {
return docStoreQueueId();
}
/** /**
* Return the doc store support for this bean type.\ * Return the doc store support for this bean type.\
*/ */
@@ -353,27 +195,11 @@ public interface BeanType<T> {
*/ */
List<BeanType<?>> inheritanceChildren(); List<BeanType<?>> inheritanceChildren();
/**
* Deprecated migrate to inheritanceChildren()
*/
@Deprecated
default List<BeanType<?>> getInheritanceChildren() {
return inheritanceChildren();
}
/** /**
* Returns the parent in inheritance hierarchy * Returns the parent in inheritance hierarchy
*/ */
BeanType<?> inheritanceParent(); BeanType<?> inheritanceParent();
/**
* Deprecated migrate to inheritanceParent()
*/
@Deprecated
default BeanType<?> getInheritanceParent() {
return inheritanceParent();
}
/** /**
* Visit all children recursively * Visit all children recursively
*/ */
@@ -384,14 +210,6 @@ public interface BeanType<T> {
*/ */
String discColumn(); String discColumn();
/**
* Deprecated migrate to discColumn()
*/
@Deprecated
default String getDiscColumn() {
return discColumn();
}
/** /**
* Create a bean given the discriminator value. * Create a bean given the discriminator value.
*/ */
@@ -2106,10 +2106,10 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
return getId((EntityBean) bean); return getId((EntityBean) bean);
} }
@Override // @Override
public Object getBeanId(T bean) { // public Object beanId(T bean) {
return getId((EntityBean) bean); // return getId((EntityBean) bean);
} // }
/** /**
* Return the Id value for the bean with embeddedId beans converted into maps. * Return the Id value for the bean with embeddedId beans converted into maps.
@@ -2673,7 +2673,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
public PartitionMeta partitionMeta() { public PartitionMeta partitionMeta() {
return partitionMeta; return partitionMeta;
} }
/** /**
* Return the tablespace details of the bean. * Return the tablespace details of the bean.
*/ */
@@ -266,7 +266,7 @@ public abstract class DocStoreBeanBaseAdapter<T> implements DocStoreBeanAdapter<
} }
@Override @Override
public FetchPath getEmbedded(String path) { public FetchPath embedded(String path) {
return docStructure.getEmbedded(path); return docStructure.getEmbedded(path);
} }