com.liferay.portlet.dynamicdatamapping.storage
Class BaseStorageAdapter
java.lang.Object
com.liferay.portlet.dynamicdatamapping.storage.BaseStorageAdapter
- All Implemented Interfaces:
- StorageAdapter
- Direct Known Subclasses:
- ExpandoStorageAdapter, JSONStorageAdapter, XMLStorageAdapter
public abstract class BaseStorageAdapter
- extends Object
- implements StorageAdapter
|
Method Summary |
long |
create(long companyId,
long ddmStructureId,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
|
long |
create(long companyId,
long ddmStructureId,
Fields fields,
ServiceContext serviceContext)
|
void |
deleteByClass(long classPK)
|
void |
deleteByDDMStructure(long ddmStructureId)
|
protected long |
doCreate(long companyId,
long ddmStructureId,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
|
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 DDMFormValues |
doGetDDMFormValues(long classPK)
|
protected abstract List<Fields> |
doGetFieldsListByClasses(long ddmStructureId,
long[] classPKs,
List<String> fieldNames,
OrderByComparator<Fields> orderByComparator)
|
protected abstract List<Fields> |
doGetFieldsListByDDMStructure(long ddmStructureId,
List<String> fieldNames,
OrderByComparator<Fields> 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<Fields> orderByComparator)
|
protected abstract int |
doQueryCount(long ddmStructureId,
Condition condition)
|
protected void |
doUpdate(long classPK,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
|
protected abstract void |
doUpdate(long classPK,
Fields fields,
boolean mergeFields,
ServiceContext serviceContext)
|
DDMFormValues |
getDDMFormValues(long classPK)
|
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<Fields> orderByComparator)
|
List<Fields> |
getFieldsList(long ddmStructureId,
long[] classPKs,
List<String> fieldNames,
OrderByComparator<Fields> orderByComparator)
|
List<Fields> |
getFieldsList(long ddmStructureId,
long[] classPKs,
OrderByComparator<Fields> 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<Fields> orderByComparator)
|
int |
queryCount(long ddmStructureId,
Condition condition)
|
protected void |
transformDDMFormValues(DDMFormValues ddmFormValues,
ServiceContext serviceContext)
|
protected Fields |
transformFields(long ddmStructureId,
Fields fields,
ServiceContext serviceContext)
|
void |
update(long classPK,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
|
void |
update(long classPK,
Fields fields,
boolean mergeFields,
ServiceContext serviceContext)
|
void |
update(long classPK,
Fields fields,
ServiceContext serviceContext)
|
protected void |
validateDDMFormValues(DDMFormValues ddmFormValues)
|
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 |
BaseStorageAdapter
public BaseStorageAdapter()
create
public long create(long companyId,
long ddmStructureId,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException
- Specified by:
create in interface StorageAdapter
- Throws:
StorageException
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
getDDMFormValues
public DDMFormValues getDDMFormValues(long classPK)
throws StorageException
- Specified by:
getDDMFormValues 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<Fields> orderByComparator)
throws StorageException
- Specified by:
getFieldsList in interface StorageAdapter
- Throws:
StorageException
getFieldsList
public List<Fields> getFieldsList(long ddmStructureId,
long[] classPKs,
List<String> fieldNames,
OrderByComparator<Fields> orderByComparator)
throws StorageException
- Specified by:
getFieldsList in interface StorageAdapter
- Throws:
StorageException
getFieldsList
public List<Fields> getFieldsList(long ddmStructureId,
long[] classPKs,
OrderByComparator<Fields> 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<Fields> 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,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException
- Specified by:
update 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 long doCreate(long companyId,
long ddmStructureId,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
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
doGetDDMFormValues
protected DDMFormValues doGetDDMFormValues(long classPK)
throws Exception
- Throws:
Exception
doGetFieldsListByClasses
protected abstract List<Fields> doGetFieldsListByClasses(long ddmStructureId,
long[] classPKs,
List<String> fieldNames,
OrderByComparator<Fields> orderByComparator)
throws Exception
- Throws:
Exception
doGetFieldsListByDDMStructure
protected abstract List<Fields> doGetFieldsListByDDMStructure(long ddmStructureId,
List<String> fieldNames,
OrderByComparator<Fields> 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<Fields> orderByComparator)
throws Exception
- Throws:
Exception
doQueryCount
protected abstract int doQueryCount(long ddmStructureId,
Condition condition)
throws Exception
- Throws:
Exception
doUpdate
protected void doUpdate(long classPK,
DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
doUpdate
protected abstract void doUpdate(long classPK,
Fields fields,
boolean mergeFields,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
transformDDMFormValues
protected void transformDDMFormValues(DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws PortalException
- Throws:
PortalException
transformFields
protected Fields transformFields(long ddmStructureId,
Fields fields,
ServiceContext serviceContext)
throws PortalException
- Throws:
PortalException
validateDDMFormValues
protected void validateDDMFormValues(DDMFormValues ddmFormValues)
throws PortalException
- Throws:
PortalException
validateDDMStructureFields
protected void validateDDMStructureFields(long ddmStructureId,
Fields fields)
throws PortalException
- Throws:
PortalException