001
014
015 package com.liferay.portlet.dynamicdatamapping.storage;
016
017 import com.liferay.portal.kernel.util.OrderByComparator;
018 import com.liferay.portal.service.ServiceContext;
019 import com.liferay.portlet.dynamicdatamapping.StorageException;
020 import com.liferay.portlet.dynamicdatamapping.storage.query.Condition;
021
022 import java.util.List;
023 import java.util.Map;
024
025
030 public interface StorageAdapter {
031
032 public long create(
033 long companyId, long ddmStructureId, Fields fields,
034 ServiceContext serviceContext)
035 throws StorageException;
036
037 public void deleteByClass(long classPK) throws StorageException;
038
039 public void deleteByDDMStructure(long ddmStructureId)
040 throws StorageException;
041
042 public Fields getFields(long classPK) throws StorageException;
043
044 public Fields getFields(long classPK, List<String> fieldNames)
045 throws StorageException;
046
047 public List<Fields> getFieldsList(
048 long ddmStructureId, List<String> fieldNames)
049 throws StorageException;
050
051 public List<Fields> getFieldsList(
052 long ddmStructureId, List<String> fieldNames,
053 OrderByComparator orderByComparator)
054 throws StorageException;
055
056 public List<Fields> getFieldsList(
057 long ddmStructureId, long[] classPKs, List<String> fieldNames,
058 OrderByComparator orderByComparator)
059 throws StorageException;
060
061 public List<Fields> getFieldsList(
062 long ddmStructureId, long[] classPKs,
063 OrderByComparator orderByComparator)
064 throws StorageException;
065
066 public Map<Long, Fields> getFieldsMap(long ddmStructureId, long[] classPKs)
067 throws StorageException;
068
069 public Map<Long, Fields> getFieldsMap(
070 long ddmStructureId, long[] classPKs, List<String> fieldNames)
071 throws StorageException;
072
073 public List<Fields> query(
074 long ddmStructureId, List<String> fieldNames, Condition condition,
075 OrderByComparator orderByComparator)
076 throws StorageException;
077
078 public int queryCount(long ddmStructureId, Condition condition)
079 throws StorageException;
080
081 public void update(
082 long classPK, Fields fields, boolean mergeFields,
083 ServiceContext serviceContext)
084 throws StorageException;
085
086 public void update(
087 long classPK, Fields fields, ServiceContext serviceContext)
088 throws StorageException;
089
090 }