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