001
014
015 package com.liferay.portal.service.persistence.impl;
016
017 import com.liferay.portal.kernel.util.OrderByComparator;
018 import com.liferay.portal.model.BaseModel;
019
020 import java.util.List;
021
022
025 public interface TableMapper<L extends BaseModel<L>, R extends BaseModel<R>> {
026
027 public boolean addTableMapping(
028 long companyId, long leftPrimaryKey, long rightPrimaryKey);
029
030 public boolean containsTableMapping(
031 long leftPrimaryKey, long rightPrimaryKey);
032
033 public int deleteLeftPrimaryKeyTableMappings(long leftPrimaryKey);
034
035 public int deleteRightPrimaryKeyTableMappings(long rightPrimaryKey);
036
037 public boolean deleteTableMapping(
038 long leftPrimaryKey, long rightPrimaryKey);
039
040 public void destroy();
041
042 public List<L> getLeftBaseModels(
043 long rightPrimaryKey, int start, int end, OrderByComparator<L> obc);
044
045 public long[] getLeftPrimaryKeys(long rightPrimaryKey);
046
047 public TableMapper<R, L> getReverseTableMapper();
048
049 public List<R> getRightBaseModels(
050 long leftPrimaryKey, int start, int end, OrderByComparator<R> obc);
051
052 public long[] getRightPrimaryKeys(long leftPrimaryKey);
053
054 public boolean matches(String leftColumnName, String rightColumnName);
055
056 }