Ejemplo n.º 1
0
 public void persist() throws SystemException {
   if (this.isNew()) {
     TypeLocalServiceUtil.addType(this);
   } else {
     TypeLocalServiceUtil.updateType(this);
   }
 }
 /*
  * NOTE FOR DEVELOPERS:
  *
  * Never modify or reference this class directly. All methods that expect a type model instance should use the {@link Type} interface instead.
  */
 @Override
 public void persist() {
   if (this.isNew()) {
     TypeLocalServiceUtil.addType(this);
   } else {
     TypeLocalServiceUtil.updateType(this);
   }
 }
  public Object invokeMethod(String name, String[] parameterTypes, Object[] arguments)
      throws Throwable {
    if (_methodName0.equals(name) && Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) {
      return TypeLocalServiceUtil.addType((com.liferay.ams.model.Type) arguments[0]);
    }

    if (_methodName1.equals(name) && Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) {
      return TypeLocalServiceUtil.createType(((Long) arguments[0]).longValue());
    }

    if (_methodName2.equals(name) && Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) {
      return TypeLocalServiceUtil.deleteType(((Long) arguments[0]).longValue());
    }

    if (_methodName3.equals(name) && Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) {
      return TypeLocalServiceUtil.deleteType((com.liferay.ams.model.Type) arguments[0]);
    }

    if (_methodName4.equals(name) && Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) {
      return TypeLocalServiceUtil.dynamicQuery();
    }

    if (_methodName5.equals(name) && Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) {
      return TypeLocalServiceUtil.dynamicQuery(
          (com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0]);
    }

    if (_methodName6.equals(name) && Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) {
      return TypeLocalServiceUtil.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 TypeLocalServiceUtil.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 TypeLocalServiceUtil.dynamicQueryCount(
          (com.liferay.portal.kernel.dao.orm.DynamicQuery) arguments[0]);
    }

    if (_methodName9.equals(name) && Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) {
      return TypeLocalServiceUtil.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 TypeLocalServiceUtil.fetchType(((Long) arguments[0]).longValue());
    }

    if (_methodName11.equals(name) && Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) {
      return TypeLocalServiceUtil.getType(((Long) arguments[0]).longValue());
    }

    if (_methodName12.equals(name) && Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) {
      return TypeLocalServiceUtil.getActionableDynamicQuery();
    }

    if (_methodName13.equals(name) && Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) {
      return TypeLocalServiceUtil.getIndexableActionableDynamicQuery();
    }

    if (_methodName15.equals(name) && Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) {
      return TypeLocalServiceUtil.deletePersistedModel(
          (com.liferay.portal.model.PersistedModel) arguments[0]);
    }

    if (_methodName16.equals(name) && Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) {
      return TypeLocalServiceUtil.getPersistedModel((java.io.Serializable) arguments[0]);
    }

    if (_methodName17.equals(name) && Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) {
      return TypeLocalServiceUtil.getTypes(
          ((Integer) arguments[0]).intValue(), ((Integer) arguments[1]).intValue());
    }

    if (_methodName18.equals(name) && Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) {
      return TypeLocalServiceUtil.getTypesCount();
    }

    if (_methodName19.equals(name) && Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) {
      return TypeLocalServiceUtil.updateType((com.liferay.ams.model.Type) arguments[0]);
    }

    if (_methodName54.equals(name) && Arrays.deepEquals(_methodParameterTypes54, parameterTypes)) {
      return TypeLocalServiceUtil.getOSGiServiceIdentifier();
    }

    throw new UnsupportedOperationException();
  }