diff --git a/de.metas.util/src/main/java/org/adempiere/util/lang/ITableRecordReference.java b/de.metas.util/src/main/java/org/adempiere/util/lang/ITableRecordReference.java index 8a0ba7bcdf3..a5af38d4afd 100644 --- a/de.metas.util/src/main/java/org/adempiere/util/lang/ITableRecordReference.java +++ b/de.metas.util/src/main/java/org/adempiere/util/lang/ITableRecordReference.java @@ -2,55 +2,54 @@ /** * Table record reference. - * + *

* Used to store references to models, without having to load them from the start (depends on implementation of this interface). - * + *

* In case the underlying model is needed, the developer can call {@link #getModel(IContextAware)} which will return the underlying model. * * @author tsa - * */ public interface ITableRecordReference { - final String COLUMNNAME_Record_ID = "Record_ID"; + String COLUMNNAME_Record_ID = "Record_ID"; - final String COLUMNNAME_AD_Table_ID = "AD_Table_ID"; + String COLUMNNAME_AD_Table_ID = "AD_Table_ID"; /** - * * @return referenced model's TableName */ String getTableName(); /** - * * @return referenced model's AD_Table_ID */ int getAD_Table_ID(); /** - * * @return referenced model's ID */ int getRecord_ID(); /** * Gets referenced/underlying model using given context. - * + *

* NOTE: implementations of this method can cache the model but they always need to check if the cached model is valid in given context (e.g. has the same transaction etc). * - * @param context * @return referenced model + * @deprecated It's a bad habit to use this method. Please use the appropriate repository or DAO instead. */ + @Deprecated Object getModel(IContextAware context); + /** + * @deprecated It's a bad habit to use this method. Please use the appropriate repository or DAO instead. + */ + @Deprecated Object getModel(); /** * Gets referenced/underlying model using given context and wraps it to provided modelClass interface. * - * @param context - * @param modelClass * @return referenced model wrapped to given model interface * @see #getModel(IContextAware) */