001 /** 002 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.tools.servicebuilder; 016 017 /** 018 * @author Glenn Powell 019 * @author Brian Wing Shun Chan 020 */ 021 public class EntityMapping { 022 023 public EntityMapping(String table, String entity1, String entity2) { 024 _table = table; 025 _entities[0] = entity1; 026 _entities[1] = entity2; 027 } 028 029 public String getEntity(int index) { 030 try { 031 return _entities[index]; 032 } 033 catch (Exception e) { 034 return null; 035 } 036 } 037 038 public String getTable() { 039 return _table; 040 } 041 042 private String[] _entities = new String[2]; 043 private String _table; 044 045 }