001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service;
022:
023: /**
024: * <a href="AddressServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portal.service.AddressService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portal.service.AddressServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portal.service.AddressService
047: * @see com.liferay.portal.service.AddressServiceFactory
048: *
049: */
050: public class AddressServiceUtil {
051: public static com.liferay.portal.model.Address addAddress(
052: java.lang.String className, long classPK,
053: java.lang.String street1, java.lang.String street2,
054: java.lang.String street3, java.lang.String city,
055: java.lang.String zip, long regionId, long countryId,
056: int typeId, boolean mailing, boolean primary)
057: throws com.liferay.portal.PortalException,
058: com.liferay.portal.SystemException,
059: java.rmi.RemoteException {
060: AddressService addressService = AddressServiceFactory
061: .getService();
062:
063: return addressService.addAddress(className, classPK, street1,
064: street2, street3, city, zip, regionId, countryId,
065: typeId, mailing, primary);
066: }
067:
068: public static void deleteAddress(long addressId)
069: throws com.liferay.portal.PortalException,
070: com.liferay.portal.SystemException,
071: java.rmi.RemoteException {
072: AddressService addressService = AddressServiceFactory
073: .getService();
074:
075: addressService.deleteAddress(addressId);
076: }
077:
078: public static com.liferay.portal.model.Address getAddress(
079: long addressId) throws com.liferay.portal.PortalException,
080: com.liferay.portal.SystemException,
081: java.rmi.RemoteException {
082: AddressService addressService = AddressServiceFactory
083: .getService();
084:
085: return addressService.getAddress(addressId);
086: }
087:
088: public static java.util.List getAddresses(
089: java.lang.String className, long classPK)
090: throws com.liferay.portal.PortalException,
091: com.liferay.portal.SystemException,
092: java.rmi.RemoteException {
093: AddressService addressService = AddressServiceFactory
094: .getService();
095:
096: return addressService.getAddresses(className, classPK);
097: }
098:
099: public static com.liferay.portal.model.Address updateAddress(
100: long addressId, java.lang.String street1,
101: java.lang.String street2, java.lang.String street3,
102: java.lang.String city, java.lang.String zip, long regionId,
103: long countryId, int typeId, boolean mailing, boolean primary)
104: throws com.liferay.portal.PortalException,
105: com.liferay.portal.SystemException,
106: java.rmi.RemoteException {
107: AddressService addressService = AddressServiceFactory
108: .getService();
109:
110: return addressService.updateAddress(addressId, street1,
111: street2, street3, city, zip, regionId, countryId,
112: typeId, mailing, primary);
113: }
114: }
|