Liferay 6.1.2-ce-ga3

com.liferay.portlet.dynamicdatamapping.storage
Class BaseStorageAdapter

java.lang.Object
  extended by com.liferay.portlet.dynamicdatamapping.storage.BaseStorageAdapter
All Implemented Interfaces:
StorageAdapter
Direct Known Subclasses:
ExpandoStorageAdapter, XMLStorageAdapter

public abstract class BaseStorageAdapter
extends Object
implements StorageAdapter


Constructor Summary
BaseStorageAdapter()
           
 
Method Summary
 long create(long companyId, long ddmStructureId, Fields fields, ServiceContext serviceContext)
           
 void deleteByClass(long classPK)
           
 void deleteByDDMStructure(long ddmStructureId)
           
protected abstract  long doCreate(long companyId, long ddmStructureId, Fields fields, ServiceContext serviceContext)
           
protected abstract  void doDeleteByClass(long classPK)
           
protected abstract  void doDeleteByDDMStructure(long ddmStructureId)
           
protected abstract  List<Fields> doGetFieldsListByClasses(long ddmStructureId, long[] classPKs, List<String> fieldNames, OrderByComparator orderByComparator)
           
protected abstract  List<Fields> doGetFieldsListByDDMStructure(long ddmStructureId, List<String> fieldNames, OrderByComparator orderByComparator)
           
protected abstract  Map<Long,Fields> doGetFieldsMapByClasses(long ddmStructureId, long[] classPKs, List<String> fieldNames)
           
protected abstract  List<Fields> doQuery(long ddmStructureId, List<String> fieldNames, Condition condition, OrderByComparator orderByComparator)
           
protected abstract  int doQueryCount(long ddmStructureId, Condition condition)
           
protected abstract  void doUpdate(long classPK, Fields fields, boolean mergeFields, ServiceContext serviceContext)
           
 Fields getFields(long classPK)
           
 Fields getFields(long classPK, List<String> fieldNames)
           
 List<Fields> getFieldsList(long ddmStructureId, List<String> fieldNames)
           
 List<Fields> getFieldsList(long ddmStructureId, List<String> fieldNames, OrderByComparator orderByComparator)
           
 List<Fields> getFieldsList(long ddmStructureId, long[] classPKs, List<String> fieldNames, OrderByComparator orderByComparator)
           
 List<Fields> getFieldsList(long ddmStructureId, long[] classPKs, OrderByComparator orderByComparator)
           
 Map<Long,Fields> getFieldsMap(long ddmStructureId, long[] classPKs)
           
 Map<Long,Fields> getFieldsMap(long ddmStructureId, long[] classPKs, List<String> fieldNames)
           
 List<Fields> query(long ddmStructureId, List<String> fieldNames, Condition condition, OrderByComparator orderByComparator)
           
 int queryCount(long ddmStructureId, Condition condition)
           
 void update(long classPK, Fields fields, boolean mergeFields, ServiceContext serviceContext)
           
 void update(long classPK, Fields fields, ServiceContext serviceContext)
           
protected  void validateClassFields(long classPK, Fields fields)
           
protected  void validateDDMStructureFields(long ddmStructureId, Fields fields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseStorageAdapter

public BaseStorageAdapter()
Method Detail

create

public long create(long companyId,
                   long ddmStructureId,
                   Fields fields,
                   ServiceContext serviceContext)
            throws StorageException
Specified by:
create in interface StorageAdapter
Throws:
StorageException

deleteByClass

public void deleteByClass(long classPK)
                   throws StorageException
Specified by:
deleteByClass in interface StorageAdapter
Throws:
StorageException

deleteByDDMStructure

public void deleteByDDMStructure(long ddmStructureId)
                          throws StorageException
Specified by:
deleteByDDMStructure in interface StorageAdapter
Throws:
StorageException

getFields

public Fields getFields(long classPK)
                 throws StorageException
Specified by:
getFields in interface StorageAdapter
Throws:
StorageException

getFields

public Fields getFields(long classPK,
                        List<String> fieldNames)
                 throws StorageException
Specified by:
getFields in interface StorageAdapter
Throws:
StorageException

getFieldsList

public List<Fields> getFieldsList(long ddmStructureId,
                                  List<String> fieldNames)
                           throws StorageException
Specified by:
getFieldsList in interface StorageAdapter
Throws:
StorageException

getFieldsList

public List<Fields> getFieldsList(long ddmStructureId,
                                  List<String> fieldNames,
                                  OrderByComparator orderByComparator)
                           throws StorageException
Specified by:
getFieldsList in interface StorageAdapter
Throws:
StorageException

getFieldsList

public List<Fields> getFieldsList(long ddmStructureId,
                                  long[] classPKs,
                                  List<String> fieldNames,
                                  OrderByComparator orderByComparator)
                           throws StorageException
Specified by:
getFieldsList in interface StorageAdapter
Throws:
StorageException

getFieldsList

public List<Fields> getFieldsList(long ddmStructureId,
                                  long[] classPKs,
                                  OrderByComparator orderByComparator)
                           throws StorageException
Specified by:
getFieldsList in interface StorageAdapter
Throws:
StorageException

getFieldsMap

public Map<Long,Fields> getFieldsMap(long ddmStructureId,
                                     long[] classPKs)
                              throws StorageException
Specified by:
getFieldsMap in interface StorageAdapter
Throws:
StorageException

getFieldsMap

public Map<Long,Fields> getFieldsMap(long ddmStructureId,
                                     long[] classPKs,
                                     List<String> fieldNames)
                              throws StorageException
Specified by:
getFieldsMap in interface StorageAdapter
Throws:
StorageException

query

public List<Fields> query(long ddmStructureId,
                          List<String> fieldNames,
                          Condition condition,
                          OrderByComparator orderByComparator)
                   throws StorageException
Specified by:
query in interface StorageAdapter
Throws:
StorageException

queryCount

public int queryCount(long ddmStructureId,
                      Condition condition)
               throws StorageException
Specified by:
queryCount in interface StorageAdapter
Throws:
StorageException

update

public void update(long classPK,
                   Fields fields,
                   boolean mergeFields,
                   ServiceContext serviceContext)
            throws StorageException
Specified by:
update in interface StorageAdapter
Throws:
StorageException

update

public void update(long classPK,
                   Fields fields,
                   ServiceContext serviceContext)
            throws StorageException
Specified by:
update in interface StorageAdapter
Throws:
StorageException

doCreate

protected abstract long doCreate(long companyId,
                                 long ddmStructureId,
                                 Fields fields,
                                 ServiceContext serviceContext)
                          throws Exception
Throws:
Exception

doDeleteByClass

protected abstract void doDeleteByClass(long classPK)
                                 throws Exception
Throws:
Exception

doDeleteByDDMStructure

protected abstract void doDeleteByDDMStructure(long ddmStructureId)
                                        throws Exception
Throws:
Exception

doGetFieldsListByClasses

protected abstract List<Fields> doGetFieldsListByClasses(long ddmStructureId,
                                                         long[] classPKs,
                                                         List<String> fieldNames,
                                                         OrderByComparator orderByComparator)
                                                  throws Exception
Throws:
Exception

doGetFieldsListByDDMStructure

protected abstract List<Fields> doGetFieldsListByDDMStructure(long ddmStructureId,
                                                              List<String> fieldNames,
                                                              OrderByComparator orderByComparator)
                                                       throws Exception
Throws:
Exception

doGetFieldsMapByClasses

protected abstract Map<Long,Fields> doGetFieldsMapByClasses(long ddmStructureId,
                                                            long[] classPKs,
                                                            List<String> fieldNames)
                                                     throws Exception
Throws:
Exception

doQuery

protected abstract List<Fields> doQuery(long ddmStructureId,
                                        List<String> fieldNames,
                                        Condition condition,
                                        OrderByComparator orderByComparator)
                                 throws Exception
Throws:
Exception

doQueryCount

protected abstract int doQueryCount(long ddmStructureId,
                                    Condition condition)
                             throws Exception
Throws:
Exception

doUpdate

protected abstract void doUpdate(long classPK,
                                 Fields fields,
                                 boolean mergeFields,
                                 ServiceContext serviceContext)
                          throws Exception
Throws:
Exception

validateClassFields

protected void validateClassFields(long classPK,
                                   Fields fields)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

validateDDMStructureFields

protected void validateDDMStructureFields(long ddmStructureId,
                                          Fields fields)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

Liferay 6.1.2-ce-ga3