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