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 companyId, long leftPrimaryKey, long rightPrimaryKey);
032
033 public int deleteLeftPrimaryKeyTableMappings(
034 long companyId, long leftPrimaryKey);
035
036 public int deleteRightPrimaryKeyTableMappings(
037 long companyId, long rightPrimaryKey);
038
039 public boolean deleteTableMapping(
040 long companyId, long leftPrimaryKey, long rightPrimaryKey);
041
042 public void destroy();
043
044 public List<L> getLeftBaseModels(
045 long companyId, long rightPrimaryKey, int start, int end,
046 OrderByComparator<L> obc);
047
048 public long[] getLeftPrimaryKeys(long companyId, long rightPrimaryKey);
049
050 public TableMapper<R, L> getReverseTableMapper();
051
052 public List<R> getRightBaseModels(
053 long companyId, long leftPrimaryKey, int start, int end,
054 OrderByComparator<R> obc);
055
056 public long[] getRightPrimaryKeys(long companyId, long leftPrimaryKey);
057
058 public boolean matches(String leftColumnName, String rightColumnName);
059
060 }