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 void destroy();
045
046 public List<L> getLeftBaseModels(
047 long rightPrimaryKey, int start, int end, OrderByComparator obc)
048 throws SystemException;
049
050 public long[] getLeftPrimaryKeys(long rightPrimaryKey)
051 throws SystemException;
052
053 public TableMapper<R, L> getReverseTableMapper();
054
055 public List<R> getRightBaseModels(
056 long leftPrimaryKey, int start, int end, OrderByComparator obc)
057 throws SystemException;
058
059 public long[] getRightPrimaryKeys(long leftPrimaryKey)
060 throws SystemException;
061
062 public boolean matches(String leftColumnName, String rightColumnName);
063
064 }