Skip to content

Commit

Permalink
conventient default methods (without ctx)
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Feb 27, 2018
1 parent 3d1f34f commit 8f8f3fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ default int retriveProcessIdByClassIfUnique(final Class<?> processClass)

I_AD_Process_Para retriveProcessParameter(Properties ctx, int adProcessId, String parameterName);

default I_AD_Process_Para retriveProcessParameter(final int adProcessId, final String parameterName)
{
return retriveProcessParameter(Env.getCtx(), adProcessId, parameterName);
}

/**
* Add process execution statistics.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.adempiere.util.ISingletonService;
import org.compiere.model.I_AD_RelationType;
import org.compiere.util.Env;

/*
* #%L
Expand All @@ -15,14 +16,14 @@
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* #L%
*/
Expand All @@ -32,4 +33,9 @@ public interface IRelationTypeDAO extends ISingletonService

I_AD_RelationType retrieveForInternalName(Properties ctx, String internalName);

default I_AD_RelationType retrieveForInternalName(final String internalName)
{
return retrieveForInternalName(Env.getCtx(), internalName);
}

}

0 comments on commit 8f8f3fb

Please sign in to comment.