Java tutorial
/** * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library 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 GNU Lesser General Public License for more * details. */ package com.liferay.mail.service.base; import com.liferay.mail.service.AccountLocalServiceUtil; import com.liferay.portal.util.PortalUtil; import java.util.Arrays; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author Brian Wing Shun Chan * @generated */ public class AccountLocalServiceClpInvoker { public AccountLocalServiceClpInvoker() { _methodName0 = "addAccount"; _methodParameterTypes0 = new String[] { "com.liferay.mail.model.Account" }; _methodName1 = "createAccount"; _methodParameterTypes1 = new String[] { "long" }; _methodName2 = "deleteAccount"; _methodParameterTypes2 = new String[] { "long" }; _methodName3 = "deleteAccount"; _methodParameterTypes3 = new String[] { "com.liferay.mail.model.Account" }; _methodName4 = "dynamicQuery"; _methodParameterTypes4 = new String[] {}; _methodName5 = "dynamicQuery"; _methodParameterTypes5 = new String[] { "com.liferay.portal.kernel.dao.orm.DynamicQuery" }; _methodName6 = "dynamicQuery"; _methodParameterTypes6 = new String[] { "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" }; _methodName7 = "dynamicQuery"; _methodParameterTypes7 = new String[] { "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; _methodName8 = "dynamicQueryCount"; _methodParameterTypes8 = new String[] { "com.liferay.portal.kernel.dao.orm.DynamicQuery" }; _methodName9 = "dynamicQueryCount"; _methodParameterTypes9 = new String[] { "com.liferay.portal.kernel.dao.orm.DynamicQuery", "com.liferay.portal.kernel.dao.orm.Projection" }; _methodName10 = "fetchAccount"; _methodParameterTypes10 = new String[] { "long" }; _methodName11 = "getAccount"; _methodParameterTypes11 = new String[] { "long" }; _methodName12 = "getPersistedModel"; _methodParameterTypes12 = new String[] { "java.io.Serializable" }; _methodName13 = "getAccounts"; _methodParameterTypes13 = new String[] { "int", "int" }; _methodName14 = "getAccountsCount"; _methodParameterTypes14 = new String[] {}; _methodName15 = "updateAccount"; _methodParameterTypes15 = new String[] { "com.liferay.mail.model.Account" }; _methodName50 = "getBeanIdentifier"; _methodParameterTypes50 = new String[] {}; _methodName51 = "setBeanIdentifier"; _methodParameterTypes51 = new String[] { "java.lang.String" }; _methodName56 = "addAccount"; _methodParameterTypes56 = new String[] { "long", "java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String", "int", "boolean", "java.lang.String", "int", "boolean", "java.lang.String", "java.lang.String", "boolean", "java.lang.String", "boolean", "java.lang.String", "long", "long", "long", "long", "boolean" }; _methodName561 = "addUPAccount"; _methodParameterTypes561 = new String[] { "long", "java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String", "int", "boolean", "java.lang.String", "int", "boolean", "java.lang.String", "java.lang.String", "boolean", "java.lang.String", "boolean", "java.lang.String", "long", "long", "long", "long", "boolean" }; _methodName57 = "deleteAccount"; _methodParameterTypes57 = new String[] { "com.liferay.mail.model.Account" }; _methodName58 = "deleteAccount"; _methodParameterTypes58 = new String[] { "long" }; _methodName59 = "deleteAccounts"; _methodParameterTypes59 = new String[] { "long" }; _methodName60 = "getAccount"; _methodParameterTypes60 = new String[] { "long", "java.lang.String" }; _methodName61 = "getAccounts"; _methodParameterTypes61 = new String[] { "long" }; _methodName62 = "updateAccount"; _methodParameterTypes62 = new String[] { "long", "java.lang.String", "java.lang.String", "boolean", "java.lang.String", "boolean", "java.lang.String", "boolean" }; _methodName63 = "updateFolders"; _methodParameterTypes63 = new String[] { "long", "long", "long", "long", "long" }; } public Object invokeMethod(String name, String[] parameterTypes, Object[] arguments) throws Throwable { if (_methodName0.equals(name) && Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { return AccountLocalServiceUtil.addAccount((com.liferay.mail.model.Account) arguments[0]); } if (_methodName1.equals(name) && Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { return AccountLocalServiceUtil.createAccount(((Long) arguments[0]).longValue()); } if (_methodName2.equals(name) && Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { return AccountLocalServiceUtil.deleteAccount(((Long) arguments[0]).longValue()); } if (_methodName3.equals(name) && Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { return AccountLocalServiceUtil.deleteAccount((com.liferay.mail.model.Account) arguments[0]); } if (_methodName4.equals(name) && Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { return AccountLocalServiceUtil.dynamicQuery(); } if (_methodName5.equals(name) && Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { return AccountLocalServiceUtil .dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0]); } if (_methodName6.equals(name) && Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { return AccountLocalServiceUtil.dynamicQuery( (com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0], ((Integer) arguments[1]).intValue(), ((Integer) arguments[2]).intValue()); } if (_methodName7.equals(name) && Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) { return AccountLocalServiceUtil.dynamicQuery( (com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0], ((Integer) arguments[1]).intValue(), ((Integer) arguments[2]).intValue(), (com.liferay.portal.kernel.util.OrderByComparator) arguments[3]); } if (_methodName8.equals(name) && Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) { return AccountLocalServiceUtil .dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0]); } if (_methodName9.equals(name) && Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { return AccountLocalServiceUtil.dynamicQueryCount( (com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0], (com.liferay.portal.kernel.dao.orm.Projection) arguments[1]); } if (_methodName10.equals(name) && Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) { return AccountLocalServiceUtil.fetchAccount(((Long) arguments[0]).longValue()); } if (_methodName11.equals(name) && Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { return AccountLocalServiceUtil.getAccount(((Long) arguments[0]).longValue()); } if (_methodName12.equals(name) && Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { return AccountLocalServiceUtil.getPersistedModel((java.io.Serializable) arguments[0]); } if (_methodName13.equals(name) && Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { return AccountLocalServiceUtil.getAccounts(((Integer) arguments[0]).intValue(), ((Integer) arguments[1]).intValue()); } if (_methodName14.equals(name) && Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { return AccountLocalServiceUtil.getAccountsCount(); } if (_methodName15.equals(name) && Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { return AccountLocalServiceUtil.updateAccount((com.liferay.mail.model.Account) arguments[0]); } if (_methodName50.equals(name) && Arrays.deepEquals(_methodParameterTypes50, parameterTypes)) { return AccountLocalServiceUtil.getBeanIdentifier(); } if (_methodName51.equals(name) && Arrays.deepEquals(_methodParameterTypes51, parameterTypes)) { AccountLocalServiceUtil.setBeanIdentifier((java.lang.String) arguments[0]); return null; } if (_methodName56.equals(name) && Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { return AccountLocalServiceUtil.addAccount(((Long) arguments[0]).longValue(), (java.lang.String) arguments[1], (java.lang.String) arguments[2], (java.lang.String) arguments[3], (java.lang.String) arguments[4], ((Integer) arguments[5]).intValue(), ((Boolean) arguments[6]).booleanValue(), (java.lang.String) arguments[7], ((Integer) arguments[8]).intValue(), ((Boolean) arguments[9]).booleanValue(), (java.lang.String) arguments[10], (java.lang.String) arguments[11], ((Boolean) arguments[12]).booleanValue(), (java.lang.String) arguments[13], ((Boolean) arguments[14]).booleanValue(), (java.lang.String) arguments[15], ((Long) arguments[16]).longValue(), ((Long) arguments[17]).longValue(), ((Long) arguments[18]).longValue(), ((Long) arguments[19]).longValue(), ((Boolean) arguments[20]).booleanValue()); } Log _log = LogFactory.getLog(AccountLocalServiceClpInvoker.class); _log.error("BLAAAA"); if (_methodName561.equals(name) && Arrays.deepEquals(_methodParameterTypes561, parameterTypes)) { return AccountLocalServiceUtil.addAccount(((Long) arguments[0]).longValue(), "chrwegne@uni-potsdam.de", (java.lang.String) arguments[2], (java.lang.String) arguments[3], "imap.uni-potsdam.de", 993, true, "smtpout.uni-potsdam.de", 465, true, "chrwegne", (java.lang.String) arguments[11], ((Boolean) arguments[12]).booleanValue(), (java.lang.String) arguments[13], ((Boolean) arguments[14]).booleanValue(), (java.lang.String) arguments[15], ((Long) arguments[16]).longValue(), ((Long) arguments[17]).longValue(), ((Long) arguments[18]).longValue(), ((Long) arguments[19]).longValue(), ((Boolean) arguments[20]).booleanValue()); } if (_methodName57.equals(name) && Arrays.deepEquals(_methodParameterTypes57, parameterTypes)) { return AccountLocalServiceUtil.deleteAccount((com.liferay.mail.model.Account) arguments[0]); } if (_methodName58.equals(name) && Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { return AccountLocalServiceUtil.deleteAccount(((Long) arguments[0]).longValue()); } if (_methodName59.equals(name) && Arrays.deepEquals(_methodParameterTypes59, parameterTypes)) { AccountLocalServiceUtil.deleteAccounts(((Long) arguments[0]).longValue()); return null; } if (_methodName60.equals(name) && Arrays.deepEquals(_methodParameterTypes60, parameterTypes)) { return AccountLocalServiceUtil.getAccount(((Long) arguments[0]).longValue(), (java.lang.String) arguments[1]); } if (_methodName61.equals(name) && Arrays.deepEquals(_methodParameterTypes61, parameterTypes)) { return AccountLocalServiceUtil.getAccounts(((Long) arguments[0]).longValue()); } if (_methodName62.equals(name) && Arrays.deepEquals(_methodParameterTypes62, parameterTypes)) { return AccountLocalServiceUtil.updateAccount(((Long) arguments[0]).longValue(), (java.lang.String) arguments[1], (java.lang.String) arguments[2], ((Boolean) arguments[3]).booleanValue(), (java.lang.String) arguments[4], ((Boolean) arguments[5]).booleanValue(), (java.lang.String) arguments[6], ((Boolean) arguments[7]).booleanValue()); } if (_methodName63.equals(name) && Arrays.deepEquals(_methodParameterTypes63, parameterTypes)) { return AccountLocalServiceUtil.updateFolders(((Long) arguments[0]).longValue(), ((Long) arguments[1]).longValue(), ((Long) arguments[2]).longValue(), ((Long) arguments[3]).longValue(), ((Long) arguments[4]).longValue()); } throw new UnsupportedOperationException(); } private String _methodName0; private String[] _methodParameterTypes0; private String _methodName1; private String[] _methodParameterTypes1; private String _methodName2; private String[] _methodParameterTypes2; private String _methodName3; private String[] _methodParameterTypes3; private String _methodName4; private String[] _methodParameterTypes4; private String _methodName5; private String[] _methodParameterTypes5; private String _methodName6; private String[] _methodParameterTypes6; private String _methodName7; private String[] _methodParameterTypes7; private String _methodName8; private String[] _methodParameterTypes8; private String _methodName9; private String[] _methodParameterTypes9; private String _methodName10; private String[] _methodParameterTypes10; private String _methodName11; private String[] _methodParameterTypes11; private String _methodName12; private String[] _methodParameterTypes12; private String _methodName13; private String[] _methodParameterTypes13; private String _methodName14; private String[] _methodParameterTypes14; private String _methodName15; private String[] _methodParameterTypes15; private String _methodName50; private String[] _methodParameterTypes50; private String _methodName51; private String[] _methodParameterTypes51; private String _methodName56; private String[] _methodParameterTypes56; private String _methodName561; private String[] _methodParameterTypes561; private String _methodName57; private String[] _methodParameterTypes57; private String _methodName58; private String[] _methodParameterTypes58; private String _methodName59; private String[] _methodParameterTypes59; private String _methodName60; private String[] _methodParameterTypes60; private String _methodName61; private String[] _methodParameterTypes61; private String _methodName62; private String[] _methodParameterTypes62; private String _methodName63; private String[] _methodParameterTypes63; }